<div class="modal-header">
    <button type="button" class="close closebtn" data-ng-click="cancel()" aria-hidden="true">&times;</button>
    <h1 class="modal-title">{{'Edit webpart' | 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">{{'Ticket overview refresh interval (seconds)' | translate}}</label>
                        <input type="number" min="1" step="1" class="form-control" ng-model="vm.webpartProperties.refreshInterval"/>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Service Desks (use ctrl to select multiple instances)' | translate}}</label>
                        <select multiple="multiple" type="number" class="form-control" size="3" ng-model="vm.webpartProperties.instanceIds" ng-options="helpdesk.id as (helpdesk.id + '. ' + helpdesk.name) for helpdesk in vm.helpdesks"></select>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Show ticket template' | translate}}</label>
                        <wizdom365-template-picker template-url="vm.webpartProperties.showTicketTemplateUrl" directory-path="Helpdesk/Templates/ViewTemplates/ViewTicket"></wizdom365-template-picker>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Ticket overview template' | translate}}</label>
                        <wizdom365-template-picker template-url="vm.webpartProperties.overviewTemplateUrl" directory-path="Helpdesk/Templates/ViewTemplates/ViewTickets"></wizdom365-template-picker>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Service Desk overview template' | translate}}</label>
                        <wizdom365-template-picker template-url="vm.webpartProperties.helpdeskOverviewTemplateUrl" directory-path="Helpdesk/Templates/ViewTemplates/ViewServicedesk"></wizdom365-template-picker>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Create ticket template' | translate}}</label>
                        <wizdom365-template-picker template-url="vm.webpartProperties.createTicketTemplateUrl" directory-path="Helpdesk/Templates/ViewTemplates/CreateTicket"></wizdom365-template-picker>
                    </div>
                    <div class="form-group">
                        <label class="control-label">{{'Display mode' | translate}}</label>
                        <div class="radio">
                            <label>
                                <input type="radio" ng-model="vm.webpartProperties.displayMode" ng-value="'supporter'">
                                {{'Show all templates as supporter' | translate}}
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio" ng-model="vm.webpartProperties.displayMode" ng-value="'user'">
                                {{'Show all templates as user' | translate}}
                            </label>
                        </div>
                        <div class="radio">
                            <label>
                                <input type="radio"  ng-model="vm.webpartProperties.displayMode" ng-value="null">
                                {{'Show templates according to users role' | translate}}
                            </label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="modal-footer">
    <button class="btn btn-success wiz-btn-padding" ng-click="save()">{{'Save' | translate}}</button>
    <button class="btn btn-default wiz-btn-padding" ng-disabled="loading" ng-click="cancel();">{{"Cancel" | translate}}</button>
</div>