<div class="modal-header">
    <h3 ng-hide="isEdit">
        <span translate>admin.application.lookups.config.modal.addEntry</span>
    </h3>
    <h3 ng-show="isEdit">
        <span translate>admin.application.lookups.config.modal.editEntry</span>
    </h3>
</div>
<div class="modal-body">
    <form name="lookupEntryForm">
    <div class="row">
        <div class="col-sm-4 form-group">
            <label for="Key" translate>admin.application.lookups.config.data.key</label><span class="required-asterisk">*</span>
            <input id="key" type="text" ng-model="entry.key" class="input-md form-control" required="required"
                   placeholder="{{ 'admin.application.lookups.config.modal.key.placeholder' | translate }}" ng-readonly="isEdit">
        </div>
        <div class="col-sm-4 form-group">
            <label for="Value" translate>admin.application.lookups.config.data.value</label><span class="required-asterisk">*</span>
            <!-- TODO: select from existing labels modal form -->
            <input id="value" type="text" ng-model="entry.value" class="input-md form-control" required="required"
                   placeholder="{{ 'admin.application.lookups.config.modal.value.placeholder' | translate }}" ng-click="pickLabel()">
        </div>
        <div class="col-sm-4 form-group">
            <label for="Description" translate>admin.application.lookups.config.data.description</label>
            <input id="description" type="text" ng-model="entry.description" class="input-md form-control"
                   placeholder="{{ 'admin.application.lookups.config.modal.description.placeholder' | translate }}">
        </div>
    </div>
    <div class="row" ng-if="isDefaultEnabled">
        <div class="col-sm-12">
            <label><span translate>admin.application.lookups.config.modal.setPrimary</span></label><br/>
            <label>
                <input type="radio" ng-model="entry.primary" ng-value="true">
                <translate>admin.application.lookups.config.modal.yes</translate>
            </label>
            <label ng-hide="hideNoField">
                <input type="radio" ng-model="entry.primary" ng-value="false">
                <translate>admin.application.lookups.config.modal.no</translate>
            </label>
        </div>
    </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-secondary" ng-click="onClickCancel()">
        <span translate>admin.application.lookups.config.modal.btnCancel.text</span>
    </button>
    <button class="btn btn-primary" ng-click="onClickOk()" ng-disabled="lookupEntryForm.$invalid">
        <span translate>admin.application.lookups.config.modal.btnOk.text</span>
    </button>
</div>
