mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
beb5ae1737
no issue
- This will help with the octane migration and you can still run the lint rules even when they are todos. (Checkout the docs at 158b119667/docs/todos.md
) The good news is any new code will be checked against the recommended config.
- I fixed all the auto fixable things we could get in this PR as well
71 lines
2.9 KiB
Handlebars
71 lines
2.9 KiB
Handlebars
{{#if this.showDeleteLabelModal}}
|
|
<header class="modal-header">
|
|
<h1>Are you sure you want to delete this label?</h1>
|
|
</header>
|
|
<a class="close" href="" role="button" title="Close" {{action "closeModal"}}>{{svg-jar "close"}}<span class="hidden">Close</span></a>
|
|
|
|
<div class="modal-body">
|
|
<p>
|
|
You're about to delete label "<strong>{{this.label.name}}</strong>". This is permanent! We warned you, k?
|
|
</p>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button class="gh-btn" type="button" {{action "closeModal"}}><span>Cancel</span></button>
|
|
<GhTaskButton @buttonText="Delete" @successText="Deleted" @task={{this.deleteLabel}} @class="gh-btn gh-btn-red gh-btn-icon" />
|
|
</div>
|
|
{{else}}
|
|
|
|
<header class="modal-header" data-test-modal="label-form">
|
|
<h1>{{if this.label.isNew "New label" "Edit label"}}</h1>
|
|
</header>
|
|
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
|
|
<button class="close" href title="Close" type="button" {{action "closeModal"}} {{action (optional this.noop) on="mouseDown"}}>
|
|
{{svg-jar "close"}}
|
|
</button>
|
|
|
|
<div class="modal-body">
|
|
<fieldset>
|
|
<GhFormGroup @errors={{this.label.errors}} @hasValidated={{this.label.hasValidated}} @property="name">
|
|
<label for="label-name" class="fw6 dib">Label name</label>
|
|
<GhTextInput
|
|
@id="label-name"
|
|
@value={{this.label.name}}
|
|
@focus-out={{action "validate" "name" target=this.label}}
|
|
data-test-input="label-name"
|
|
/>
|
|
{{#if this.label.errors}}
|
|
<GhErrorMessage @errors={{this.label.errors}} @property="name" data-test-error="label-name" />
|
|
{{/if}}
|
|
</GhFormGroup>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
{{#if this.label.isNew}}
|
|
<button
|
|
class="gh-btn" data-test-button="cancel-label-form" type="button" {{action "closeModal"}}
|
|
{{!-- disable mouseDown so it doesn't trigger focus-out validations --}}
|
|
{{action (optional this.noop) on="mouseDown"}}
|
|
>
|
|
<span>Cancel</span>
|
|
</button>
|
|
{{else}}
|
|
<button
|
|
class="gh-btn gh-btn-red gh-btn-icon" data-test-button="delete-label" type="button" {{on "click" (action "toggleDeleteLabelModal")}}
|
|
{{on "mousedown" (optional this.noop)}}
|
|
>
|
|
<span>{{svg-jar "trash"}} Delete</span>
|
|
</button>
|
|
{{/if}}
|
|
|
|
<GhTaskButton
|
|
@buttonText="Save"
|
|
@runningText="Saving..."
|
|
@successText="Saved"
|
|
@task={{this.saveTask}}
|
|
@taskArgs={{this.label}}
|
|
@class="gh-btn gh-btn-black gh-btn-icon"
|
|
data-test-button="save-label" />
|
|
</div>
|
|
{{/if}} |