9c4bd9e669
Ember Bootstrap has changed a lot since the very outdated pre 1.0 release which was used here. Changes are mostly about using composable components and closure actions. Also replaces PhantomJS with Chrome in CI cause PhantomJS is also very outdated and causing test failure not related to any real world issues. Ember CLI has replaced PhantomJS with Chrome in v2.15.1, which is the upfollowing minor release to the version currently used.
94 lines
2.5 KiB
Handlebars
94 lines
2.5 KiB
Handlebars
<div class="participation">
|
|
{{#bs-form
|
|
onSubmit=(action 'submit')
|
|
formLayout='horizontal'
|
|
model=this
|
|
novalidate=true
|
|
as |form|
|
|
}}
|
|
{{form.element
|
|
autofocus=true
|
|
controlType='text'
|
|
label=(t 'poll.input.newUserName.label')
|
|
placeholder=(t 'poll.input.newUserName.placeholder')
|
|
property='name'
|
|
classNames='name'
|
|
}}
|
|
<div class="selections">
|
|
{{#each selections as |selection index|}}
|
|
{{#if isFreeText}}
|
|
{{form.element
|
|
controlType='text'
|
|
label=(if isFindADate
|
|
(moment-format
|
|
selection.labelValue
|
|
(if (eq selection.momentFormat 'day') momentLongDayFormat selection.momentFormat)
|
|
locale=currentLocale
|
|
timeZone=timezone
|
|
)
|
|
selection.labelValue
|
|
)
|
|
model=selection
|
|
property='value'
|
|
}}
|
|
{{else}}
|
|
{{#form.element
|
|
label=(if isFindADate
|
|
(moment-format
|
|
selection.labelValue
|
|
(if (eq selection.momentFormat 'day') momentLongDayFormat selection.momentFormat)
|
|
locale=currentLocale
|
|
timeZone=timezone
|
|
)
|
|
selection.labelValue
|
|
)
|
|
model=selection
|
|
property='value'
|
|
showValidationOn='change'
|
|
useIcons=false
|
|
as |el|
|
|
}}
|
|
{{#each possibleAnswers as |possibleAnswer|}}
|
|
<div class="radio {{possibleAnswer.type}}">
|
|
<label>
|
|
{{radio-button
|
|
value=possibleAnswer.type
|
|
checked=el.value
|
|
}}
|
|
<span class={{possibleAnswer.icon}} aria-hidden="true"></span>
|
|
{{possibleAnswer.label}}
|
|
</label>
|
|
</div>
|
|
{{/each}}
|
|
{{/form.element}}
|
|
{{/if}}
|
|
{{/each}}
|
|
</div>
|
|
|
|
{{form-navigation-buttons
|
|
renderPrevButton=false
|
|
}}
|
|
{{/bs-form}}
|
|
</div>
|
|
|
|
{{#bs-modal
|
|
open=savingFailed
|
|
title=(t 'modal.save-retry.title')
|
|
body=false
|
|
footer=false
|
|
closeButton=false
|
|
autoClose=false
|
|
id='modal-saving-failed'
|
|
as |modal|
|
|
}}
|
|
{{#modal.body}}
|
|
<p>{{t "modal.save-retry.text"}}</p>
|
|
{{/modal.body}}
|
|
{{#modal.footer}}
|
|
{{bs-button
|
|
defaultText=(t 'modal.save-retry.button-retry')
|
|
type='primary'
|
|
onClick=(action 'save')
|
|
}}
|
|
{{/modal.footer}}
|
|
{{/bs-modal}}
|