<div class="modal-header">
    <button type="button" class="close closebtn" data-ng-click="cancel()" aria-hidden="true">&times;</button>
    <h1 class="modal-title">{{'Canteen' | translate}}</h1>
</div>
<div class="modal-body">
    <form>
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="control-label">{{'Template' | translate}}</label>
                        <wizdom365-template-picker template-url="data.templateUrl" directory-path="CanteenMenu/Templates/ViewTemplates"></wizdom365-template-picker>
                    </div>
                    <div class="form-group">
                        <label class="control-label location-type-label">{{'Cafeteria selection' | translate}}</label>
                        <div class="radio">
                            <label><input type="radio" name="location" value="userSelectable" ng-model="canteenSelectionType" />{{"The user can change cafeteria" | translate}}</label>
                        </div>
                        <div class="radio">
                            <label><input type="radio" name="location" value="fixed" ng-model="canteenSelectionType" ng-selected="true" />{{'Fixed cafeteria for this webpart' | translate}}</label>
                        </div>                        
                        <div ng-if="canteenSelectionType=='fixed'">
                            <label>{{'Select cafeteria' | translate}}:</label>
                            <select class="form-control" ng-model="data.fixedCanteen" ng-options="canteen as canteen.title for canteen in canteens"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" ng-model="data.allowWeekendSelection" />
                                {{"Allow weekend selection" | translate}}
                            </label>
                        </div>
                        <label class="control-label">{{'Printing' | translate}}</label>
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" ng-model="data.alwaysShowPrintIcon" />
                                {{"Show print icon for all users" | translate}}
                            </label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-success wiz-btn-padding" ng-click="updateConfig();">{{'Save' | translate}}</button>
    <button class="btn btn-default wiz-btn-padding" ng-disabled="loading" ng-click="cancel();">{{"Cancel" | translate}}</button>
</div>