mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
f529296129
no issue
Ember is migrating to `<AngleBracketSyntax />` for component invocation, see https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md
We were in a half-way situation where some templates used angle bracket syntax in some places, this PR updates templates to use the syntax everywhere.
This simplifies the rules for what template code is referring to...
`<Component>` = a component
`{{helper}}` = a helper (or locally assigned handlebars variable)
`{{this.foo}}` = data on the template backing context (a component/controller)
`{{@foo}}` = a named argument passed into the component that the component backing class has not modified (note: this commit does not introduce any named arguments)
- ran codemod https://github.com/ember-codemods/ember-angle-brackets-codemod on the following directories:
- `app/templates`
- `lib/koenig-editor/addon/templates`
- removed positional params from components as angle bracket syntax does not support them
- `gh-feature-flag`
- `gh-tour-item`
- `gh-cm-editor`
- `gh-fullscreen-modal`
- `gh-task-button`
- updates some code that was missed in aaf9f88ebc
to use explicit this
44 lines
1.7 KiB
Handlebars
44 lines
1.7 KiB
Handlebars
<header class="modal-header" data-test-modal="new-integration">
|
|
<h1>New custom integration</h1>
|
|
</header>
|
|
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
|
|
<button class="close" href title="Close" {{action "closeModal"}} {{action (optional this.noop) on="mouseDown"}}>
|
|
{{svg-jar "close"}}
|
|
</button>
|
|
|
|
<div class="modal-body">
|
|
<fieldset>
|
|
<GhFormGroup @errors={{this.integration.errors}} @hasValidated={{this.integration.hasValidated}} @property="name">
|
|
<label for="new-integration-name" class="fw6">Name</label>
|
|
<input type="text"
|
|
value={{this.integration.name}}
|
|
oninput={{action "updateName" value="target.value"}}
|
|
id="new-integration-name"
|
|
class="gh-input mt1"
|
|
placeholder="Integration name..."
|
|
name="integration-name"
|
|
autofocus="autofocus"
|
|
autocapitalize="off"
|
|
autocorrect="off"
|
|
data-test-input="new-integration-name">
|
|
<GhErrorMessage @errors={{this.integration.errors}} @property="name" data-test-error="new-integration-name" />
|
|
</GhFormGroup>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button
|
|
class="gh-btn"
|
|
{{action "closeModal"}}
|
|
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
|
|
{{action (optional this.noop) on="mouseDown"}}
|
|
data-test-button="cancel-new-integration"
|
|
>
|
|
<span>Cancel</span>
|
|
</button>
|
|
<GhTaskButton @buttonText="Create"
|
|
@successText="Created"
|
|
@task={{this.createIntegration}}
|
|
@class="gh-btn gh-btn-green gh-btn-icon"
|
|
data-test-button="create-integration" />
|
|
</div>
|