Add option to rename link on login page
This commit is contained in:
parent
8b6cecd863
commit
cfe1eaadcf
|
@ -16,7 +16,9 @@ class Plugin extends Base
|
|||
|
||||
$this->route->addRoute('/oauth/callback', 'OAuthController', 'handler', 'OAuth2');
|
||||
|
||||
$this->template->hook->attach('template:auth:login-form:after', 'OAuth2:auth/login');
|
||||
$this->template->hook->attach('template:auth:login-form:after', 'OAuth2:auth/login', [
|
||||
'oauth2_custom_login_text' => $this->configModel->get('oauth2_custom_login_text'),
|
||||
]);
|
||||
$this->template->hook->attach('template:config:integrations', 'OAuth2:config/integration');
|
||||
$this->template->hook->attach('template:user:external', 'OAuth2:user/external');
|
||||
$this->template->hook->attach('template:user:authentication:form', 'OAuth2:user/authentication');
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<ul class="no-bullet">
|
||||
<li>
|
||||
<?= $this->url->icon('lock', t('OAuth2 login'), 'OAuthController', 'handler', array('plugin' => 'OAuth2')) ?>
|
||||
<?php if (!empty($oauth2_custom_login_text)): ?>
|
||||
<?= $this->url->icon('lock', t($oauth2_custom_login_text), 'OAuthController', 'handler', array('plugin' => 'OAuth2')) ?>
|
||||
<?php else: ?>
|
||||
<?= $this->url->icon('lock', t('OAuth2 login'), 'OAuthController', 'handler', array('plugin' => 'OAuth2')) ?>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
<?= $this->form->text('oauth2_key_group_filter', $values) ?>
|
||||
<p class="form-help"><?= t('Use a comma to enter multiple useable groups: group1,group2') ?></p>
|
||||
|
||||
<?= $this->form->label(t('Custom Login Text'), 'oauth2_custom_login_text') ?>
|
||||
<?= $this->form->text('oauth2_custom_login_text', $values) ?>
|
||||
<p class="form-help"><?= t('Enter the text you would prefer to see rather than the default "OAuth2 login".') ?></p>
|
||||
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue