Add config parameter to hide login form
This commit is contained in:
parent
94068019db
commit
b0ac201340
|
|
@ -4,6 +4,7 @@
|
|||
<p class="alert alert-error"><?= $this->e($errors['login']) ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (! HIDE_LOGIN_FORM): ?>
|
||||
<form method="post" action="<?= $this->url->href('auth', 'check', array('redirect_query' => $redirect_query)) ?>">
|
||||
|
||||
<?= $this->form->csrf() ?>
|
||||
|
|
@ -16,21 +17,24 @@
|
|||
|
||||
<?= $this->form->checkbox('remember_me', t('Remember Me'), 1, true) ?><br/>
|
||||
|
||||
<?php if (GOOGLE_AUTH || GITHUB_AUTH): ?>
|
||||
<ul>
|
||||
<?php if (GOOGLE_AUTH): ?>
|
||||
<li><?= $this->url->link(t('Login with my Google Account'), 'oauth', 'google') ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (GITHUB_AUTH): ?>
|
||||
<li><?= $this->url->link(t('Login with my Github Account'), 'oauth', 'gitHub') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Sign in') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (GOOGLE_AUTH || GITHUB_AUTH): ?>
|
||||
<ul class="no-bullet">
|
||||
<?php if (GOOGLE_AUTH): ?>
|
||||
<li><?= $this->url->link(t('Login with my Google Account'), 'oauth', 'google') ?></li>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (GITHUB_AUTH): ?>
|
||||
<li><?= $this->url->link(t('Login with my Github Account'), 'oauth', 'gitHub') ?></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
</div>
|
||||
|
|
@ -84,3 +84,6 @@ defined('API_AUTHENTICATION_HEADER') or define('API_AUTHENTICATION_HEADER', '');
|
|||
|
||||
// Enable/disable url rewrite
|
||||
defined('ENABLE_URL_REWRITE') or define('ENABLE_URL_REWRITE', isset($_SERVER['HTTP_MOD_REWRITE']));
|
||||
|
||||
// Hide login form
|
||||
defined('HIDE_LOGIN_FORM') or define('HIDE_LOGIN_FORM', false);
|
||||
|
|
|
|||
|
|
@ -154,3 +154,5 @@ define('API_AUTHENTICATION_HEADER', '');
|
|||
// Enable/disable url rewrite
|
||||
define('ENABLE_URL_REWRITE', false);
|
||||
|
||||
// Hide login form, useful if all your users use Google/Github/ReverseProxy authentication
|
||||
define('HIDE_LOGIN_FORM', false);
|
||||
|
|
|
|||
|
|
@ -202,4 +202,7 @@ define('MARKDOWN_ESCAPE_HTML', true);
|
|||
|
||||
// API alternative authentication header, the default is HTTP Basic Authentication defined in RFC2617
|
||||
define('API_AUTHENTICATION_HEADER', '');
|
||||
|
||||
// Hide login form, useful if all your users use Google/Github/ReverseProxy authentication
|
||||
define('HIDE_LOGIN_FORM', false);
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue