@Master['master.html']
@Model['CreateOrEditOrder']
@Section['Content']
<form class="mt-3" method="post" action="/Orders/Create">
    <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 1</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">
    <div class="row">
        <div class="col">
            <div class="form-group">
                <small id="NameHelp" class="form-text text-muted">Name des Auftrages</small>
                <input type="text" class="form-control @If.OrderValidationInfo.NameIsInvalid is-invalid @EndIf" id="Name" name="Name" value="@!Model.Name" aria-describedby="NameHelp" placeholder="Bitte eingeben.">
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col">
            <div class="form-group">
                <small id="RemarkHelp" class="form-text text-muted">Bemerkung</small>
                <textarea rows="2" class="form-control" id="Remark" name="Remark" aria-describedby="RemarkHelp">@!Model.Remark</textarea>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col">
            <div class="form-group">
                <small id="NameHelp" class="form-text text-muted">Sendeeinstellung auswählen</small>
                <select name="SendConfig" class="form-control" id="SendConfig" placeholder="Sendeeinstellung bitte auswählen.">
                    @Each.SendConfigOptions
                    <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="NameHelp" class="form-text text-muted">Template auswählen</small>
                <select name="Template" class="form-control" id="Template" placeholder="HTML-Template bitte auswählen.">
                    @Each.TemplateOptions
                    <option value="@Current.Value" @If.IsSelected selected @EndIf>@Current.Name</option>
                    @EndEach
                </select>
            </div>
        </div>
    </div>

    <div class="row form-group">
        <div class="col">
            <div class="form-check">
                <input class="form-check-input" type="checkbox" value="True" @If.UseTemplateFromDataSourceFolder checked="checked" @EndIf" name="UseTemplateFromDataSourceFolder" id="UseTemplateFromDataSourceFolder" ">
                <label class="form-check-label" for="UseTemplateFromDataSourceFolder">Template aus dem Bemerkungsfeld des Datenquellen-Ordners holen</label>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col">
            <div class="form-group">
                <small id="NameHelp" class="form-text text-muted">Optionales Master-Template auswählen</small>
                <select name="MasterTemplate" class="form-control" id="MasterTemplate" placeholder="Master-HTML-Template bitte auswählen (optional)">
                    @Each.MasterTemplateOptions
                    <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="ImapEmailAddressHelp" class="form-text text-muted">Art der Datenquelle</small>
                <select name="DataSourceType" class="form-control" id="DataSourceType" Name="DataSourceType" placeholder="Datenquelle bitte auswählen.">
                    @Each.DataSourceOptions
                    <option value="@Current.Value" @If.IsSelected selected @EndIf>@Current.Name</option>
                    @EndEach
                </select>
            </div>
        </div>
    </div>

    <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
