summaryrefslogtreecommitdiffstats
path: root/templates/detailItems/text.html
blob: beccff43645fe7a9c44cb2a5e02f337521211e8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<select ng-if="ctrl.availableOptions.length > 0" ng-model="ctrl.type" ng-model-options="{ debounce: 500 }" ng-change="ctrl.changeType(ctrl.type)" ng-disabled="ctrl.addressBook.readOnly">
	<option ng-repeat="option in ctrl.availableOptions" value="{{option.id}}">{{option.name}}</option>
</select>
<label ng-if="ctrl.availableOptions.length === 0" for="details-{{ctrl.name}}-{{ctrl.index}}">{{ctrl.meta.readableName}}</label>
<input type="text" id="details-{{ctrl.name}}-{{ctrl.index}}" name="{{ctrl.name}}"
	   ng-model="ctrl.data.value" ng-model-options="{ debounce: 500 }"
	   ng-change="ctrl.model.updateContact()" value=""
	   placeholder="{{ctrl.meta.readableName}}"
	   focus-expression="$parent.ctrl.focus === ctrl.name"
	   ng-disabled="ctrl.addressBook.readOnly"
/>
<button ng-click="ctrl.deleteField()" class="icon-delete" title="{{ctrl.t.delete}}" ng-if="!ctrl.addressBook.readOnly"></button>