Auth\Form: add include_navbar parameter
This commit is contained in:
parent
3bf65aea4d
commit
fe75984bc7
4 changed files with 14 additions and 1 deletions
|
@ -159,6 +159,9 @@ auth:
|
|||
# Login form
|
||||
#
|
||||
login_form:
|
||||
# Include application navbar (default: true)
|
||||
include_navbar: true
|
||||
|
||||
# Display link for other authentication methods
|
||||
# Note: method as key and label as value
|
||||
display_other_methods:
|
||||
|
|
|
@ -159,6 +159,9 @@ auth:
|
|||
# Login form
|
||||
#
|
||||
login_form:
|
||||
# Include application navbar (default: true)
|
||||
include_navbar: true
|
||||
|
||||
# Display link for other authentication methods
|
||||
# Note: method as key and label as value
|
||||
display_other_methods:
|
||||
|
|
|
@ -21,6 +21,7 @@ class Form extends Method {
|
|||
'auth.login_form',
|
||||
array(
|
||||
'display_other_methods' => array(),
|
||||
'include_navbar' => true,
|
||||
)
|
||||
);
|
||||
Url :: add_url_handler('#^login$#', array('EesyPHP\\Auth\\Form', 'handle_login'), null, false);
|
||||
|
@ -69,6 +70,7 @@ class Form extends Method {
|
|||
else
|
||||
Tpl :: assign('next', (isset($_REQUEST['next'])?urldecode($_REQUEST['next']):''));
|
||||
Tpl :: assign('display_other_methods', $display_other_methods);
|
||||
Tpl :: assign('include_navbar', App::get('auth.login_form.include_navbar', null, 'bool'));
|
||||
Tpl :: display('login.tpl', I18n::_('Sign in'));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{extends file='Tpl:empty.tpl'}
|
||||
{if !$include_navbar}
|
||||
{block name="navbar"}{/block}
|
||||
{/if}
|
||||
{block name="pagetitle"}{/block}
|
||||
{block name="content"}
|
||||
{block name="main"}
|
||||
<main class="form-signin w-100 m-auto text-center">
|
||||
<form action="login" method="POST">
|
||||
{if !$include_navbar}
|
||||
<img class="mb-4" src="{static_url path="images/logo.svg"}" alt="" width="100">
|
||||
{/if}
|
||||
<h1 class="h3 mb-3 fw-normal">{t domain=$CORE_TEXT_DOMAIN}Sign in{/t}</h1>
|
||||
|
||||
{include file='Tpl:errors.tpl'}
|
||||
|
|
Loading…
Reference in a new issue