SmartIT_Extensions/BMC/smart-it-full-helix/views/change/risk-questions.html

45 lines
2.3 KiB
HTML

<div class="create-change-wizard__risk_questions_container">
<div loading-spinner if="state.questionsLoading" centered="true" overlay="true"></div>
<div class="ticket-risks__form_invalid" ng-if="form.$invalid">
<i class="icon-exclamation_triangle"></i>
<span>{{'create.ticket.invalid.risk-questions'|i18n}}</span>
</div>
<div class="col-xs-12 create-change-wizard__option-item"
ng-show="ticket.questionDefinitions.length == 0">
<h3>
{{'create.change.wizard.risks.riskQuestions.empty' | i18n}}
</h3>
<input type="text" class="ng-hide" ng-required="(pendingReload || reloadIf) && mode == 'auto'" ng-model="ticket.questionsRequired"/>
</div>
<div class="col-xs-12 create-change-wizard__option-item"
ng-class="{'create-change-wizard__option-item-first-child': $index == 0}"
ng-repeat="question in ticket.questionDefinitions | orderBy:'sortOrder'"
ng-hide="ticket.questionDefinitions.length == 0">
<div ng-switch on="question.format">
<div ng-switch-when="STATIC_MENU">
<h3 tabindex="0" aria-label=" {{question.label}}" ng-class="{'required__label': riskQuestionsEnabled()}" data-required="{{'common.label.required.bracketed' | i18n}}">
{{question.label}}
</h3>
<div class="btn-group create-change-wizard__option-list"
aria-label="{{'create.change.fromScratch.classList' | i18n}}"
role="group">
<input type="text" class="ng-hide" ng-model="question.selectedOption" ng-required="riskQuestionsEnabled()"/>
<button type="button" ng-repeat="option in question.options | orderBy:'order'"
class="btn btn_secondary"
ng-class="{'active': questionOptionSelected(question, option)}"
role="button"
aria-label="{{option.label}}"
ng-click="selectQuestionOption(question, option)"
ng-enter="selectQuestionOption(question, option)"
tabindex="{{riskQuestionsEnabled() ? 0 : -1}}">
{{option.label}}
</button>
</div>
</div>
</div>
</div>
</div>