77afc0d9fa
This refactors references to values in templates from `{{foo}}` to either `{{this.foo}}` if it's a property of backing JavaScript class or `{{@foo}}` if it's passed in on invocation. You could find more details on this change in Ember docs: - [required `this` in templates](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_required-this-in-templates) - [named arguments](https://guides.emberjs.com/release/upgrading/current-edition/templates/#toc_named-arguments) While doing this I noticed that `<PollEvaluationSummaryOption>` component could be easily refactored to a template-only component. Done it as part of this pull request even so it's technically not related.
37 lines
No EOL
1.1 KiB
Handlebars
37 lines
No EOL
1.1 KiB
Handlebars
{{#let @form as |form|}}
|
|
<form.element
|
|
@label={{t "create.options.dates.label"}}
|
|
@property="options"
|
|
data-test-form-element-for="days"
|
|
as |el|
|
|
>
|
|
<div
|
|
class="
|
|
form-control
|
|
cr-h-auto
|
|
cr-pr-validation
|
|
{{if (eq el.validation "error") "is-invalid"}}
|
|
{{if (eq el.validation "success") "is-valid"}}
|
|
"
|
|
>
|
|
<div class="row">
|
|
<div class="col-12 col-md-6">
|
|
<InlineDatepicker
|
|
@center={{this.calendarCenter}}
|
|
@selectedDays={{this.selectedDays}}
|
|
@onCenterChange={{action (mut this.calendarCenter) value="moment"}}
|
|
@onSelect={{action "daysSelected"}}
|
|
/>
|
|
</div>
|
|
<div class="col-md-6 cr-hide-on-mobile">
|
|
<InlineDatepicker
|
|
@center={{this.calendarCenterNext}}
|
|
@selectedDays={{this.selectedDays}}
|
|
@onCenterChange={{action (mut this.calendarCenter) value="moment"}}
|
|
@onSelect={{action "daysSelected"}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form.element>
|
|
{{/let}} |