2019-08-31 20:51:14 -07:00
|
|
|
{{! template-lint-disable }}
|
|
|
|
{{!-- template lint is running into a strange non-templating error on this file. Temporary measure --}}
|
|
|
|
<form {{action "onUpdateDeprecation" on="submit"}}>
|
|
|
|
|
|
|
|
<div class="entity-deprecation__toggle-header">
|
|
|
|
<p class="entity-deprecation__toggle-header__label">
|
2020-08-26 15:44:50 -07:00
|
|
|
Is this {{this.entityName}} deprecated?
|
2019-08-31 20:51:14 -07:00
|
|
|
</p>
|
|
|
|
{{input
|
2020-08-26 15:44:50 -07:00
|
|
|
id=(concat this.entityName "-is-deprecated")
|
2019-08-31 20:51:14 -07:00
|
|
|
type="checkbox"
|
2020-08-26 15:44:50 -07:00
|
|
|
title=(concat "Is this " this.entityName " deprecated?")
|
2019-08-31 20:51:14 -07:00
|
|
|
class="toggle-switch toggle-switch--light"
|
2020-08-26 15:44:50 -07:00
|
|
|
checked=(readonly this.isDeprecatedAlias)
|
2019-08-31 20:51:14 -07:00
|
|
|
change=(action "toggleDeprecatedStatus")
|
|
|
|
}}
|
2020-08-26 15:44:50 -07:00
|
|
|
<label for="{{this.entityName}}-is-deprecated" class="toggle-button">
|
2019-08-31 20:51:14 -07:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2020-08-26 15:44:50 -07:00
|
|
|
{{#if this.isDeprecatedAlias}}
|
2019-08-31 20:51:14 -07:00
|
|
|
|
2019-09-04 21:46:02 -07:00
|
|
|
<MediumEditor
|
2019-08-31 20:51:14 -07:00
|
|
|
class="entity-deprecation__note-editor"
|
2020-08-26 15:44:50 -07:00
|
|
|
@value={{this.deprecationNoteAlias}}
|
|
|
|
@options={{this.editorOptions}}
|
|
|
|
@onInput={{action (mut this.deprecationNoteAlias)}} />
|
2019-08-31 20:51:14 -07:00
|
|
|
|
2020-08-26 15:44:50 -07:00
|
|
|
<h4 class="dataset-deprecation__header">When should this {{this.entityName}} be decommissioned?</h4>
|
2019-08-31 20:51:14 -07:00
|
|
|
|
|
|
|
{{#basic-dropdown as |dropdown|}}
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
placeholder="Enter Date"
|
|
|
|
data-ebd-id="{{dropdown.uniqueId}}-trigger"
|
|
|
|
class="entity-deprecation__cal-input-trigger"
|
2020-08-26 15:44:50 -07:00
|
|
|
value={{if this.decommissionTimeAlias (moment-format this.decommissionTimeAlias 'DD-MMM-YYYY')}}
|
2019-08-31 20:51:14 -07:00
|
|
|
onclick={{dropdown.actions.toggle}}
|
|
|
|
readonly>
|
|
|
|
|
|
|
|
{{#dropdown.content class="entity-deprecation__cal-dropdown"}}
|
|
|
|
<PowerCalendar
|
2019-09-04 21:46:02 -07:00
|
|
|
class="entity-deprecation__decommission-calendar"
|
2020-08-26 15:44:50 -07:00
|
|
|
@selected={{this.selectedDate}}
|
|
|
|
@center={{this.centeredDate}}
|
2019-08-31 20:51:14 -07:00
|
|
|
@onSelect={{action "onDecommissionDateChange" value="date"}}
|
2020-08-26 15:44:50 -07:00
|
|
|
@onCenterChange={{action (mut this.centeredDate) value="date"}} as |calendar|>
|
2019-08-31 20:51:14 -07:00
|
|
|
|
|
|
|
<nav class="ember-power-calendar-nav">
|
|
|
|
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="ember-power-calendar-nav-control"
|
|
|
|
onclick={{action calendar.actions.moveCenter -1 'month'}}>
|
|
|
|
<
|
|
|
|
</button>
|
|
|
|
<div class="ember-power-calendar-nav-title">
|
|
|
|
{{moment-format calendar.center 'MMMM YYYY'}}
|
|
|
|
</div>
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="ember-power-calendar-nav-control"
|
|
|
|
onclick={{action calendar.actions.moveCenter 1 'month'}}>
|
|
|
|
>
|
|
|
|
</button>
|
|
|
|
</nav>
|
|
|
|
|
2020-08-26 15:44:50 -07:00
|
|
|
<calendar.Days @minDate={{this.minSelectableDecommissionDate}}/>
|
2019-08-31 20:51:14 -07:00
|
|
|
|
|
|
|
</PowerCalendar>
|
|
|
|
{{/dropdown.content}}
|
|
|
|
{{/basic-dropdown}}
|
|
|
|
|
2020-08-26 15:44:50 -07:00
|
|
|
<p class="entity-decommission-date {{unless this.decommissionTimeAlias 'entity-decommission-date--required'}}">
|
|
|
|
{{#unless this.decommissionTimeAlias}}
|
2019-08-31 20:51:14 -07:00
|
|
|
Please specify a date when this {{entityName}} will be decommissioned
|
|
|
|
{{/unless}}
|
|
|
|
|
|
|
|
<strong>
|
2020-08-26 15:44:50 -07:00
|
|
|
{{if this.decommissionTimeAlias (concat 'Will be decommissioned on ' (moment-format this.decommissionTimeAlias 'MMMM DD YYYY')) ''}}
|
2019-08-31 20:51:14 -07:00
|
|
|
</strong>
|
|
|
|
</p>
|
2020-08-26 15:44:50 -07:00
|
|
|
|
|
|
|
<span>
|
|
|
|
{{input
|
|
|
|
type="checkbox"
|
|
|
|
name="deprecated.acknowledge"
|
|
|
|
id="acknowledge-deprecation"
|
|
|
|
checked=(readonly this.isDeprecationAcknowledged)
|
|
|
|
change=(action "onAcknowledgeDeprecationNotice")}}
|
|
|
|
|
|
|
|
<label for="acknowledge-deprecation">
|
|
|
|
{{partial deprecationAcknowledgementTemplate}}
|
|
|
|
</label>
|
|
|
|
</span>
|
|
|
|
|
2019-08-31 20:51:14 -07:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
<div class="entity-deprecation__actions">
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
class="nacho-button--large nacho-button--secondary"
|
2020-08-26 15:44:50 -07:00
|
|
|
disabled={{and this.isDeprecatedAlias (or (not this.decommissionTimeAlias) (not this.isDeprecationAcknowledged))}}>
|
2019-08-31 20:51:14 -07:00
|
|
|
Update Deprecation Status
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
2020-08-26 15:44:50 -07:00
|
|
|
{{yield}}
|