<div class="modal-header">
    <h3 ng-hide="isEdit">
        <span translate>organizations.comp.phones.modal.addPhone</span>
    </h3>
    <h3 ng-show="isEdit">
        <span translate>organizations.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>organizations.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"
                        ng-blur="validateInput()"
                        placeholder="{{ 'organizations.comp.phones.modal.value.placeholder' | translate }}">
                <span ng-if="showPhoneError" translate>common.newOrganization.communicationAccounts.validationMessage</span>
            </div>
            <div class="col-sm-6 form-group">
                <label for="phoneTypes" translate>organizations.comp.phones.modal.type.label</label><span class="required-asterisk">*</span>
                <select id="phoneTypes" class="input-md form-control" ng-required="phone.value" ng-disabled="!phone.value" 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>organizations.comp.phones.modal.setPrimary</label><span class="required-asterisk">*</span><br />
                <label><input type="radio" ng-model="isDefault" ng-value="true">
                    <translate>organizations.comp.phones.modal.yes</translate>
                </label>
                <label ng-hide="hideNoField">
                    <input type="radio" ng-model="isDefault" ng-value="false">
                    <translate>organizations.comp.phones.modal.no</translate>
                </label>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 form-group">
                <label translate>organizations.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>organizations.comp.phones.modal.btnCancel.text</span>
    </button>
    <button class="btn btn-primary" ng-click="onClickOk()" ng-disabled="phoneForm.$invalid">
        <span translate>organizations.comp.phones.modal.btnOk.text</span>
    </button>
</div>