<div bsModal #modal="bs-modal" (onShown)="onShown()" class="modal fade" role="dialog" tabindex="-1" aria-labelledby="modal" aria-hidden="true" [config]="{backdrop: 'static'}">
    <div class="modal-dialog modal-md">

        <div class="modal-content">

            <form *ngIf="active" #userLocationForm="ngForm" novalidate (ngSubmit)="save()">
                <div class="modal-header">
                    <h4 class="modal-title">
                    <span>{{"EditUserLocation" | localize}}</span>
                  </h4>
                  <button type="button" class="close" (click)="close()" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                  </button>          
                </div>

                <div class="modal-body">
                    <div class="form-group">
                    <select class="form-control kt-select2" id="txtLocation" name="txtLocation" data-placeholder="Select Location" tabindex="-1" aria-hidden="true">
                        <option  *ngFor="let location of locations" value="{{location.id}}" [selected]="location.id ===  txtLocation.id">{{location.name}}</option>
                    </select>
                    </div>   
                </div>
                <div class="modal-footer">
                   <button [disabled]="saving" type="button" class="btn btn-secondary btn-elevate btn-pill" (click)="close()">{{"Cancel" | localize}}</button>
                   <button type="submit" class="btn btn-primary btn-elevate btn-pill" [disabled]="!userLocationForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot' | localize)"><i class="fa fa-save"></i> <span>{{"Save" | localize}}</span></button>
                </div>
            </form>
        </div>
    </div>
</div>


