<div class="modal-header">
    <h3 ng-hide="isEdit">
        <span translate>organizations.comp.faxes.modal.addFax</span>
    </h3>
    <h3 ng-show="isEdit">
        <span translate>organizations.comp.faxes.modal.editFax</span>
    </h3>
</div>
<div class="modal-body">
    <form name="faxForm">
        <div class="row">
            <div class="col-sm-6 form-group">
                <label for="faxes" translate>organizations.comp.faxes.modal.value.label</label><span class="required-asterisk">*</span>
                <input id="faxes" type="text" ng-model="fax.value" class="input-md form-control" required="required"
                        ng-blur="validateInput()"
                        placeholder="{{ 'organizations.comp.faxes.modal.value.placeholder' | translate }}">
                <span ng-if="showPhoneError" translate>people.comp.phones.modal.validationMessage</span>
            </div>
            <div class="col-sm-6 form-group">
                <label for="faxTypes" translate>organizations.comp.faxes.modal.type.label</label><span class="required-asterisk">*</span>
                <select id="faxTypes" ng-model="fax.subLookup" class="input-md form-control" required="required"
                        ng-options="item.key as item.value | translate for item in faxTypes"></select>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 form-group">
                <label translate>organizations.comp.faxes.modal.setPrimary</label><span class="required-asterisk">*</span><br />
                <label>
                    <input type="radio" ng-model="isDefault" ng-value="true">
                    <translate>organizations.comp.faxes.modal.yes</translate>
                </label>
                <label ng-hide="hideNoField">
                    <input type="radio" ng-model="isDefault" ng-value="false">
                    <translate>organizations.comp.faxes.modal.no</translate>
                </label>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12 form-group">
                <label translate>organizations.comp.faxes.modal.description</label>
                <mention-textarea ng-model="fax.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.faxes.modal.btnCancel.text</span>
    </button>
    <button class="btn btn-primary" ng-click="onClickOk()" ng-disabled="faxForm.$invalid">
        <span translate>organizations.comp.faxes.modal.btnOk.text</span>
    </button>
</div>