diff --git a/example/includes/config.yml b/example/includes/config.yml index 809663a..02aef4e 100644 --- a/example/includes/config.yml +++ b/example/includes/config.yml @@ -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: diff --git a/skel/config.yml b/skel/config.yml index 642d81c..e4b4007 100644 --- a/skel/config.yml +++ b/skel/config.yml @@ -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: diff --git a/src/Auth/Form.php b/src/Auth/Form.php index fb9b09d..30edd43 100644 --- a/src/Auth/Form.php +++ b/src/Auth/Form.php @@ -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')); } diff --git a/templates/login.tpl b/templates/login.tpl index c19838d..3edbbfa 100644 --- a/templates/login.tpl +++ b/templates/login.tpl @@ -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"}
+ {if !$include_navbar} + {/if}

{t domain=$CORE_TEXT_DOMAIN}Sign in{/t}

{include file='Tpl:errors.tpl'}