Skip to content

Commit e00622a

Browse files
committed
Make login button text configurable
Signed-off-by: Naoto Kobayashi <[email protected]>
1 parent e3c1590 commit e00622a

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

action.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,15 @@ public function getScopes()
5454
return array(Keycloak::SCOPE_OPENID);
5555
}
5656

57+
/** @inheritDoc */
58+
public function getLabel()
59+
{
60+
return $this->getConf('label');
61+
}
62+
5763
/** @inheritDoc */
5864
public function getColor()
5965
{
60-
return '#333333';
66+
return $this->getConf('color');
6167
}
6268
}

conf/default.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
$conf['secret'] = '';
99

1010
$conf['openidurl'] = '';
11+
12+
$conf['label'] = 'Keycloak';
13+
$conf['color'] = '#333333';

conf/metadata.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
$meta['secret'] = array('password');
99

1010
$meta['openidurl'] = array('string');
11+
12+
$meta['label'] = array('string');
13+
$meta['color'] = array('string');

lang/en/settings.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99
$lang['key'] = 'Client ID';
1010
$lang['secret'] = 'Cient Secret';
1111
$lang['openidurl'] = 'OpenID Connect Auto Discovery URL';
12+
13+
$lang['label'] = 'Label to display on the login button';
14+
$lang['color'] = 'Color to use with the login button';

0 commit comments

Comments
 (0)