2016-06-09 03:32:33 +00:00
|
|
|
<div class="textfield field row"
|
|
|
|
ng-click="setActiveField(field._id, index, true)">
|
|
|
|
<div class="col-xs-12 field-title row-fluid" ng-style="{'color': design.colors.questionColor}">
|
|
|
|
<h3 class="col-xs-12">
|
|
|
|
<small class="field-number">
|
|
|
|
{{index+1}}
|
|
|
|
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
|
|
|
|
</small>
|
|
|
|
|
|
|
|
{{field.title}}
|
|
|
|
|
|
|
|
<span class="required-error" ng-show="!field.required">
|
|
|
|
({{ 'OPTIONAL' | translate }})
|
|
|
|
</span>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
<p class="col-xs-12">
|
|
|
|
<small>{{field.description}}</small>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="col-xs-12 field-input">
|
|
|
|
<input ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}"
|
|
|
|
name="{{field.fieldType}}{{index}}"
|
2016-07-06 01:48:25 +00:00
|
|
|
type="{{input_type}}"
|
|
|
|
ng-pattern="validateRegex"
|
|
|
|
placeholder="{{placeholder}}"
|
2016-06-09 03:32:33 +00:00
|
|
|
ng-class="{ 'no-border': !!field.fieldValue }"
|
|
|
|
class="focusOn text-field-input"
|
|
|
|
ng-model="field.fieldValue"
|
|
|
|
ng-model-options="{ debounce: 250 }"
|
|
|
|
value="field.fieldValue"
|
|
|
|
ng-focus="setActiveField(field._id, index, true)"
|
|
|
|
on-enter-or-tab-key="nextField()"
|
|
|
|
on-tab-and-shift-key="prevField()"
|
|
|
|
ng-required="field.required"
|
|
|
|
ng-disabled="field.disabled"
|
2016-11-02 18:30:04 +00:00
|
|
|
aria-describedby="inputError2Status"/ >
|
2016-06-09 03:32:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-12">
|
|
|
|
<div ng-show="forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue " class="alert alert-danger" role="alert">
|
|
|
|
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
|
|
|
|
<span class="sr-only">Error:</span>
|
|
|
|
<span ng-if="field.fieldType == 'email'"> {{ 'ERROR_EMAIL_INVALID' | translate }} </span>
|
|
|
|
<span ng-if="field.validateRegex"> {{ 'ERROR_NOT_A_NUMBER' | translate }} </span>
|
|
|
|
<span ng-if="field.fieldType == 'link'"> {{ 'ERROR_URL_INVALID' | translate }} </span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div class="btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs"
|
|
|
|
style="padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)">
|
|
|
|
<button ng-disabled="!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid"
|
|
|
|
ng-style="{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}"
|
2016-08-23 21:45:59 +00:00
|
|
|
ng-click="nextField()"
|
2016-06-09 03:32:33 +00:00
|
|
|
class="btn col-sm-5 col-xs-5">
|
|
|
|
|
|
|
|
{{ 'OK' | translate }} <i class="fa fa-check"></i>
|
|
|
|
</button>
|
|
|
|
<div class="col-xs-6 col-sm-3" style="margin-top:0.2em">
|
|
|
|
<small style="color:#ddd; font-size:70%">
|
|
|
|
{{ 'ENTER' | translate }}
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|