mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
added google authenticator support to the gui
This commit is contained in:
@ -73,7 +73,7 @@
|
||||
<?php } ?>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> <?php if(isset($_SESSION['realname'])) { print $_SESSION['realname']; ?> <?php } ?><b class="caret"></b></a>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> <?php if($realname) { print $realname; ?> <?php } ?><b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<?php if($settings['support_link']) { ?>
|
||||
<li><a href="<?php print $settings['support_link']; ?>" target="_blank" <?php if($settings['text_colour']) { ?> style="color: <?php print $settings['text_colour']; ?>;"<?php } ?>><i class="icon-question-sign"></i> <?php print $text_contact_support; ?></a></li>
|
||||
|
58
webui/view/theme/default/templates/login/ga.tpl
Normal file
58
webui/view/theme/default/templates/login/ga.tpl
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?php if($title_prefix) { print $title_prefix; ?> | <?php } ?><?php print $title; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<?php if(SITE_KEYWORDS) { ?><meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" /><?php } ?>
|
||||
<?php if(SITE_DESCRIPTION) { ?><meta name="description" content="<?php print SITE_DESCRIPTION; ?>" /><?php } ?>
|
||||
<?php if(PROVIDED_BY) { ?><meta name="author" content="<?php print PROVIDED_BY; ?>" /><?php } ?>
|
||||
|
||||
<link href="/view/theme/default/assets/css/metro-bootstrap.css" rel="stylesheet">
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!-- original location: http://html5shim.googlecode.com/svn/trunk/html5.js -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/view/theme/default/assets/js/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- Fav and touch icons -->
|
||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/view/theme/default/assets/ico/apple-touch-icon-144-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/view/theme/default/assets/ico/apple-touch-icon-114-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/view/theme/default/assets/ico/apple-touch-icon-72-precomposed.png">
|
||||
<link rel="apple-touch-icon-precomposed" href="/view/theme/default/assets/ico/apple-touch-icon-57-precomposed.png">
|
||||
<?php if(BRANDING_FAVICON) { ?><link rel="shortcut icon" href="<?php print BRANDING_FAVICON; ?>" /><?php } ?>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="loginpage">
|
||||
|
||||
|
||||
<div id="logincontainer" class="container">
|
||||
<div id="logo-lg"><img src="<?php print SITE_URL; ?><?php print SITE_LOGO_LG; ?>" alt="Archive Logo Image" title="<?php print $text_login; ?>" /></div>
|
||||
|
||||
<form name="login" action="index.php?route=login/ga" method="post" class="form-signin">
|
||||
|
||||
<h2 class="form-signin-heading"><?php print $text_enter_google_authenticator_code; ?></h2>
|
||||
|
||||
<?php if(isset($x)){ ?><p class="alert alert-error lead"><?php print $x; ?></p><?php } ?>
|
||||
<input type="hidden" name="relocation" value="<?php if(isset($_GET['route']) && !preg_match("/^login/", $_GET['route']) ) { if(isset($_SERVER['REDIRECT_URL'])) { print $_SERVER['REDIRECT_URL']; } else { print $_SERVER['QUERY_STRING']; } } ?>" />
|
||||
|
||||
<input type="password" class="input-block-level bold" id="ga_code" name="ga_code" placeholder="<?php print $text_google_authenticator_code; ?>">
|
||||
|
||||
<button class="btn btn-large btn-primary" type="submit" value="<?php print $text_submit; ?>"><?php print $text_submit; ?></button>
|
||||
|
||||
</form>
|
||||
|
||||
<div id="compatibility" class="well well-large">
|
||||
<p><?php print COMPATIBILITY; ?></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php if(TRACKING_CODE) { print TRACKING_CODE; } ?>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -93,6 +93,29 @@
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<form method="post" name="setqr" class="form-horizontal">
|
||||
|
||||
<h4><?php print $text_google_authenticator_settings; ?></h4>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="ga_enabled"><?php print $text_enable; ?></label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" name="ga_enabled" id="ga_enabled" onclick="Piler.toggle_ga();" <?php if($ga['ga_enabled'] == 1) { ?>checked="checked"<?php } ?> />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="ga_secret"><?php print $text_qr_code; ?></label>
|
||||
<div id="QR" class="controls">
|
||||
<?php print $ga['ga_secret']; ?> <a href="#" onclick="Piler.new_qr(); return false;"> <?php print $text_refresh_qr_code; ?></a><br /><img src="qr.php?ts=<?php print time(); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
<?php if(PASSWORD_CHANGE_ENABLED == 1) { ?>
|
||||
|
Reference in New Issue
Block a user