yeswiki-custom-reseau.s-mar.../templates/loginldap/modal.tpl.html
2023-12-21 19:34:13 +03:00

62 lines
3.4 KiB
HTML
Executable file

<?php if ($connected) : ?>
<a href="#LoginModal" role="button" class="<?php if (empty($nobtn)) { echo 'btn btn-default '.$btnclass.' '; } ?>" data-toggle="modal">
<i class="glyphicon glyphicon-user"></i> <?php echo $user; ?>
</a>
<div class="modal fade" id="LoginModal" tabindex="-1" role="dialog" aria-labelledby="LoginModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 id="LoginModalLabel"><?php echo _t('LOGIN_CONNECTED_AS').' '.$user; ?></h3>
</div>
<div class="modal-body">
<ul class="login-actions">
<?php echo $PageMenuUser; ?>
<li><a href="<?php echo $profileurl; ?>" title="<?php echo _t('LOGIN_MODIFY_USER'); ?>"><?php echo _t('LOGIN_MODIFY_USER'); ?></a></li>
</ul>
</div>
<div class="modal-footer">
<a href="<?php echo $incomingurl; ?>&amp;action=logout" class="btn btn-default" title="<?php echo _t('LOGIN_LOGOUT'); ?>"><?php echo _t('LOGIN_LOGOUT'); ?></a>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div> <!-- /#LoginModal-->
<?php else : ?>
<a href="#LoginModal" role="button" class="<?php if (empty($nobtn)) { echo 'btn btn-default '.$btnclass.' '; } ?>" data-toggle="modal">
<i class="glyphicon glyphicon-user"></i> <?php echo _t('LOGIN_LOGIN'); ?>
</a>
<div class="modal fade" id="LoginModal" tabindex="-1" role="dialog" aria-labelledby="LoginModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 id="LoginModalLabel"><?php echo _t('LOGIN_LOGIN'); ?></h3>
</div>
<div class="modal-body">
<form action="<?php echo $incomingurl; ?>" method="post">
<div class="form-group">
<input type="text" name="name" class="form-control" value="<?php echo ($user ? htmlspecialchars($user, ENT_COMPAT, YW_CHARSET) : ''); ?>" required placeholder="<?php echo _t('LDAP_USERNAME'); ?>">
</div>
<div class="form-group">
<input type="password" class="form-control" name="password" required placeholder="<?php echo _t('LOGIN_PASSWORD'); ?>">
</div>
<?php if (!empty($lostpasswordurl)) { ?>
<small><a href="<?php echo $lostpasswordurl ?>"><?php echo _t('LOGIN_LOST_PASSWORD'); ?></a></small>
<?php } ?>
<div class="checkbox">
<label for="remember-modal">
<input type="checkbox" id="remember-modal" name="remember" value="1" /> <?php echo _t('LOGIN_REMEMBER_ME'); ?>
</label>
</div>
<input type="submit" name="login" class="btn btn-block <?php echo $btnclass; ?> btn-primary" value="<?php echo _t('LOGIN_LOGIN'); ?>">
<input type="hidden" name="action" value="ldaplogin" />
<input type="hidden" name="incomingurl" value="<?php echo $userpage; ?>" />
<input type="hidden" name="remember" value="0" />
</form>
<hr>
<a class="btn btn-block <?php echo $btnclass; ?>" href="<?php echo 'https://reseau.s-mart.fr/?InscriptionSmart' ?>"><?php echo _t('LOGIN_SIGNUP'); ?></a>
</div>
</div>
</div><!-- /.modal-dialog -->
</div> <!-- /#LoginModal-->
<?php endif; ?>