<div class="modal-header">
    <h3 ng-hide="isEdit">
        <span translate>people.comp.phones.modal.addPhone</span>
    </h3>
    <h3 ng-show="isEdit">
        <span translate>people.comp.phones.modal.editPhone</span>
    </h3>
</div>
<div class="modal-body">
    <form name="phoneForm">
        <div class="row">
            <div class="col-sm-6 form-group">
                <label for="phones" translate>people.comp.phones.modal.value.label</label><span class="required-asterisk">*</span>
                <input id="phones" type="text" ng-model="phone.value" class="input-md form-control" required="required"
                        placeholder="{{ 'people.comp.phones.modal.value.placeholder' | translate }}" ng-blur="validateInput()">
                <span ng-if="showPhoneError" translate>common.newPerson.communicationAccounts.validationMessage</span>
            </div>
            <div class="col-sm-6 form-group">
                <label for="phoneTypes" translate>people.comp.phones.modal.type.label</label><span class="required-asterisk">*</span>
                <select ng-required="phone.value" ng-disabled="!phone.value" id="phoneTypes" class="input-md form-control"
                        ng-model="phone.subLookup" ng-init="phone.subLookup = phone.subType"
                        ng-options="item.key as item.value | translate for item in phoneTypes"></select>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 form-group">
                <label translate>people.comp.phones.modal.setPrimary</label><span class="required-asterisk">*</span><br />
                <label>
                    <input type="radio" ng-model="isDefault" ng-value="true">
                    <translate>people.comp.phones.modal.yes</translate>
                </label>
                <label ng-hide="hideNoField">
                    <input type="radio" ng-model="isDefault" ng-value="false">
                    <translate>people.comp.phones.modal.no</translate>
                </label>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 form-group">
                <label translate>people.comp.phones.modal.description</label>
                <mention-textarea ng-model="phone.description" params="params"></mention-textarea>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-secondary" ng-click="onClickCancel()">
        <span translate>people.comp.phones.modal.btnCancel.text</span>
    </button>
    <button class="btn btn-primary" ng-click="onClickOk()" ng-disabled="phoneForm.$invalid">
        <span translate>people.comp.phones.modal.btnOk.text</span>
    </button>
</div>