diff --git a/ghost/admin/app/components/gh-tag-settings-form.js b/ghost/admin/app/components/gh-tag-settings-form.js index 2b359b678f..0176fd7a1c 100644 --- a/ghost/admin/app/components/gh-tag-settings-form.js +++ b/ghost/admin/app/components/gh-tag-settings-form.js @@ -1,4 +1,3 @@ -/* global key */ import Component from '@ember/component'; import Ember from 'ember'; import {computed} from '@ember/object'; @@ -12,8 +11,7 @@ export default Component.extend({ config: service(), tag: null, - - isViewingSubview: false, + scratchTag: null, // Allowed actions setProperty: () => {}, @@ -98,30 +96,6 @@ export default Component.extend({ clearCoverImage() { this.setProperty('featureImage', ''); - }, - - openMeta() { - this.set('isViewingSubview', true); - }, - - closeMeta() { - this.set('isViewingSubview', false); } - }, - - reset() { - this.set('isViewingSubview', false); - if (this.$()) { - this.$('.settings-menu-pane').scrollTop(0); - } - }, - - focusIn() { - key.setScope('tag-settings-form'); - }, - - focusOut() { - key.setScope('default'); } - }); diff --git a/ghost/admin/app/templates/components/gh-tag-settings-form.hbs b/ghost/admin/app/templates/components/gh-tag-settings-form.hbs index 09cc0b0777..f8327a487b 100644 --- a/ghost/admin/app/templates/components/gh-tag-settings-form.hbs +++ b/ghost/admin/app/templates/components/gh-tag-settings-form.hbs @@ -2,54 +2,58 @@
{{#gh-form-group errors=this.tag.errors hasValidated=this.tag.hasValidated property="name"}} - - {{gh-text-input - id="tag-name" - name="name" - value=this.scratchTag.name - tabindex="1" - focus-out=(action 'setProperty' 'name' this.scratchTag.name)}} -

Start with # to create internal tags. Learn - more

- + + {{gh-text-input + id="tag-name" + name="name" + value=this.scratchTag.name + tabindex="1" + focus-out=(action 'setProperty' 'name' this.scratchTag.name) + }} +

+ Start with # to create internal tags + Learn more +

+ {{/gh-form-group}} {{#gh-form-group errors=this.tag.errors hasValidated=this.tag.hasValidated property="slug"}} - - {{gh-text-input - value=this.scratchTag.slug - id="tag-slug" - name="slug" - tabindex="2" - focus-out=(action 'setProperty' 'slug' this.scratchTag.slug)}} - {{gh-url-preview prefix="tag" slug=this.scratchTag.slug tagName="p" classNames="description"}} - + + {{gh-text-input + value=this.scratchTag.slug + id="tag-slug" + name="slug" + tabindex="2" + focus-out=(action 'setProperty' 'slug' this.scratchTag.slug) + }} + {{gh-url-preview prefix="tag" slug=this.scratchTag.slug tagName="p" classNames="description"}} + {{/gh-form-group}} {{#gh-form-group errors=this.tag.errors hasValidated=this.tag.hasValidated property="description"}} - - {{gh-textarea - id="tag-description" - name="description" - class="gh-tag-details-textarea" - tabindex="3" - value=this.scratchTag.description - focus-out=(action 'setProperty' 'description' this.scratchTag.description) - }} - -

Maximum: 500 characters. You’ve used {{gh-count-down-characters this.scratchTag.description 500}}

+ + {{gh-textarea + id="tag-description" + name="description" + class="gh-tag-details-textarea" + tabindex="3" + value=this.scratchTag.description + focus-out=(action 'setProperty' 'description' this.scratchTag.description) + }} + +

Maximum: 500 characters. You’ve used {{gh-count-down-characters this.scratchTag.description 500}}

{{/gh-form-group}}
{{gh-image-uploader-with-preview - image=this.tag.featureImage - text="Upload tag image" - class="gh-tag-image-uploader" - allowUnsplash=true - update=(action "setCoverImage") - remove=(action "clearCoverImage")}} + image=this.tag.featureImage + text="Upload tag image" + class="gh-tag-image-uploader" + allowUnsplash=true + update=(action "setCoverImage") + remove=(action "clearCoverImage") + }}
@@ -57,31 +61,32 @@
{{#gh-form-group errors=this.tag.errors hasValidated=this.tag.hasValidated property="metaTitle"}} - - {{gh-text-input - id="meta-title" - name="metaTitle" - placeholder=this.scratchTag.name - tabindex="4" - value=this.scratchTag.metaTitle - focus-out=(action "setProperty" "metaTitle" this.scratchTag.metaTitle)}} - -

Recommended: 70 characters. You’ve used {{gh-count-down-characters this.scratchTag.metaTitle 70}}

+ + {{gh-text-input + id="meta-title" + name="metaTitle" + placeholder=this.scratchTag.name + tabindex="4" + value=this.scratchTag.metaTitle + focus-out=(action "setProperty" "metaTitle" this.scratchTag.metaTitle) + }} + +

Recommended: 70 characters. You’ve used {{gh-count-down-characters this.scratchTag.metaTitle 70}}

{{/gh-form-group}} {{#gh-form-group errors=this.tag.errors hasValidated=this.tag.hasValidated property="metaDescription"}} - - {{gh-textarea - id="meta-description" - name="metaDescription" - class="gh-tag-details-textarea" - placeholder=this.scratchTag.description - tabindex="5" - value=this.scratchTag.metaDescription - focus-out=(action "setProperty" "metaDescription" this.scratchTag.metaDescription) - }} - -

Recommended: 156 characters. You’ve used {{gh-count-down-characters this.scratchTag.metaDescription 156}}

+ + {{gh-textarea + id="meta-description" + name="metaDescription" + class="gh-tag-details-textarea" + placeholder=this.scratchTag.description + tabindex="5" + value=this.scratchTag.metaDescription + focus-out=(action "setProperty" "metaDescription" this.scratchTag.metaDescription) + }} + +

Recommended: 156 characters. You’ve used {{gh-count-down-characters this.scratchTag.metaDescription 156}}

{{/gh-form-group}}