improved google auth

This commit is contained in:
SJ 2013-09-26 23:20:56 +02:00
parent 74ab6f0193
commit e298d2b9c0
2 changed files with 35 additions and 24 deletions

View File

@ -32,13 +32,12 @@
<div id="logo-lg"><img src="<?php print SITE_URL; ?><?php print SITE_LOGO_LG; ?>" alt="Archive Logo Image" title="Login" /></div>
<form name="login" action="login.php" method="post" class="form-signin">
<h2 class="form-signin-heading"><?php print $text_login; ?></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']; } } ?>" />
<?php if(ENABLE_GOOGLE_LOGIN == 1 && $_SERVER['QUERY_STRING'] == '') { ?>
<div class="info"><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></div>
<?php } else { ?>
<input type="text" class="input-block-level" name="username" placeholder="<?php print $text_email; ?>">
<input type="password" class="input-block-level" name="password" placeholder="<?php print $text_password; ?>">
@ -48,11 +47,18 @@
<?php } ?>
<button class="btn btn-large btn-primary" type="submit" value="<?php print $text_submit; ?>"><?php print $text_submit; ?></button>
<?php } ?>
</form>
<div id="compatibility" class="well well-large"><?php print COMPATIBILITY; ?></div>
<div id="compatibility" class="well well-large">
<?php if(ENABLE_GOOGLE_LOGIN == 1) { ?>
<p><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></p>
<?php } ?>
<p><?php print COMPATIBILITY; ?></p>
</div>
</div>

View File

@ -36,13 +36,12 @@
<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="login.php" method="post" class="form-signin">
<h2 class="form-signin-heading"><?php print $text_login; ?></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']; } } ?>" />
<?php if(ENABLE_GOOGLE_LOGIN == 1 && $_SERVER['QUERY_STRING'] == '') { ?>
<div class="info"><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></div>
<?php } else { ?>
<input type="text" class="input-block-level" name="username" placeholder="<?php print $text_email; ?>">
<input type="password" class="input-block-level bold" name="password" placeholder="<?php print $text_password; ?>">
@ -52,11 +51,17 @@
<?php } ?>
<button class="btn btn-large btn-primary" type="submit" value="<?php print $text_submit; ?>"><?php print $text_submit; ?></button>
<?php } ?>
</form>
<div id="compatibility" class="well well-large"><?php print COMPATIBILITY; ?></div>
<div id="compatibility" class="well well-large">
<?php if(ENABLE_GOOGLE_LOGIN == 1) { ?>
<p><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></p>
<?php } ?>
<p><?php print COMPATIBILITY; ?></p>
</div>
</div>