diff options
Diffstat (limited to 'themes/CleanFS/templates/loginbox.tpl')
-rw-r--r-- | themes/CleanFS/templates/loginbox.tpl | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/themes/CleanFS/templates/loginbox.tpl b/themes/CleanFS/templates/loginbox.tpl new file mode 100644 index 0000000..e6df4fb --- /dev/null +++ b/themes/CleanFS/templates/loginbox.tpl @@ -0,0 +1,45 @@ +<form id="login" action="<?php echo Filters::noXSS($baseurl); ?>index.php?do=authenticate" method="post"> +<div id="login_input"> + <input placeholder="<?php echo Filters::noXSS(L('username')); ?>" class="text" type="text" id="lbl_user_name" name="user_name" size="17" maxlength="32" /> + <input placeholder="<?php echo Filters::noXSS(L('password')); ?>" class="password" type="password" id="lbl_password" name="password" size="17" maxlength="100" /> + <label for="lbl_remember"><?php echo Filters::noXSS(L('rememberme')); ?></label> + <input type="checkbox" id="lbl_remember" name="remember_login" /> + <input type="hidden" name="return_to" value="<?php echo Filters::noXSS($_SERVER['REQUEST_URI']); ?>" /> + <input type="submit" value="<?php echo Filters::noXSS(L('login')); ?>" name="login" id="login_button" /> +</div> +<div id="login_links"> + <?php $activeclass = ' class="active" '; ?> + <?php if ($user->isAnon() && $fs->prefs['anon_reg'] && !$fs->prefs['only_oauth_reg']): ?> + <a id="registerlink" + <?php if(isset($_GET['do']) and $_GET['do'] == 'register') echo $activeclass; ?> + href="<?php echo Filters::noXSS(CreateURL('register','')); ?>"><?php echo Filters::noXSS(L('register')); ?></a> + <?php endif; ?> + <?php if ($user->isAnon() && !$fs->prefs['disable_lostpw']): ?> + <?php if ($user->isAnon() && $fs->prefs['user_notify']): ?> + <a id="forgotlink" + <?php if(isset($_GET['do']) and $_GET['do'] == 'lostpw') echo $activeclass; ?> + href="<?php echo Filters::noXSS(CreateURL('lostpw','')); ?>"><?php echo Filters::noXSS(L('lostpassword')); ?></a> + <?php else: ?> + <a id="forgotlink" href="mailto:<?php echo Filters::noXSS(implode(',', $admin_emails)); ?>?subject=<?php echo Filters::noXSS(rawurlencode(L('lostpwforfs'))); ?>&body=<?php echo Filters::noXSS(rawurlencode(L('lostpwmsg1'))); ?><?php echo Filters::noXSS($baseurl); ?><?php echo Filters::noXSS(rawurlencode(L('lostpwmsg2'))); ?><?php + if(isset($_SESSION['failed_login'])): + ?><?php echo Filters::noXSS(rawurlencode($_SESSION['failed_login'])); ?><?php + else: + ?><<?php echo Filters::noXSS(rawurlencode(L('yourusername'))); ?>><?php + endif; + ?><?php echo Filters::noXSS(rawurlencode(L('regards'))); ?>"><?php echo Filters::noXSS(L('lostpassword')); ?></a> + <script type="text/javascript">var link = document.getElementById('forgotlink');link.href=link.href.replace(/#/g,"@");</script> + <?php endif; ?> + <?php endif; ?> +</div> +<?php $return = '&return_to=' . base64_encode($_SERVER['REQUEST_URI']);?> +<div id="login_oauth"> + <?php + if ($fs->prefs['active_oauths']): + $providers = explode(' ', $fs->prefs['active_oauths']); + foreach($providers as $provider): ?> + <a class="btn-<?php echo $provider; ?>" href="index.php?do=oauth&provider=<?php echo $provider . $return; ?>"> + <i class="fa fa-<?php echo $provider; ?>"></i> <?php echo Filters::noXSS(sprintf(L('signinwith'), ucfirst($provider))); ?> + </a> + <?php endforeach; endif;?> +</div> +</form> |