Fixed layout for register.tpl and login.tpl, it now uses also layout.tpl but with a parameter 'no_visible_elements' => 'TRUE'
--HG-- branch : quitta-gsoc-2013
This commit is contained in:
parent
260315d1ef
commit
9f6349843c
4 changed files with 120 additions and 101 deletions
|
@ -49,7 +49,8 @@ class Helpers{
|
||||||
}else{
|
}else{
|
||||||
$inherited = "layout_user.tpl";
|
$inherited = "layout_user.tpl";
|
||||||
}
|
}
|
||||||
$smarty -> display( 'extends:' . $inherited .'|home.tpl' );
|
//extends:' . $inherited .'|register.tpl
|
||||||
|
$smarty -> display( 'register.tpl' );
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create_folders(){
|
public function create_folders(){
|
||||||
|
|
|
@ -17,6 +17,6 @@ if ( isset( $_GET["page"] ) ){
|
||||||
$page = $_GET["page"];
|
$page = $_GET["page"];
|
||||||
}
|
}
|
||||||
//temporary set permission to 1 which = admin mode
|
//temporary set permission to 1 which = admin mode
|
||||||
$return = array('permission' => 1);
|
$return = array('permission' => 1, 'no_visible_elements' => 'TRUE');
|
||||||
|
|
||||||
helpers :: loadTemplate( 'home' , $return );
|
helpers :: loadTemplate( 'register' , $return );
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
|
||||||
<!-- topbar starts -->
|
<!-- topbar starts -->
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
|
@ -102,9 +103,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
|
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
|
||||||
<!-- left menu starts -->
|
<!-- left menu starts -->
|
||||||
<div class="span2 main-menu-span">
|
<div class="span2 main-menu-span">
|
||||||
<div class="well nav-collapse sidebar-nav">
|
<div class="well nav-collapse sidebar-nav">
|
||||||
|
@ -125,13 +127,14 @@
|
||||||
|
|
||||||
<div id="content" class="span10">
|
<div id="content" class="span10">
|
||||||
<!-- content starts -->
|
<!-- content starts -->
|
||||||
|
{/if}
|
||||||
|
|
||||||
{block name=content}{/block}
|
{block name=content}{/block}
|
||||||
|
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
|
||||||
</div><!--/#content.span10-->
|
</div><!--/#content.span10-->
|
||||||
|
{/if}
|
||||||
</div><!--/fluid-row-->
|
</div><!--/fluid-row-->
|
||||||
|
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="modal hide fade" id="myModal">
|
<div class="modal hide fade" id="myModal">
|
||||||
|
@ -152,7 +155,7 @@
|
||||||
<p class="pull-left">© <a href="http://usman.it" target="_blank">Muhammad Usman</a> <?php echo date('Y') ?></p>
|
<p class="pull-left">© <a href="http://usman.it" target="_blank">Muhammad Usman</a> <?php echo date('Y') ?></p>
|
||||||
<p class="pull-right">Powered by: <a href="http://usman.it/free-responsive-admin-template">Charisma</a></p>
|
<p class="pull-right">Powered by: <a href="http://usman.it/free-responsive-admin-template">Charisma</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
{/if}
|
||||||
</div><!--/.fluid-container-->
|
</div><!--/.fluid-container-->
|
||||||
|
|
||||||
<!-- external javascript
|
<!-- external javascript
|
||||||
|
|
|
@ -1,115 +1,130 @@
|
||||||
{config_load file="ams_lib.conf" section="setup"}
|
{extends file="layout.tpl"}
|
||||||
<div class="title">
|
{block name=content}
|
||||||
{$title}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
<div class="row-fluid">
|
||||||
{$welcome_message}
|
<div class="span12 center login-header">
|
||||||
</div>
|
<img src="img/mainlogo.png"/>
|
||||||
|
</div><!--/span-->
|
||||||
|
</div><!--/row-->
|
||||||
|
|
||||||
<form name="Page1"
|
<div class="row-fluid">
|
||||||
method="post"
|
<div class="well span5 center login-box">
|
||||||
>
|
<div class="alert alert-info">
|
||||||
<table>
|
{$welcome_message}
|
||||||
<tr>
|
</div>
|
||||||
<td width="33%" {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}class="error"{/if} id="caption-Username">{$username_tag} </td>
|
|
||||||
|
|
||||||
<td width="25%">
|
|
||||||
<input type="text"
|
|
||||||
name="Username"
|
|
||||||
value="{if isset($Username)}{$Username}{/if}"
|
|
||||||
maxlength="12"
|
|
||||||
onfocus=
|
|
||||||
"javascript:showTooltip('{$username_tooltip}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-Username" {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($Username)}{$Username}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="33%" {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-Password">{$password_tag}</td>
|
|
||||||
|
|
||||||
<td width="25%">
|
|
||||||
<input type="password"
|
|
||||||
name="Password"
|
|
||||||
value=""
|
|
||||||
maxlength="20"
|
|
||||||
onkeyup=
|
|
||||||
"testPassword(document.Page1.Password.value, 'comment-Password')"
|
|
||||||
onfocus="javascript:showTooltip('{$password_message}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-Password" {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}{$Password}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="33%" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-ConfirmPass">{$cpassword_tag}</td>
|
|
||||||
|
|
||||||
<td width="25%"><input type="password"
|
|
||||||
name="ConfirmPass"
|
|
||||||
value=""
|
|
||||||
maxlength="20"
|
|
||||||
onfocus="javascript:showTooltip('{$cpassword_message}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-ConfirmPass" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}{$ConfirmPass}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="33%" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-Email">{$email_tag}</td>
|
|
||||||
|
|
||||||
<td width="25%">
|
|
||||||
<input type="text"
|
|
||||||
name="Email"
|
|
||||||
value=""
|
|
||||||
maxlength="255"
|
|
||||||
onfocus=
|
|
||||||
"javascript:showTooltip('{$email_message}', this);" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td id="comment-Email" {if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}{$Email}{/if}</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width=
|
|
||||||
"33%" {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}class="error"{/if}
|
|
||||||
colspan="2"><input type="checkbox"
|
|
||||||
name="TaC"
|
|
||||||
value="1"
|
|
||||||
onfocus="javascript:showTooltip('', this);" /><span id=
|
|
||||||
"caption-TaC">{$tac_tag}</span></td>
|
|
||||||
<td id="comment-TaC" {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}class="error"{/if} width="42%">{$tac_message}</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div class="c1">
|
|
||||||
<input type="submit"
|
|
||||||
name="Submit"
|
|
||||||
value="Continue" />
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="function" value="add_user">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div id="signupTooltip"
|
|
||||||
class="c2"
|
|
||||||
inset=""></div>
|
|
||||||
|
|
||||||
<div id="tooltip-Username">
|
|
||||||
{$username_tooltip}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div id="tooltip-Password">
|
<form name="Page1"method="post">
|
||||||
{$password_message}
|
<table>
|
||||||
</div>
|
<tr>
|
||||||
|
<td width="33%" {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}class="error"{/if} id="caption-Username">{$username_tag} </td>
|
||||||
|
|
||||||
<div id="tooltip-ConfirmPass">
|
<td width="25%">
|
||||||
{$cpassword_message}
|
<input type="text"
|
||||||
</div>
|
name="Username"
|
||||||
|
value="{if isset($Username)}{$Username}{/if}"
|
||||||
|
maxlength="12"
|
||||||
|
onfocus=
|
||||||
|
"javascript:showTooltip('{$username_tooltip}', this);" />
|
||||||
|
</td>
|
||||||
|
|
||||||
<div id="tooltip-Email">
|
<td id="comment-Username" {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($Username)}{$Username}{/if}</td>
|
||||||
{$email_message}
|
</tr>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="tooltip-TaC"></div>
|
<tr>
|
||||||
|
<td width="33%" {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-Password">{$password_tag}</td>
|
||||||
|
|
||||||
|
<td width="25%">
|
||||||
|
<input type="password"
|
||||||
|
name="Password"
|
||||||
|
value=""
|
||||||
|
maxlength="20"
|
||||||
|
onkeyup=
|
||||||
|
"testPassword(document.Page1.Password.value, 'comment-Password')"
|
||||||
|
onfocus="javascript:showTooltip('{$password_message}', this);" />
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td id="comment-Password" {if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($PASSWORD_ERROR) && $PASSWORD_ERROR eq "TRUE"}{$Password}{/if}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="33%" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-ConfirmPass">{$cpassword_tag}</td>
|
||||||
|
|
||||||
|
<td width="25%"><input type="password"
|
||||||
|
name="ConfirmPass"
|
||||||
|
value=""
|
||||||
|
maxlength="20"
|
||||||
|
onfocus="javascript:showTooltip('{$cpassword_message}', this);" />
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td id="comment-ConfirmPass" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}{$ConfirmPass}{/if}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="33%" {if isset($CPASSWORD_ERROR) && $CPASSWORD_ERROR eq "TRUE"}class="error"{/if} id="caption-Email">{$email_tag}</td>
|
||||||
|
|
||||||
|
<td width="25%">
|
||||||
|
<input type="text"
|
||||||
|
name="Email"
|
||||||
|
value=""
|
||||||
|
maxlength="255"
|
||||||
|
onfocus=
|
||||||
|
"javascript:showTooltip('{$email_message}', this);" />
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td id="comment-Email" {if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}class="error"{/if} width="42%">{if isset($EMAIL_ERROR) && $EMAIL_ERROR eq "TRUE"}{$Email}{/if}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width=
|
||||||
|
"33%" {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}class="error"{/if}
|
||||||
|
colspan="2"><input type="checkbox"
|
||||||
|
name="TaC"
|
||||||
|
value="1"
|
||||||
|
onfocus="javascript:showTooltip('', this);" /><span id=
|
||||||
|
"caption-TaC">{$tac_tag}</span></td>
|
||||||
|
<td id="comment-TaC" {if isset($TAC_ERROR) && $TAC_ERROR eq "TRUE"}class="error"{/if} width="42%"><div class="alert alert-danger">{$tac_message}</div></td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="c1">
|
||||||
|
<input type="submit"
|
||||||
|
name="Submit"
|
||||||
|
value="Continue" />
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="function" value="add_user">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="signupTooltip"
|
||||||
|
class="c2"
|
||||||
|
inset=""></div>
|
||||||
|
|
||||||
|
<div id="tooltip-Username">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{$username_tooltip}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tooltip-Password">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{$password_message}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tooltip-ConfirmPass">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{$cpassword_message}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="tooltip-Email">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{$email_message}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div><!--/span-->
|
||||||
|
</div><!--/row-->
|
||||||
|
{/block}
|
||||||
|
|
Loading…
Reference in a new issue