<div class="row">

    {if $updateresult eq 'updateok'}
    <div class="container">
        <div class="alert alert-success"><i class="fa fa-fw fa-check"></i> {$msg_updateok}</div>
    </div>
    {/if}

    {if $renameresult eq 'renameok'}
    <div class="container">
        <div class="alert alert-success"><i class="fa fa-fw fa-check"></i> {$msg_renameok}</div>
    </div>
    {/if}

    {if $createresult eq 'createok'}
    <div class="container">
        <div class="alert alert-success"><i class="fa fa-fw fa-check"></i> {$msg_createok}</div>
    </div>
    {/if}

    {if $prehookrenameresult}
    <div class="container">
        <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-circle"></i> {$msg_hookerror}</div>
        <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookrenameresult}</div>
    </div>
    {/if}

    {if $posthookrenameresult}
    <div class="container">
        <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-circle"></i> {$msg_hookerror}</div>
        <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookrenameresult}</div>
    </div>
    {/if}

    {if $prehookupdateresult}
    <div class="container">
        <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-circle"></i> {$msg_hookerror}</div>
        <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookupdateresult}</div>
    </div>
    {/if}

    {if $posthookupdateresult}
    <div class="container">
        <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-circle"></i> {$msg_hookerror}</div>
        <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookupdateresult}</div>
    </div>
    {/if}

    {if $prehookcreateresult}
    <div class="container">
        <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-circle"></i> {$msg_hookerror}</div>
        <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookcreateresult}</div>
    </div>
    {/if}

    {if $posthookcreateresult}
    <div class="container">
        <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-circle"></i> {$msg_hookerror}</div>
        <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookcreateresult}</div>
    </div>
    {/if}

    <div class="display col-md-6">

        <div class="card mb-3 shadow">
            <div class="card-header text-bg-secondary text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-{$attributes_map.{$card_title}.faclass}"></i>
                    {$entry.{$attributes_map.{$card_title}.attribute}.0}
                </p>
            </div>

            <div class="card-body">

                <div class="container-fluid" data-dn="{$dn}" id="user_attributes">
                {assign var="modulo" value=0}
                {foreach from=$card_items item=item name=items}
                {$attribute=$attributes_map.{$item}.attribute}
                {$type=$attributes_map.{$item}.type}
                {$faclass=$attributes_map.{$item}.faclass}

                {if !({$entry.$attribute.0})}
                    {if $modulo==0}{assign var="modulo" value=1}{else}{assign var="modulo" value=0}{/if}
                    {continue}
                {/if}

                    <div class="row align-items-center p-2{if $smarty.foreach.items.iteration % 2 == $modulo} bg-white{/if}" id="info_{$item}" data-item="{$item}" data-type="{$type}" data-attribute="{$attribute}" data-faclass="{$faclass}" data-index="{$smarty.foreach.items.iteration}">
                    </div>
                {/foreach}
                </div>
            </div>

            <div class="card-footer text-center">
                <a class="btn btn-outline-primary m-1" href="{$refresh_link}"><i class="fa fa-refresh"></i> {$msg_refreshentry}</a>
                {if $use_update}
                <a class="btn btn-outline-success m-1" href="{$edit_link}"><i class="fa fa-edit"></i> {$msg_editentry}</a>
                {/if}
                {if $use_rename}
                <a class="btn btn-outline-secondary m-1" href="{$rename_link}"><i class="fa fa-user-pen"></i> {$msg_renameentry}</a>
                {/if}
                {if $use_delete}
                <button type="button" class="btn btn-outline-danger m-1" data-bs-toggle="modal" data-bs-target="#delete{$dn|sha256}">
                  <i class="fa fa-user-minus"></i> {$msg_deleteentry}
                </button>
                {include 'deletemodal.tpl' dn={$dn}}
                {/if}
            </div>

        </div>

        {if $use_groupmembership}
        <div class="card mb-3 shadow">
            <div class="card-header text-bg-secondary text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-user-group"></i>
                    {$msg_groupmembership}
                </p>
            </div>

            <div class="card-body">
                {if $nb_groups == 0}{$msg_groupmembership_nogroups}{/if}
                {if $nb_groups == 1}{$msg_groupmembership_memberof} 1 {$msg_group}{/if}
                {if $nb_groups > 1}{$msg_groupmembership_memberof} {$nb_groups} {$msg_groups}{/if}
            </div>

            <div class="card-footer text-center">
                <a class="btn btn-outline-success m-1" href="{$groupmembership_link}"><i class="fa fa-users"></i> {$msg_groupmembership_update}</a>
            </div>
        </div>
        {/if}

        <div class="card mb-3 shadow ">
            <div class="card-header text-bg-secondary text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-info-circle"></i>
                    {$msg_accountstatus}
                </p>
            </div>

            <div class="card-body">

                <div class="container-fluid" id="status_attributes">
                {assign var="modulo" value=0}
                {foreach from=$password_items item=item name=status_items}
                {$attribute=$attributes_map.{$item}.attribute}
                {$type=$attributes_map.{$item}.type}
                {$faclass=$attributes_map.{$item}.faclass}

                {if !({$entry.$attribute.0})}
                    {if $modulo==0}{assign var="modulo" value=1}{else}{assign var="modulo" value=0}{/if}
                    {continue}
                {/if}

                    <div class="row align-items-center p-2{if $smarty.foreach.status_items.iteration % 2 == $modulo} bg-white{/if}" id="status_{$item}" data-item="{$item}" data-type="{$type}" data-attribute="{$attribute}" data-faclass="{$faclass}" data-index="{$smarty.foreach.status_items.iteration}" data-start-index="{$smarty.foreach.items.total}">
                    </div>
                {/foreach}
                {if $lockDate}
                    <div class="row align-items-center p-2">
                        <div class="col-md-6 fw-semibold">
                            {$msg_label_pwdaccountlockedtime}
                        </div>
                        <div class="col-md-6">
                            {$lockDate|date_format:{$date_specifiers}|truncate:10000}
                        </div>
                    </div>
                {/if}
                {if {$display_password_expiration_date} and {$ldapExpirationDate}}
                    <div class="row align-items-center p-2">
                        <div class="col-md-6 fw-semibold">
                            {$msg_label_expirationdate}
                        </div>
                        <div class="col-md-6">
                            {$ldapExpirationDate|date_format:{$date_specifiers}|truncate:10000}
                        </div>
                    </div>
                {/if}
                {if $resetAtNextConnection}
                    <div class="row align-items-center p-2">
                        <div class="col-md-6 fw-semibold">
                            {$msg_label_pwdreset}
                        </div>
                        <div class="col-md-6">
                            {$msg_true}
                        </div>
                    </div>
                {/if}
                </div>

            </div>
        </div>

        {if $samba_mode}
        <div class="card mb-3 shadow ">
            <div class="card-header text-bg-secondary text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-info-circle"></i>
                    {$msg_sambaaccountstatus}
                </p>
            </div>

            <div class="card-body">

                <div class="container-fluid" id="sambastatus_attributes">

                {if $sambaPwdLastSet}
                    <div class="row align-items-center p-2">
                        <div class="col-md-6 fw-semibold">
                            {$msg_label_sambaPwdLastSet}
                        </div>
                        <div class="col-md-6">
                            {$sambaPwdLastSet|date_format:{$date_specifiers}|truncate:10000}
                        </div>
                    </div>
                {/if}
                {if $sambaPwdCanChange}
                    <div class="row align-items-center p-2">
                        <div class="col-md-6 fw-semibold">
                            {$msg_label_sambaPwdCanChange}
                        </div>
                        <div class="col-md-6">
                            {$sambaPwdCanChange|date_format:{$date_specifiers}|truncate:10000}
                        </div>
                    </div>
                {/if}
                {if $sambaPwdMustChange}
                    <div class="row align-items-center p-2">
                        <div class="col-md-6 fw-semibold">
                            {$msg_label_sambaPwdMustChange}
                        </div>
                        <div class="col-md-6">
                            {$sambaPwdMustChange|date_format:{$date_specifiers}|truncate:10000}
                        </div>
                    </div>
                {/if}
                {if $sambaKickoffTime}
                    <div class="row align-items-center p-2">
                        <div class="col-md-6 fw-semibold">
                            {$msg_label_sambaKickoffTime}
                        </div>
                        <div class="col-md-6">
                            {$sambaKickoffTime|date_format:{$date_specifiers}|truncate:10000}
                        </div>
                    </div>
                {/if}
                </div>

            </div>
        </div>
        {/if}

    </div>

    <div class="col-md-6">

        {if $use_checkpassword}
        <div class="card mb-3 shadow ">
            <div class="card-header text-bg-secondary text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-check-circle"></i>
                    {$msg_checkpassword}
                </p>
            </div>
    
             <div class="card-body">
    
                 <form id="checkpassword" method="post" action="index.php?page=checkpassword">
                     {if $checkpasswordresult eq 'passwordrequired'}
                     <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_passwordrequired}</div>
                     {/if}
                     {if $checkpasswordresult eq 'passwordinvalid'}
                     <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_passwordinvalid}</div>
                     {/if}
                     {if $checkpasswordresult eq 'passwordok'}
                     <div class="alert alert-success"><i class="fa fa-fw fa-check"></i> {$msg_passwordok}</div>
                     {/if}
                     {if $checkpasswordresult eq 'passwordinhistory'}
                     <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_passwordinhistory}</div>
                     {/if}
                     <input type="hidden" name="dn" value="{$dn}" />
                     <div class="input-group mb-3">
                        <span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
                        {if $fake_password_inputs}
                            <input type="text" name="currentpassword" id="currentpassword" autocomplete="current-password" class="form-control fake-password" placeholder="{$msg_currentpassword}" />
                        {else}
                            <input type="password" name="currentpassword" id="currentpassword" autocomplete="current-password" class="form-control" placeholder="{$msg_currentpassword}" />
                        {/if}
                     </div>
                     <button type="submit" class="btn btn-success">
                        <i class="fa fa-fw fa-check-square-o"></i> {$msg_submit}
                     </button>
                </form>
            </div>
        </div>
        {/if}

        {if $use_resetpassword}
        <div class="card mb-3 shadow">
            <div class="card-header text-bg-secondary text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-repeat"></i>
                    {$msg_resetpassword}
                </p>
            </div>

             <div class="card-body">

                 <form id="resetpassword" method="post" action="index.php?page=resetpassword">
                     {if $resetpasswordresult eq 'passwordrequired'}
                     <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_passwordrequired}</div>
                     {elseif $resetpasswordresult eq 'passwordrefused'}
                     <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_passwordrefused}</div>
                     {elseif $resetpasswordresult eq 'passwordchanged'}
                     <div class="alert alert-success"><i class="fa fa-fw fa-check"></i> {$msg_passwordchanged}</div>
                     {elseif $resetpasswordresult eq ''}
                     {else}
                     <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_resetpasswordresult}</div>
                     {/if}
                     {if $prehookresult}
                     <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookresult}</div>
                     {/if}
                     {if $posthookresult}
                     <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookresult}</div>
                     {/if}
                     {if $pwd_show_policy !== "never" and $pwd_show_policy_pos === 'above'}
                        {include file="policy.tpl"}
                     {/if}
                     <input type="hidden" name="dn" value="{$dn}" />
                     <div class="input-group mb-3">
                        <span class="input-group-text"><i class="fa fa-fw fa-lock"></i></span>
                        {if $fake_password_inputs}
                           <input type="text" name="newpassword" id="newpassword" autocomplete="new-password" class="form-control fake-password" placeholder="{$msg_newpassword}" />
                        {else}
                           <input type="password" name="newpassword" id="newpassword" autocomplete="new-password" class="form-control" placeholder="{$msg_newpassword}" />
                        {/if}
                     </div>
                     {if $use_resetpassword_resetchoice}
                     <div class="form-check form-switch mb-3">
                       <input class="form-check-input" type="checkbox" role="switch" name="pwdreset" id="pwdresetcheckbox"{if $resetpassword_reset_default} checked{/if} value="true" >
                       <label class="form-check-label" for="pwdresetcheckbox">{$msg_forcereset}</label>
                     </div>
                     {else}
                         {if $resetpassword_reset_default}
                         <input type="hidden" name="pwdreset" value="true" />
                         {else}
                         <input type="hidden" name="pwdreset" value="false" />
                         {/if}
                     {/if}
                     <button type="submit" class="btn btn-success">
                        <i class="fa fa-fw fa-check-square-o"></i> {$msg_submit}
                     </button>
                     {if $pwd_show_policy !== "never" and $pwd_show_policy_pos === 'below'}
                        {include file="policy.tpl"}
                     {/if}
                </form>
            </div>
        </div>
        {/if}

        {if $show_lockstatus}
        {if $isLocked}
        <div class="card mb-3 shadow border-danger">
            <div class="card-header text-bg-danger text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-exclamation-triangle"></i>
                    {$msg_accountlocked}
                </p>
            </div>

             <div class="card-body">
                {if $prehooklockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehooklockresult}</div>
                {/if}
                {if $posthooklockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthooklockresult}</div>
                {/if}
                {if $prehookunlockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookunlockresult}</div>
                {/if}
                {if $posthookunlockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookunlockresult}</div>
                {/if}
                {if $unlockDate}
                <p>{$msg_unlockdate} {$unlockDate|date_format:{$date_specifiers}}</p>
                {/if}
                {if $use_unlockaccount}
                {if $unlockaccountresult eq 'ldaperror'}
                <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_accountnotunlocked}</div>
                {/if}
                {if $use_unlockcomment}
                    <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#commentModalunlock{$dn|sha256}">
                        <i class="fa fa-fw fa-unlock me-2"></i>{$msg_unlockaccount}
                        <i class="fa fa-fw fa-info-circle text-body-tertiary ms-2" title="{$msg_comment_needed}"></i>
                    </button>
                    <div id="unlockcommentbox">
                    </div>
                {else}
                    <form id="unlockaccount" method="post" action="index.php?page=unlockaccount">
                    <input type="hidden" name="dn" value="{$dn}" />
                        <button type="submit" class="btn btn-success">
                            <i class="fa fa-fw fa-unlock"></i> {$msg_unlockaccount}
                        </button>
                    </form>
                {/if}
                {/if}
            </div>
        </div>
        {/if}

        {if !$isLocked}
        <div class="card mb-3 shadow border-success">
            <div class="card-header text-bg-success text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-check-square-o"></i>
                    {$msg_accountunlocked}
                </p>
            </div>

            {if $use_lockaccount || $prehooklockresult || $posthooklockresult || $prehookunlockresult || $posthookunlockresult}
            <div class="card-body">
                {if $prehooklockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehooklockresult}</div>
                {/if}
                {if $posthooklockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthooklockresult}</div>
                {/if}
                {if $prehookunlockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookunlockresult}</div>
                {/if}
                {if $posthookunlockresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookunlockresult}</div>
                {/if}
                {if $lockaccountresult eq 'ldaperror'}
                    <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_accountnotlocked}</div>
                {/if}
                {if $use_lockcomment}
                    <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#commentModallock{$dn|sha256}">
                        <i class="fa fa-fw fa-lock me-2"></i>{$msg_lockaccount}
                        <i class="fa fa-fw fa-info-circle text-body-tertiary ms-2" title="{$msg_comment_needed}"></i>
                    </button>
                    <div id="lockcommentbox">
                    </div>
                {else}
                    <form id="lockaccount" method="post" action="index.php?page=lockaccount">
                    <input type="hidden" name="dn" value="{$dn}" />
                        <button type="submit" class="btn btn-success">
                            <i class="fa fa-fw fa-lock"></i> {$msg_lockaccount}
                        </button>
                    </form>
                {/if}
            </div>
            {/if}
        </div>
        {/if}
        {/if}

        {if $show_expirestatus}
        {if $isExpired}
        <div class="card mb-3 shadow border-danger">
            <div class="card-header text-bg-danger text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-exclamation-triangle"></i>
                    {$msg_passwordexpired}
                </p>
            </div>
        </div>
        {/if}
        {/if}

        {if $show_enablestatus}
        {if $isAccountEnabled}
        <div class="card mb-3 shadow border-success">
            <div class="card-header text-bg-success text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-check-square-o"></i>
                    {$msg_accountenabled}
                </p>
            </div>
            {if $use_disableaccount || $prehookenableresult || $posthookenableresult || $prehookdisableresult || $posthookdisableresult}
            <div class="card-body">
                {if $disableaccountresult eq 'ldaperror' or $disableaccountresult eq 'actionforbidden'}
                <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_accountnotdisabled}</div>
                {/if}
                {if $prehookenableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookenableresult}</div>
                {/if}
                {if $posthookenableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookenableresult}</div>
                {/if}
                {if $prehookdisableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookdisableresult}</div>
                {/if}
                {if $posthookdisableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookdisableresult}</div>
                {/if}
                {if $use_disablecomment}
                    <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#commentModaldisable{$dn|sha256}">
                        <i class="fa fa-fw fa-user-slash me-2"></i>{$msg_disableaccount}
                        <i class="fa fa-fw fa-info-circle text-body-tertiary ms-2" title="{$msg_comment_needed}"></i>
                    </button>
                    <div id="disablecommentbox">
                    </div>
                {else}
                    <form id="disableaccount" method="post" action="index.php?page=disableaccount">
                        <input type="hidden" name="dn" value="{$dn}" />
                        <button type="submit" class="btn btn-success">
                            <i class="fa fa-fw fa-user-slash"></i> {$msg_disableaccount}
                        </button>
                    </form>
                {/if}
            </div>
            {/if}
        </div>
        {else}
        <div class="card mb-3 shadow border-danger">
            <div class="card-header text-bg-danger text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-exclamation-triangle"></i>
                    {$msg_accountdisabled}
                </p>
            </div>
            {if $use_enableaccount || $prehookenableresult || $posthookenableresult || $prehookdisableresult || $posthookdisableresult}
            <div class="card-body">
                {if $enableaccountresult eq 'ldaperror' or $enableaccountresult eq 'actionforbidden'}
                <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_accountnotenabled}</div>
                {/if}
                {if $prehookenableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookenableresult}</div>
                {/if}
                {if $posthookenableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookenableresult}</div>
                {/if}
                {if $prehookdisableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookdisableresult}</div>
                {/if}
                {if $posthookdisableresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookdisableresult}</div>
                {/if}
                {if $use_enablecomment}
                    <button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#commentModalenable{$dn|sha256}">
                        <i class="fa fa-fw fa-user-check me-2"></i>{$msg_enableaccount}
                        <i class="fa fa-fw fa-info-circle text-body-tertiary ms-2" title="{$msg_comment_needed}"></i>
                    </button>
                    <div id="enablecommentbox">
                    </div>
                {else}
                    <form id="disableaccount" method="post" action="index.php?page=enableaccount">
                        <input type="hidden" name="dn" value="{$dn}" />
                        <button type="submit" class="btn btn-success">
                            <i class="fa fa-fw fa-user-check"></i> {$msg_enableaccount}
                        </button>
                    </form>
                {/if}
            </div>
            {/if}
        </div>
        {/if}
        {/if}

        {if $show_validitystatus}
        <div class="card mb-3 shadow border-{if $isAccountValid}success{else}danger{/if}">
            <div class="card-header text-bg-{if $isAccountValid}success{else}danger{/if} text-center">
                <p class="card-title">
                    <i class="fa fa-fw fa-{if $isAccountValid}check-square-o{else}exclamation-triangle{/if}"></i>
                    {if $isAccountValid}{$msg_accountvalid}{else}{$msg_accountnotvalid}{/if}
                </p>
            </div>
            {if $use_updatestarttime || $use_updateendtime || $prehookupdatevalidityresult || $posthookupdatevalidityresult}
            <div class="card-body">
                {if $updatevaliditydatesresult eq 'ldaperror' or $updatevaliditydatesresult eq 'actionforbidden'}
                <div class="alert alert-danger"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_validitydatesnotupdated}</div>
                {/if}
                {if $updatevaliditydatesresult eq 'validitydatesupdated'}
                <div class="alert alert-success"><i class="fa fa-fw fa-check"></i> {$msg_validitydatesupdated}</div>
                {/if}
                {if $prehookupdatevalidityresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$prehookupdatevalidityresult}</div>
                {/if}
                {if $posthookupdatevalidityresult}
                <div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$posthookupdatevalidityresult}</div>
                {/if}
                <form id="updatevaliditydates" method="post" action="index.php?page=updatevaliditydates" class="row g-3">
                        <input type="hidden" name="dn" value="{$dn}" />
                        {if $use_updatestarttime}
                        <div class="col-md-6">
                            <label for="startDate" class="form-label">{$msg_startdate}</label>
                            <input type="date" class="form-control" id="startDate" name="start_date" value="{$startDate|date_format:"%Y-%m-%d"}"/>
                        </div>
                        {/if}
                        {if $use_updateendtime}
                        <div class="col-md-6">
                            <label for="endDate" class="form-label">{$msg_enddate}</label>
                            <input type="date" class="form-control" id="endDate" name="end_date" value="{$endDate|date_format:"%Y-%m-%d"}"/>
                        </div>
                        {/if}
                        <button type="submit" class="btn btn-success">
                            <i class="fa fa-fw fa-calendar-check"></i> {$msg_updatevaliditydates}
                        </button>
                </form>
            </div>
            {/if}
        </div>
        {/if}

   </div>
</div>
