@Master['master.html']
@Model['CreateOrEditOrder']
@Section['Content']
    <form class="mt-3" method="post" action="/Orders/Create5">
        <div class="row mt-2">
            <div class="control-group mb-3">
                <div class="controls">
                    <button type="submit" class="btn btn-primary">Weiter</button>
                </div>
            </div>
        </div>

        @If.OrderValidationInfo.Invalid
        <div class="alert alert-danger" role="alert">Ihre Eingaben sind ungültig, bitte korrigieren!</div>
        @EndIf

        <div class="row mt-2">
            <h3>
                Auftrag @If.IsCreate erstellen @EndIf @IfNot.IsCreate bearbeiten @EndIf
                <small class="text-muted">Schritt 5</small>
            </h3>
        </div>
        <div class="row mt-2">
            <h4>
                <small class="text-muted">@Model.Name</small>
            </h4>
        </div>

        <input type="hidden" id="Id" name="Id" value="@Model.Id">
        <input type="hidden" id="EditMode" name="EditMode" value="@Model.EditMode">
        @If.IsCronJob
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <small id="SchedulerCronHelp" class="form-text text-muted">Bitte Cron-Expression erfassen.</small>
                    <input type="text" class="form-control @If.OrderValidationInfo.SchedulerCronIsInvalid is-invalid @EndIf" id="SchedulerCron" name="SchedulerCron" value="@!Model.SchedulerCron" aria-describedby="SchedulerCronHelp" placeholder="Bitte eingeben.">
                    <p>Siehe auch <a href="https://de.wikipedia.org/wiki/Cron" target="_blank">Wikipedia</a></p>
                </div>
            </div>
        </div>
        @EndIf

        @IfNot.IsCronJob
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <small id="SchedulerIntervalTypeHelp" class="form-text text-muted">Intervall-Typ</small>
                    <select name="SchedulerIntervalType" class="form-control" id="SchedulerIntervalType" placeholder="Scheduler-Intervall-Typ bitte auswählen.">
                        @Each.SchedulerIntervalTypeOptions
                        <option value="@Current.Value" @If.IsSelected selected @EndIf>@Current.Name</option>
                        @EndEach
                    </select>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <small id="SchedulerIntervalValueHelp" class="form-text text-muted">Intervall-Wert</small>
                    <input type="number" class="form-control @If.OrderValidationInfo.SchedulerIntervalValueIsInvalid is-invalid @EndIf" id="SchedulerIntervalValue" name="SchedulerIntervalValue" value="@!Model.SchedulerIntervalValue" min="1" max="9999" aria-describedby="SchedulerIntervalValueHelp" placeholder="Bitte eingeben.">
                </div>
            </div>
        </div>
        @EndIf

        <div class="row mt-2">
            <div class="control-group mb-3">
                <div class="controls">
                    <button type="submit" class="btn btn-primary">Weiter</button>
                </div>
            </div>
        </div>
    </form>
@EndSection
