<div class="card panel-fcs-border shadow-sm">
    <div class="card-header">
        <div class="row">
            <div class="col-sm-12">
            
                <span class="fcs-card-title h3">
                    [% $user->gettext('Bestätigung der Fälligkeitsänderung') %] (#[% $TicketID %])
                </span>
            
            <span class="text-end">
                <div class="btn-group">
                    <a class="btn btn-outline-secondary" onclick="confirmRequest(1);"><span class="fa fa-circle-check"></span> [% $user->gettext("Akzeptieren")%]</a>
                    <a class="btn btn-outline-secondary" onclick="confirmRequest(0);"><span class="fa fa-times"></span> [% $user->gettext("Ablehnen")%]</a>
                </div>
            </span>
            </div>
        </div>

    </div>
    <div class="card-body">
        <div class="form-horizontal form-label-left">
            [% $user->gettext('Der Fälligkeitstermin des Tickets wurde modifiziert und muss vor der Änderungsdurchführung akzeptiert werden')%]
            <div class="form-group row mb-3">
                <label class="control-label col-sm-4" for="email">[% $user->gettext('Ticket')%]:</label>
                <div class="col-sm-8">
                    <p class="form-control-static"> [% $Title %]</p>
                </div>
            </div>
            <div class="form-group row mb-3">
                <label class="control-label col-sm-4">[% $user->gettext('Beantragter Fälligkeitstermin')%]:</label>
                <div class="col-sm-8">
                    <p class="form-control-static"> [% $DesireDate|date_format:"%d.%m.%Y %H:%M" %]</p>
                </div>
            </div>
            <div class="form-group row mb-3">
                <label class="control-label col-sm-4" >[% $user->gettext('Bisheriger Fälligkeitstermin')%]:</label>
                <div class="col-sm-8">
                    <p class="form-control-static"> [% $OldDesireDate|date_format:"%d.%m.%Y %H:%M" %]</p>
                </div>
            </div>
        </div>
    </div>
</div>


<script>
    function confirmRequest(confirm) {        
        $.post("index.php?module=ticket&event=confirmDesireDateRequestJSON", {confirm: confirm, tid:[% $TicketID  %]}, function () {
                location.reload();            
        });
    }
</script>
