<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #clientPreferenceForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="clientPreference.id">{{l("EditClientPreference")}}</span>
                        <span *ngIf="!clientPreference.id">{{l("CreateNewClientPreference")}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" aria-label="Close" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">

                    <div class="form-group">
                        <label for="ClientPreference_PreferenceId">{{l("PreferenceId")}}</label>
                        <select class="form-control kt-select2" id="selectedPreference" data-placeholder="Select City" name="selectPreview" >
                                <option value="0">Select Preference</option>
                                <option *ngFor="let preference of filteredPreferences"  [(value)]="preference.preference.id" [selected]="preference.preference.id==clientPreference.preferenceId">
                                    {{preference.preference.code}}
                                </option>
                        </select>
                    </div>

                    <div class="form-group">
                        <label for="ClientPreference_Value">{{l("Value")}}</label>
                        <input type="text" id="ClientPreference_Value" class="form-control"
                            [(ngModel)]="clientPreference.value" name="Value" />
                    </div>

                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default btn-pill"
                        (click)="close()">{{l("Cancel")}}</button>
                    <button type="submit" class="btn btn-primary blue btn-pill"
                        [disabled]="!clientPreferenceForm.form.valid" [buttonBusy]="saving"
                        [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i>
                        <span>{{l("Save")}}</span></button>
                </div>
            </form>
        </div>
    </div>

</div>