{% verbatim %}
<!-- Select type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'select'">
<div class="form-group select-first">
<h4 for="{{ field.id }} ">{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<select class="form-control" id=" {{ field.id }} " name="{{ field.id }}" ng-model="answerContent[field.id]"
ng-required="field.required">
<option ng-repeat="(key, option) in field.options" value="{{option}}">{{ option }}</option>
</select>
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
<!-- Text -->
<div class="col-md-12 mt-20" ng-if="field.type == 'text'">
<div class="form-group">
<h4> {{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<input type="text" id="userName" class="form-control" name="{{ field.id }}" ng-model="answerContent[field.id]"
ng-required="field.required">
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
<!-- Textarea type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'textLong'">
<div class="form-group">
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<textarea class="form-control" id="{{ field.id }}" name="{{ field.id }}" rows="3" ng-model="answerContent[field.id]"
ng-required="field.required"></textarea>
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
<!-- Date -->
<div class="col-md-12 mt-20" ng-if="field.type == 'dateTime'">
<div class="form-group">
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="icon wb-calendar" aria-hidden="true"></i>
</span>
</div>
<input type="date" class="form-control" name="{{ field.id }}" id="{{ field.id }}"
ng-model="answerContent[field.id]" ng-required="field.required">
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
</div>
<!-- Integer type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'integer' || field.type == 'animal_integer'">
<div class="form-group">
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<input type="number" id="{{ field.id }}" class="form-control" name="{{ field.id }}"
ng-model="answerContent[field.id]" ng-required="field.required">
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
<!-- Decimal type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'decimal'">
<div class="form-group">
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<input type="number" step="any" id="{{ field.id }}" class="form-control" name="{{ field.id}}"
ng-model="answerContent[field.id]" ng-required="field.required">
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
<!-- Checkbox type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'checkBox'">
<div>
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
</div>
<div class="form-check form-check-inline" ng-repeat="(key, option) in field.options">
<input class="form-check-input" type="radio" ng-value="option" name="{{ field.id }}" id="{{ field.id }}"
ng-model="answerContent[field.id]" ng-required="field.required">
<label class="form-check-label" for="{{ option }}">{{ option }}</label>
</div>
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
<!-- Checkbox multiple type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'checkBox_multiple'">
<div>
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
</div>
<div class="form-check form-check-inline" ng-repeat="(key, option) in field.options">
<input class="form-check-input" type="checkbox" ng-value="option" name="{{ field.id }}" id="{{ field.id }}"
ng-model="answerContent[field.id][option]">
<label class="form-check-label" for="inlineCheckbox1">{{ option }}</label>
</div>
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
<!-- Animal type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'animal'">
<div>
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
</div>
<div class="form-check form-check-inline" ng-repeat="(key, option) in field.options">
<input class="form-check-input" type="radio" name="{{ field.id }}" id="{{ field.id }}" ng-value="{{ option.id }}"
ng-model="answerContent[field.id]">
<label class="form-check-h4">
{{ option.name }}
</label>
</div>
<div ng-if="arrayAnswerAnimals[field.id]">
{{ arrayAnswerAnimals[field.id].name }}
<a href="" ng-click="removeAnswerAnimal(field, arrayAnswerAnimals[field.id])">
<i class="icon wb-minus ml-10" style="color:red" aria-hidden="true"></i>
</a>
</div>
<small class="text-danger" id="required-{{ field.id }}"></small>
<!-- Button other -->
<div class="d-flex">
<button type="button" class="btn btn-success mt-20" data-toggle="modal" data-target="#animalModal"
ng-click="addFieldModal(field.id, field.fieldType)">
Autre
</button>
</div>
</div>
<!-- Animals type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'animals'">
<div>
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
</div>
<div class="form-check form-check-inline" ng-repeat="(key, option) in field.options">
<input class="form-check-input" type="checkbox" name="{{ field.id }}" id="{{ field.id }}"
ng-model="answerContent[field.id][option.id]" ng-true-value="{{option.id}}" ng-false-value="null">
<label class="form-check-h4" for="inlineCheckbox1">{{ option.name }}</label>
</div>
<div ng-repeat="animalName in arrayAnswerAnimals[field.id]">
{{ animalName.name }}
<a href="" ng-click="removeAnswerAnimals(field, animalName)">
<i class="icon wb-minus ml-10" style="color:red" aria-hidden="true"></i>
</a>
</div>
<small class="text-danger" id="required-{{ field.id }}"></small>
<!-- Button other -->
<div class="d-flex">
<button type="button" class="btn btn-success mt-20" data-toggle="modal" data-target="#animalsModal"
ng-click="addFieldModal(field.id, field.fieldType)">
Autre
</button>
</div>
</div>
<!-- bigList Type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'bigList'">
<div class="form-group select-first bigList-container">
<h4 for="{{ field.id }} ">{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<select class="form-control select2-bigList" data-plugin="select2"
id=" {{ field.id }} " name="{{ field.id }}" ng-model="answerContent[field.id]"
ng-required="field.required" tabindex="-1" aria-hidden="true"
ng-options="line.id as line.name for line in arrayBigList[field.bigList]">
</select>
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
<!-- bigListMultiple Type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'bigListMultiple'">
<div class="form-group select-first bigList-container">
<h4 for="{{ field.id }} ">{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<select class="form-control select2-bigList" data-plugin="select2" multiple
id=" {{ field.id }} " name="{{ field.id }}" ng-model="answerContent[field.id]"
ng-required="field.required" tabindex="-1" aria-hidden="true"
ng-options="line.id as line.name for line in arrayBigList[field.bigList]">
</select>
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
</div>
<!-- Surface type -->
<div class="col-md-12 mt-20" ng-if="field.type == 'surface'">
<div class="form-group">
<h4>{{ field.title }}<span style="color: red" ng-if="field.required">*</span></h4>
<div class="row">
<div class="col-11">
<input type="number" step="any" id="{{ field.id }}" class="form-control" name="{{ field.id}}"
ng-model="answerContent[field.id]" ng-required="field.required">
<small class="text-danger" id="required-{{ field.id }}"></small>
</div>
<div class="col-1 text-center">
<p>{{field.unit}}</p>
</div>
</div>
</div>
</div>
{% endverbatim %}