@Master['master.html']
@Model['IntegrationConfigViewModel']
@Section['Content']
<form class="mt-3" method="post" action="/Config/Integration">

    @If.Unsuccessful
    <div class="alert alert-danger" role="alert">Fehler, bitte Vertec-Berechtigung prüfen (Administrator?)</div>
    @EndIf

    @If.SuccessfulInstalled
    <div class="alert alert-success" role="alert">Vertec-Integration wurde installiert.</div>
    @EndIf

    @If.SuccessfulUninstalled
    <div class="alert alert-success" role="alert">Vertec-Integration wurde deinstalliert.</div>
    @EndIf

    @If.SuccessfulUpdated
    <div class="alert alert-success" role="alert">Vertec-Integration wurde aktualisiert.</div>
    @EndIf

    <div class="row mt-2">
        <h3>
            Vertec - Integration
            <small class="text-muted">@Model.InstalledVersionHumanReadable</small>
        </h3>
    </div>

    <div class="row">
        <div class="col">
            <div class="form-group">
                <input type="text" class="form-control @If.MonkeyUrlIsInvalid is-invalid @EndIf" id="MonkeyUrl" name="MonkeyUrl" value="@!Model.MonkeyUrl" aria-describedby="VertecUrlHelp" placeholder="Bitte eingeben.">
                <small id="MonkeyUrlHelp" class="form-text text-muted">URL des MailMonkey-UIs</small>
            </div>
        </div>
    </div>

    <p><span class="badge badge-secondary">Die Installation der Vertec-Integration benötigt Vertec-Administratorrechte</span></p>
    <div class="row mt-2">
        <div class="col">
            <div class="control-group mb-3">
                <div class="controls">
                    <button type="submit" name="btInstall" value="True" @If.btInstallDisabled disabled @EndIf class="btn btn-primary @If.btInstallDisabled disabled @EndIf">Vertec-Integration installieren</button>
                </div>
            </div>
        </div>
    </div>

    <div class="row mt-2">
        <div class="col">
            <div class="control-group mb-3">
                <div class="controls">
                    <button type="submit" name="btUpdate" value="True" @If.btUpdateDisabled disabled @EndIf class="btn btn-primary @If.btUpdateDisabled disabled @EndIf">Vertec-Integration aktualisieren</button>
                </div>
            </div>
        </div>
    </div>

    <div class="row mt-2">
        <div class="col">
            <div class="control-group mb-3">
                <div class="controls">
                    <button type="submit" name="btDeinstall" value="True" @If.btDeinstallDisabled disabled @EndIf class="btn btn-primary @If.btDeinstallDisabled disabled @EndIf">Vertec-Integration entfernen</button>
                </div>
            </div>
        </div>
    </div>

</form>
@EndSection
