fix a few style issues with nav login panel
This commit is contained in:
parent
ec037abf92
commit
db710cd2df
3
boot.php
3
boot.php
@ -1694,7 +1694,7 @@ function fix_system_urls($oldurl, $newurl) {
|
|||||||
// link. This will most always depend on the value of App::$config['system']['register_policy'].
|
// link. This will most always depend on the value of App::$config['system']['register_policy'].
|
||||||
// returns the complete html for inserting into the page
|
// returns the complete html for inserting into the page
|
||||||
|
|
||||||
function login($register = false, $form_id = 'main-login', $hiddens=false) {
|
function login($register = false, $form_id = 'main-login', $hiddens=false, $login_page = true) {
|
||||||
$o = '';
|
$o = '';
|
||||||
$reg = false;
|
$reg = false;
|
||||||
$reglink = get_config('system', 'register_link');
|
$reglink = get_config('system', 'register_link');
|
||||||
@ -1720,6 +1720,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
|
|||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$dest_url' => $dest_url,
|
'$dest_url' => $dest_url,
|
||||||
|
'$login_page' => $login_page,
|
||||||
'$logout' => t('Logout'),
|
'$logout' => t('Logout'),
|
||||||
'$login' => t('Login'),
|
'$login' => t('Login'),
|
||||||
'$form_id' => $form_id,
|
'$form_id' => $form_id,
|
||||||
|
@ -112,7 +112,7 @@ EOT;
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(! get_account_id()) {
|
if(! get_account_id()) {
|
||||||
$nav['login'] = login();
|
$nav['login'] = login(true,'main-login',false,false);
|
||||||
$nav['loginmenu'][] = Array('login',t('Login'),'',t('Sign in'),'login_nav_btn');
|
$nav['loginmenu'][] = Array('login',t('Login'),'',t('Sign in'),'login_nav_btn');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2106,16 +2106,20 @@ dl.bb-dl > dd > li {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rmagic-button {
|
|
||||||
padding-top: 10px;
|
|
||||||
margin-left: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#nav-login {
|
#nav-login {
|
||||||
display: none;
|
display: none;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-radius: $radiuspx;
|
border-radius: $radiuspx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-dropdown-menu {
|
||||||
|
padding: 8px;
|
||||||
|
background-color: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rmagic-button {
|
||||||
|
margin: 15px 0 5px;
|
||||||
|
|
||||||
}
|
}
|
@ -1,4 +1,6 @@
|
|||||||
|
{{if $login_page}}
|
||||||
<div class="generic-content-wrapper-styled">
|
<div class="generic-content-wrapper-styled">
|
||||||
|
{{/if}}
|
||||||
<form action="{{$dest_url}}" id="{{$form_id}}" method="post" >
|
<form action="{{$dest_url}}" id="{{$form_id}}" method="post" >
|
||||||
<input type="hidden" name="auth-params" value="login" />
|
<input type="hidden" name="auth-params" value="login" />
|
||||||
<div id="login-main">
|
<div id="login-main">
|
||||||
@ -17,5 +19,7 @@
|
|||||||
<input type="hidden" name="{{$k}}" value="{{$v}}" />
|
<input type="hidden" name="{{$k}}" value="{{$v}}" />
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</form>
|
</form>
|
||||||
|
{{if $login_page}}
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript"> $(document).ready(function() { $("#id_{{$lname.0}}").focus();} );</script>
|
<script type="text/javascript"> $(document).ready(function() { $("#id_{{$lname.0}}").focus();} );</script>
|
||||||
|
{{/if}}
|
@ -160,16 +160,8 @@
|
|||||||
<div id="nav-login" class="login-dropdown-menu" style="display:none; width:150%;">
|
<div id="nav-login" class="login-dropdown-menu" style="display:none; width:150%;">
|
||||||
{{$nav.login}}
|
{{$nav.login}}
|
||||||
{{$nav.remote_login}}
|
{{$nav.remote_login}}
|
||||||
|
|
||||||
<!-- {{foreach $nav.loginmenu as $loginmenu}}
|
|
||||||
<li role="presentation"><a class="{{$loginmenu.2}}" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem" id="{{$loginmenu.4}}">{{$loginmenu.1}}</a></li>
|
|
||||||
{{/foreach}} -->
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<!-- {{foreach $nav.loginmenu as $loginmenu}}
|
|
||||||
<li role="presentation"><a class="{{$loginmenu.2}} visible-xs" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem">{{$loginmenu.1}}</a></li>
|
|
||||||
{{/foreach}}
|
|
||||||
-->
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $nav.register}}
|
{{if $nav.register}}
|
||||||
|
@ -1 +1 @@
|
|||||||
<a href="rmagic" class="btn btn-default rmagic-button">{{$title}}</a>
|
<a href="rmagic" class="btn btn-block btn-success rmagic-button">{{$title}}</a>
|
||||||
|
Reference in New Issue
Block a user