@Master['master.html']
@Model['CreateOrEditOrder']
@Section['Content']
    <form class="mt-3" method="post" action="/Orders/Create2">
        <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 2</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 form-group">
            <div class="col">
                @If.DataSourceType0
                <small id="FolderIdHelp" class="form-text text-muted">Id des Expression-/Stichwort-/Abfrage- oder SQL-Ordners</small>
                <input type="text" class="form-control @If.OrderValidationInfo.DataSourceFolderIdIsInvalid is-invalid @EndIf" id="DataSourceFolderId" name="DataSourceFolderId" value="@!Model.DataSourceFolderId" aria-describedby="FolderIdHelp" placeholder="Bitte eingeben.">
            </div>
            <div class="col">
                <small id="FolderIdHelp" class="form-text text-muted">&nbsp;</small>
                <a href="vertec://@!Model.DataSourceFolderId"><img src="/static/Vertec.png" title="Ordner mit Vertec-Link öffnen"/></a>
                @EndIf
                @IfNot.DataSourceType0
                <small id="DataSourceOclHelp" class="form-text text-muted">OCL-Expression als Datenquelle</small>
                <textarea rows="1" class="form-control @If.OrderValidationInfo.DataSourceOclIsInvalid is-invalid @EndIf" id="DataSourceOcl" name="DataSourceOcl" aria-describedby="DataSourceOclHelp" placeholder="Bitte eingeben.">@!Model.DataSourceOcl</textarea>
                @EndIf
            </div>
        </div>
        <div class="row form-group">
            <div class="col">
                <small id="DataSourceOclConditionHelp" class="form-text text-muted">OCL-Condition zur Ausführung des Auftrags (leer=wird immer ausgeführt)</small>
                <textarea rows="1" class="form-control" id="DataSourceOclCondition" name="DataSourceOclCondition" aria-describedby="DataSourceOclConditionHelp" placeholder="Bitte eingeben.">@!Model.DataSourceOclCondition</textarea>
            </div>
        </div>
        <div class="row form-group">
            <div class="col">
                <small id="DataSourceOclHelp" class="form-text text-muted">OCL-Condition für einen einzelnen Eintrag der Datenquelle (bei False wird E-Mail nicht generiert)</small>
                <textarea rows="1" class="form-control" id="DataSourceOclSingleObjectCondition" name="DataSourceOclSingleObjectCondition" aria-describedby="DataSourceOclHelp" placeholder="Bitte eingeben.">@!Model.DataSourceOclSingleObjectCondition</textarea>
            </div>
        </div>
        <div class="row form-group">
            <div class="col">
                <small id="SenderEmailOclHelp" class="form-text text-muted">OCL-Expression für die E-Mail-Adresse des Absenders</small>
                <input type="text" class="form-control @If.OrderValidationInfo.SenderEmailOclIsInvalid is-invalid @EndIf" id="SubjectOcl" name="SenderEmailOcl" value="@!Model.SenderEmailOcl" aria-describedby="SenderEmailOclHelp" placeholder="Bitte eingeben.">
            </div>
            <div class="col">
                <small id="SenderNameOclHelp" class="form-text text-muted">OCL-Expression für den Namen des Absenders</small>
                <input type="text" class="form-control @If.OrderValidationInfo.SenderNameOclIsInvalid is-invalid @EndIf" id="SenderNameOcl" name="SenderNameOcl" value="@!Model.SenderNameOcl" aria-describedby="SenderNameOclHelp" placeholder="Bitte eingeben.">
            </div>
        </div>
        <div class="row form-group">
            <div class="col">
                <small id="SubjectOclConditionHelp" class="form-text text-muted">OCL-Expression für den E-Mail-Betreff</small>
                <input type="text" class="form-control @If.OrderValidationInfo.SubjectOclIsInvalid is-invalid @EndIf" id="SubjectOcl" name="SubjectOcl" value="@!Model.SubjectOcl" aria-describedby="SubjectOclConditionHelp" placeholder="Bitte eingeben.">
            </div>
        </div>
        <div class="row form-group">
            <div class="col">
                <small id="RecipientOclHelp" class="form-text text-muted">OCL-Expression für den E-Mail-Empfänger</small>
                <input type="text" class="form-control @If.OrderValidationInfo.RecipientOclIsInvalid is-invalid @EndIf" id="RecipientOcl" name="RecipientOcl" value="@!Model.RecipientOcl" aria-describedby="RecipientOclHelp" placeholder="Bitte eingeben.">
            </div>
        </div>

        <div class="row form-group">
            <div class="col">
                <div class="form-check">
                    <input class="form-check-input" type="checkbox" value="True" @If.SendOnlyOneEmailToTheSameRecipient checked="checked" @EndIf" name="SendOnlyOneEmailToTheSameRecipient" id="SendOnlyOneEmailToTheSameRecipient" ">
                    <label class="form-check-label" for="SendOnlyOneEmailToTheSameRecipient">Maximal eine E-Mail an den gleichen Empfängerkreis senden</label>
                </div>
            </div>
        </div>

        <div class="row form-group">
            <div class="col">
                <small id="RecipientCcOclHelp" class="form-text text-muted">OCL-Expression für den CC-E-Mail-Empfänger (optional)</small>
                <input type="text" class="form-control @If.OrderValidationInfo.RecipientCcOclIsInvalid is-invalid @EndIf" id="RecipientCcOcl" name="RecipientCcOcl" value="@!Model.RecipientCcOcl" aria-describedby="RecipientCcOclHelp" placeholder="Bitte eingeben.">
            </div>
            <div class="col">
                <small id="RecipientBccOclHelp" class="form-text text-muted">OCL-Expression für den BCC-E-Mail-Empfänger (optional)</small>
                <input type="text" class="form-control @If.OrderValidationInfo.RecipientBccOclIsInvalid is-invalid @EndIf" id="RecipientBccOcl" name="RecipientBccOcl" value="@!Model.RecipientBccOcl" aria-describedby="RecipientBccOclHelp" placeholder="Bitte eingeben.">
            </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
