Fixed layout for register.tpl and login.tpl, it now uses also layout.tpl but with a parameter 'no_visible_elements' => 'TRUE'

This commit is contained in:
Quitta 2013-06-16 01:40:13 +02:00
parent a5f6716f88
commit d78eaf987e
4 changed files with 120 additions and 101 deletions

View file

@ -49,7 +49,8 @@ class Helpers{
}else{
$inherited = "layout_user.tpl";
}
$smarty -> display( 'extends:' . $inherited .'|home.tpl' );
//extends:' . $inherited .'|register.tpl
$smarty -> display( 'register.tpl' );
}
public function create_folders(){

View file

@ -17,6 +17,6 @@ if ( isset( $_GET["page"] ) ){
$page = $_GET["page"];
}
//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 );

View file

@ -55,6 +55,7 @@
</head>
<body>
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
<!-- topbar starts -->
<div class="navbar">
<div class="navbar-inner">
@ -102,9 +103,10 @@
</div>
</div>
</div>
{/if}
<div class="container-fluid">
<div class="row-fluid">
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
<!-- left menu starts -->
<div class="span2 main-menu-span">
<div class="well nav-collapse sidebar-nav">
@ -125,13 +127,14 @@
<div id="content" class="span10">
<!-- content starts -->
{/if}
{block name=content}{/block}
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
</div><!--/#content.span10-->
{/if}
</div><!--/fluid-row-->
{if ! isset($no_visible_elements) or $no_visible_elements eq "FALSE"}
<hr>
<div class="modal hide fade" id="myModal">
@ -152,7 +155,7 @@
<p class="pull-left">&copy; <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>
</footer>
{/if}
</div><!--/.fluid-container-->
<!-- external javascript

View file

@ -1,15 +1,20 @@
{config_load file="ams_lib.conf" section="setup"}
<div class="title">
{$title}
</div>
{extends file="layout.tpl"}
{block name=content}
<div>
<div class="row-fluid">
<div class="span12 center login-header">
<img src="img/mainlogo.png"/>
</div><!--/span-->
</div><!--/row-->
<div class="row-fluid">
<div class="well span5 center login-box">
<div class="alert alert-info">
{$welcome_message}
</div>
<form name="Page1"
method="post"
>
<form name="Page1"method="post">
<table>
<tr>
<td width="33%" {if isset($USERNAME_ERROR) && $USERNAME_ERROR eq "TRUE"}class="error"{/if} id="caption-Username">{$username_tag} </td>
@ -78,7 +83,7 @@
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>
<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>
@ -96,20 +101,30 @@
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 id="tooltip-TaC"></div>
</div><!--/span-->
</div><!--/row-->
{/block}