<div class="modal-header">
    <button type="button" class="close closebtn" data-ng-click="vm.cancel()" aria-hidden="true">&times;</button>
    <h1 class="modal-title">
        {{'Edit' | translate}} {{vm.job.name}}
    </h1>    
</div>
<div class="modal-body customModules">
    <div class="container-fluid" style="overflow-y:auto;">
        <form name="myForm">
            <div>
                <label>{{'Enabled' | translate}}</label>
                <div class="form-group">
                    <input type="checkbox" ng-model="vm.job.enabled" />
                </div>
            </div>
            <div>
                <label>{{'Start after' | translate}}</label>
                <div class="form-group">
                    <label for="showFromDateInput" class="checkbox-label-container">
                        <input id="showFromDateInput" type="checkbox" ng-model="vm.job.showFromDatePicker" title="Enable" />
                        Set a specific time of the day
                    </label>
                </div>
                <div class="form-group" ng-if="vm.job.showFromDatePicker" wizdom365-datetime-picker show-date-picker="false" show-time-picker="true" date="vm.job.runFromDateTime"></div>
            </div>
            <div>
                <label>{{'Starting before ' | translate}}</label>
                <div class="form-group">
                    <label for="showToDateInput" class="checkbox-label-container">
                        <input id="showToDateInput" type="checkbox" ng-model="vm.job.showToDatePicker" title="Enable" />
                        Set a specific time of the day
                    </label>
                </div>
                <div class="form-group" ng-if="vm.job.showToDatePicker" wizdom365-datetime-picker show-date-picker="false" show-time-picker="true" date="vm.job.runToDateTime"></div>
            </div>
            <div>
                <label>{{'Interval' | translate}}</label>
                <div class="form-group">
                    <label for="showIntervalPicker" class="checkbox-label-container">
                        <input id="showIntervalPicker" type="checkbox" ng-model="vm.job.showIntervalPicker" title="Enable" />
                        Set a custom interval
                    </label>
                </div>
                <div class="form-group" ng-if="vm.job.showIntervalPicker">
                    <input id="showIntervalPicker" type="number" min="1" value="{{vm.job.intervalInMinutes || null}}" ng-model="vm.job.intervalInMinutes">{{}}</input>
                    <label>{{'minute(s)' | translate}}</label>
                </div>
            </div>
            <div>
                <label>
                    {{ 'Prevent duplicate run' | translate }}
                </label>
                <div class="form-group">
                    <label for="preventDuplicateRun" class="checkbox-label-container">
                        <input id="preventDuplicateRun" type="checkbox" ng-model="vm.job.preventDuplicateRun" title="Enable" />
                        {{ 'Ignore the next scheduled run if the current job instance is still running' | translate }}
                    </label>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="modal-footer">    
    <button class="btn btn-default" type="button" ng-click="vm.cancel()">{{'Cancel' | translate}}</button>
    <button ng-disabled="!myForm.$valid" class="btn btn-primary" type="button" ng-click="vm.ok()">{{'Ok' | translate}}</button>
</div>
