1
0
Fork 0

Merge pull request #241 from paviliondev/handle_admin_template_deprecations

Handle admin template deprecations
Dieser Commit ist enthalten in:
Angus McLeod 2023-04-03 10:38:29 +08:00 committet von GitHub
Commit 454ed607b4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
12 geänderte Dateien mit 201 neuen und 84 gelöschten Zeilen

Datei anzeigen

@ -7,7 +7,7 @@ export default Component.extend(Subscription, {
@discourseComputed("subscribed")
subscribedIcon(subscribed) {
return subscribed ? "check" : "dash";
return subscribed ? "check" : "times";
},
@discourseComputed("subscribed")

Datei anzeigen

@ -32,13 +32,19 @@
<div class="metadata">
<div class="title">
<label>{{i18n "admin.wizard.api.title"}}</label>
{{input value=api.title placeholder=(i18n "admin.wizard.api.title_placeholder")}}
<Input
@value={{this.api.title}}
placeholder={{i18n "admin.wizard.api.title_placeholder"}}
/>
</div>
<div class="name {{nameClass}}">
<label>{{i18n "admin.wizard.api.name"}}</label>
{{#if api.isNew}}
{{input value=api.name placeholder=(i18n "admin.wizard.api.name_placeholder")}}
<Input
@value={{this.api.name}}
placeholder={{i18n "admin.wizard.api.name_placeholder"}}
/>
{{else}}
<span>{{api.name}}</span>
{{/if}}
@ -104,7 +110,9 @@
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.url"}}</label>
<div class="controls">
{{input value=api.authUrl}}
<Input
@value={{this.api.authUrl}}
/>
</div>
</div>
{{/if}}
@ -112,21 +120,27 @@
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.token_url"}}</label>
<div class="controls">
{{input value=api.tokenUrl}}
<Input
@value={{this.api.tokenUrl}}
/>
</div>
</div>
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.client_id"}}</label>
<div class="controls">
{{input value=api.clientId}}
<Input
@value={{this.api.clientId}}
/>
</div>
</div>
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.client_secret"}}</label>
<div class="controls">
{{input value=api.clientSecret}}
<Input
@value={{this.api.clientSecret}}
/>
</div>
</div>
@ -135,8 +149,14 @@
<div class="controls">
{{#each api.authParams as |param|}}
<div class="param">
{{input value=param.key placeholder=(i18n "admin.wizard.key")}}
{{input value=param.value placeholder=(i18n "admin.wizard.value")}}
<Input
@value={{this.param.key}}
placeholder={{i18n "admin.wizard.key"}}
/>
<Input
@value={{this.param.value}}
placeholder={{i18n "admin.wizard.value"}}
/>
{{d-button action=(action "removeParam") actionParam=param icon="times"}}
</div>
{{/each}}
@ -149,14 +169,18 @@
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.username"}}</label>
<div class="controls">
{{input value=api.username}}
<Input
@value={{this.api.username}}
/>
</div>
</div>
<div class="control-group">
<label>{{i18n "admin.wizard.api.auth.password"}}</label>
<div class="controls">
{{input value=api.password}}
<Input
@value={{this.api.password}}
/>
</div>
</div>
{{/if}}
@ -235,11 +259,15 @@
<div class="endpoint">
<div class="endpoint-">
<div class="top">
{{input value=endpoint.name
placeholder=(i18n "admin.wizard.api.endpoint.name")}}
{{input value=endpoint.url
placeholder=(i18n "admin.wizard.api.endpoint.url")
class="endpoint-url"}}
<Input
@value={{this.endpoint.name}}
placeholder={{i18n "admin.wizard.api.endpoint.name"}}
/>
<Input
@value={{this.endpoint.url}}
placeholder={{i18n "admin.wizard.api.endpoint.url"}}
class="endpoint-url"
/>
{{d-button action=(action "removeEndpoint")
actionParam=endpoint
icon="times"

Datei anzeigen

@ -11,11 +11,12 @@
</div>
{{/if}}
{{input
<Input
id="custom-wizard-file-upload"
type="file"
@type="file"
accept="application/json"
input=(action "setFile")}}
{{on "input" (action "setFile")}}
/>
{{d-button
id="upload-button"
label="admin.wizard.manager.upload"
@ -65,16 +66,18 @@
{{/link-to}}
</td>
<td class="control-column">
{{input
type="checkbox"
<Input
@type="checkbox"
class="export"
change=(action "selectWizard")}}
{{on "change" (action "selectWizard")}}
/>
</td>
<td class="control-column">
{{input
type="checkbox"
<Input
@type="checkbox"
class="destroy"
change=(action "selectWizard")}}
{{on "change" (action "selectWizard")}}
/>
</td>
</tr>
{{/each}}

Datei anzeigen

@ -1,9 +1,10 @@
{{#if wizard}}
<div class="wizard-header large">
{{input
<Input
@value={{this.wizard.name}}
name="name"
value=wizard.name
placeholderKey="admin.wizard.name_placeholder"}}
placeholder={{i18n "admin.wizard.name_placeholder"}}
/>
<div class="wizard-url">
{{#if wizard.name}}
@ -23,11 +24,12 @@
<label>{{i18n "admin.wizard.background"}}</label>
</div>
<div class="setting-value">
{{input
<Input
@value={{this.wizard.background}}
name="background"
value=wizard.background
placeholderKey="admin.wizard.background_placeholder"
class="small"}}
placeholder={{i18n "admin.wizard.background_placeholder"}}
class="small"
/>
</div>
</div>
@ -58,7 +60,10 @@
<label>{{i18n "admin.wizard.save_submissions"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.save_submissions}}
<Input
@type="checkbox"
@checked={{this.wizard.save_submissions}}
/>
<span>{{i18n "admin.wizard.save_submissions_label"}}</span>
</div>
</div>
@ -68,7 +73,10 @@
<label>{{i18n "admin.wizard.multiple_submissions"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.multiple_submissions}}
<Input
@type="checkbox"
@checked={{this.wizard.multiple_submissions}}
/>
<span>{{i18n "admin.wizard.multiple_submissions_label"}}</span>
</div>
</div>
@ -78,7 +86,10 @@
<label>{{i18n "admin.wizard.after_signup"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.after_signup}}
<Input
@type="checkbox"
@checked={{this.wizard.after_signup}}
/>
<span>{{i18n "admin.wizard.after_signup_label"}}</span>
</div>
</div>
@ -88,7 +99,10 @@
<label>{{i18n "admin.wizard.prompt_completion"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.prompt_completion}}
<Input
@type="checkbox"
@checked={{this.wizard.prompt_completion}}
/>
<span>{{i18n "admin.wizard.prompt_completion_label"}}</span>
</div>
</div>
@ -98,7 +112,10 @@
<label>{{i18n "admin.wizard.after_time"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.after_time}}
<Input
@type="checkbox"
@checked={{this.wizard.after_time}}
/>
<span>{{i18n "admin.wizard.after_time_label"}}</span>
{{d-button
action=(action "setNextSessionScheduled")
@ -114,7 +131,10 @@
<label>{{i18n "admin.wizard.required"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.required}}
<Input
@type="checkbox"
@checked={{this.wizard.required}}
/>
<span>{{i18n "admin.wizard.required_label"}}</span>
</div>
</div>
@ -124,7 +144,10 @@
<label>{{i18n "admin.wizard.restart_on_revisit"}}</label>
</div>
<div class="setting-value">
{{input type="checkbox" checked=wizard.restart_on_revisit}}
<Input
@type="checkbox"
@checked={{this.wizard.restart_on_revisit}}
/>
<span>{{i18n "admin.wizard.restart_on_revisit_label"}}</span>
</div>
</div>

Datei anzeigen

@ -20,9 +20,10 @@
)}}
</td>
<td class="input">
{{input
value=field.name
placeholder=(i18n "admin.wizard.custom_field.name.select")}}
<Input
@value={{this.field.name}}
placeholder={{i18n "admin.wizard.custom_field.name.select"}}
/>
</td>
<td class="multi-select">
{{multi-select

Datei anzeigen

@ -40,7 +40,12 @@
</div>
{{conditional-loading-spinner condition=loading}}
{{textarea tabindex=tabindex value=value class="d-editor-input" placeholder=placeholder}}
<Textarea
tabindex={{this.tabindex}}
@value={{this.value}}
class="d-editor-input"
placeholder={{this.placeholder}}
/>
</div>
{{/if}}
</div>

Datei anzeigen

@ -79,7 +79,10 @@
)}}
<div class="setting-gutter">
{{input type="checkbox" checked=action.post_builder}}
<Input
@type="checkbox"
@checked={{this.action.post_builder}}
/>
<span>{{i18n "admin.wizard.action.post_builder.checkbox"}}</span>
</div>
</div>
@ -408,7 +411,10 @@
</div>
<div class="setting-value">
{{input type="checkbox" checked=action.wizard_user}}
<Input
@type="checkbox"
@checked={{this.action.wizard_user}}
/>
</div>
</div>
@ -477,7 +483,10 @@
</div>
<div class="setting-value">
{{input type="checkbox" checked=action.wizard_user}}
<Input
@type="checkbox"
@checked={{this.action.wizard_user}}
/>
</div>
</div>
@ -877,7 +886,10 @@
</div>
<div class="setting-value">
{{input type="checkbox" checked=action.skip_redirect}}
<Input
@type="checkbox"
@checked={{this.action.skip_redirect}}
/>
<span>
{{i18n "admin.wizard.action.skip_redirect.description" type="topic"}}
@ -891,7 +903,10 @@
</div>
<div class="setting-value">
{{input type="checkbox" checked=action.suppress_notifications}}
<Input
@type="checkbox"
@checked={{this.action.suppress_notifications}}
/>
<span>
{{i18n "admin.wizard.action.suppress_notifications.description" type="topic"}}
@ -907,7 +922,7 @@
</div>
<div class="setting-value">
{{input value=action.code}}
<Input @value={{this.action.code}} />
</div>
</div>
{{/if}}

Datei anzeigen

@ -11,7 +11,10 @@
<label>{{i18n "admin.wizard.field.label"}}</label>
</div>
<div class="setting-value">
{{input name="label" value=field.label}}
<Input
name="label"
@value={{this.field.label}}
/>
</div>
</div>
@ -22,7 +25,10 @@
<div class="setting-value">
<span>{{i18n "admin.wizard.field.required_label"}}</span>
{{input type="checkbox" checked=field.required}}
<Input
@type="checkbox"
@checked={{this.field.required}}
/>
</div>
</div>
@ -31,7 +37,10 @@
<label>{{i18n "admin.wizard.field.description"}}</label>
</div>
<div class="setting-value">
{{textarea name="description" value=field.description}}
<Textarea
name="description"
@value={{this.field.description}}
/>
</div>
</div>
@ -78,11 +87,12 @@
</div>
<div class="setting-value">
{{input
type="number"
<Input
@type="number"
name="min_length"
value=field.min_length
class="small"}}
@value={{this.field.min_length}}
class="small"
/>
</div>
</div>
@ -92,11 +102,12 @@
</div>
<div class="setting-value">
{{input
type="number"
<Input
@type="number"
name="max_length"
value=field.max_length
class="small"}}
@value={{this.field.max_length}}
class="small"
/>
</div>
</div>
@ -107,9 +118,10 @@
<div class="setting-value">
<span>{{i18n "admin.wizard.field.char_counter_placeholder"}}</span>
{{input
type="checkbox"
checked=field.char_counter}}
<Input
@type="checkbox"
@checked={{this.field.char_counter}}
/>
</div>
</div>
@ -119,10 +131,11 @@
</div>
<div class="setting-value">
{{textarea
<Textarea
name="field_placeholder"
class="medium"
value=field.placeholder}}
@value={{this.field.placeholder}}
/>
</div>
</div>
{{/if}}
@ -134,7 +147,11 @@
</div>
<div class="setting-value">
{{textarea name="preview-template" value=field.preview_template class="preview-template"}}
<Textarea
name="preview-template"
class="preview-template"
@value={{this.field.preview_template}}
/>
</div>
</div>
{{/if}}
@ -146,7 +163,10 @@
</div>
<div class="setting-value">
{{input value=field.file_types class="medium"}}
<Input
@value={{this.field.file_types}}
class="medium"
/>
</div>
</div>
{{/if}}
@ -158,7 +178,11 @@
</div>
<div class="setting-value">
{{input type="number" value=field.limit class="small"}}
<Input
@type="number"
@value={{this.field.limit}}
class="small"
/>
</div>
</div>
{{/if}}
@ -170,7 +194,10 @@
</div>
<div class="setting-value">
{{input value=field.format class="medium"}}
<Input
@value={{this.field.format}}
class="medium"
/>
<label>{{html-safe (i18n "admin.wizard.field.date_time_format.instructions")}}</label>
</div>
</div>
@ -229,9 +256,10 @@
</div>
<div class="setting-value">
{{input
type="checkbox"
checked=field.can_create_tag}}
<Input
@type="checkbox"
@checked={{this.field.can_create_tag}}
/>
</div>
</div>
{{/if}}

Datei anzeigen

@ -3,9 +3,10 @@
<label>{{i18n "admin.wizard.step.title"}}</label>
</div>
<div class="setting-value">
{{input
<Input
name="title"
value=step.title}}
@value={{this.step.title}}
/>
</div>
</div>
@ -51,7 +52,10 @@
<div class="setting-label"></div>
<div class="setting-value force-final">
<h4>{{i18n "admin.wizard.step.force_final.label"}}</h4>
{{input type="checkbox" checked=step.force_final}}
<Input
@type="checkbox"
@checked={{this.step.force_final}}
/>
<span>{{i18n "admin.wizard.step.force_final.description"}}</span>
</div>
</div>
@ -77,7 +81,9 @@
<div class="label">
{{i18n "admin.wizard.step.required_data.not_permitted_message"}}
</div>
{{input value=step.required_data_message}}
<Input
@value={{this.step.required_data_message}}
/>
</div>
{{/if}}
</div>

Datei anzeigen

@ -21,11 +21,12 @@
<div class="input">
{{#if showText}}
{{input
type="text"
value=value
placeholder=(i18n placeholderKey)
change=(action "changeInputValue")}}
<Input
@type="text"
@value={{this.value}}
placeholder={{i18n placeholderKey}}
{{on "change" (action "changeInputValue")}}
/>
{{/if}}
{{#if showComboBox}}

Datei anzeigen

@ -7,7 +7,10 @@
<li>
<span class="setting-title">
<h4>{{i18n (concat "admin.wizard.field.validations." type)}}</h4>
{{input type="checkbox" checked=props.status}}
<Input
@type="checkbox"
@checked={{this.props.status}}
/>
{{i18n "admin.wizard.field.validations.enabled"}}
</span>
<div class="validation-container">
@ -27,7 +30,11 @@
<label>{{i18n "admin.wizard.field.validations.max_topic_age"}}</label>
</div>
<div class="setting-value">
{{input type="number" class="time-n-value" value=props.time_n_value}}
<Input
@type="number"
@value={{this.props.time_n_value}}
class="time-n-value"
/>
{{combo-box
value=(readonly props.time_unit)
content=timeUnits

Datei anzeigen

@ -1,7 +1,7 @@
# frozen_string_literal: true
# name: discourse-custom-wizard
# about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more.
# version: 2.2.19
# version: 2.2.20
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever
# url: https://github.com/paviliondev/discourse-custom-wizard
# contact_emails: development@pavilion.tech