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

        <div class="modal-content">

            <form #routeCreateForm="ngForm" role="form" class="form-validation"
                *ngIf="active">
                <div class="modal-header">
                    <h5 class="modal-title">
                        <span>{{"CreateRoute" | localize}}</span>
                    </h5>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>

                <div class="modal-body">

                    <!-- <div class="form-group">
                        <label for="Location">{{"Location" | localize}} *</label>
                        <select class="form-control kt-select2" id="location" data-placeholder="Select Location"
                            [(ngModel)]="locationInput" name="location" #location="ngModel">
                            <option *ngFor="let location of filteredLocation" [(value)]="location.id">
                                {{location.name}}
                            </option>
                        </select>
                        <validation-messages [formCtrl]="location"></validation-messages>
                    </div>
 -->
                    
                    <div class="form-group">
                        <label for="RouteTemplate">{{"Template" | localize}} *</label>
                        <select class="form-control kt-select2" id="routeTemplate" data-placeholder="Select Template"
                            [(ngModel)]="routeTemplateInput" name="RouteTemplate" #routeTemplate="ngModel">
                            <option *ngFor="let routeTemplate of filteredRouteTemplate" [(value)]="routeTemplate.id">
                                {{routeTemplate.name}}
                            </option>
                        </select>
                        
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" [disabled]="saving" class="btn btn-secondary btn-elevate btn-pill"
                        (click)="close()">{{"Cancel" | localize}}</button>
                    <button type="button" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"
                        class="btn btn-primary btn-elevate btn-pill"
                        [disabled]="!routeCreateForm.form.valid || saving" (click)="save()"><i class="fa fa-save"></i>
                        <span>{{"Save" | localize}}</span></button>
                </div>
            </form>
        </div>
    </div>
</div>