Commit 74327f49 authored by Robert Lyon's avatar Robert Lyon

Bug 1753041: Allow auth message without parent option for SAML config

Also add label field for auth message for both saml and xmlrpc

behatnotneeded

Change-Id: I4f5f887ba48c26dce92b69eda0f03a7fa761c78d
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 0bea5903
......@@ -80,6 +80,7 @@ $string['samlfieldforemail'] = 'SSO field for email';
$string['samlfieldforfirstname'] = 'SSO field for first name';
$string['samlfieldforsurname'] = 'SSO field for surname';
$string['samlfieldforstudentid'] = 'SSO field for student ID';
$string['samlfieldauthloginmsg'] = 'Wrong login message';
$string['spentityid'] = "Service Provider entityId";
$string['title'] = 'SAML';
$string['updateuserinfoonlogin'] = 'Update user details on login';
......
......@@ -90,7 +90,6 @@ class AuthSaml extends Auth {
$this->config['loginlink'] = false;
$this->config['institutionidp'] = '';
$this->config['institutionidpentityid'] = '';
$this->config['parent'] = null;
$this->config['authloginmsg'] = '';
$this->instanceid = $id;
......@@ -349,7 +348,6 @@ class PluginAuthSaml extends PluginAuth {
'loginlink' => 0,
'institutionidpentityid' => '',
'active' => 1,
'parent' => null,
'authloginmsg' => ''
);
......@@ -904,17 +902,6 @@ jQuery('document').ready(function($) {
</script>
EOF;
$instances = auth_get_auth_instances_for_institution($institution);
$options = array('None');
if (is_array($instances)) {
foreach($instances as $someinstance) {
if ($someinstance->requires_parent == 1 || $someinstance->authname == 'none' || $someinstance->authname == 'saml') {
continue;
}
$options[$someinstance->id] = $someinstance->instancename;
}
}
$elements = array(
'instance' => array(
'type' => 'hidden',
......@@ -1039,22 +1026,15 @@ EOF;
'defaultvalue' => self::$default_config['studentidfield'],
'help' => true,
),
'parent' => array(
'type' => 'select',
'title' => get_string('parent','auth'),
'collapseifoneoption' => false,
'options' => $options,
'defaultvalue' => self::$default_config['parent'],
'help' => true
),
'authloginmsg' => array(
'type' => 'wysiwyg',
'rows' => 10,
'cols' => 70,
'title' => '',
'cols' => 50,
'title' => get_string('samlfieldauthloginmsg', 'auth.saml'),
'description' => get_string('authloginmsgnoparent', 'auth'),
'defaultvalue' => self::$default_config['authloginmsg'],
'help' => true,
'class' => 'under-label-help',
),
);
......@@ -1218,7 +1198,6 @@ EOF;
'institutionvalue' => $values['institutionvalue'],
'institutionregex' => $values['institutionregex'],
'institutionidpentityid' => $entityid,
'parent' => $values['parent'],
'authloginmsg' => $values['authloginmsg'],
);
......
......@@ -18,3 +18,4 @@ $string['notusable'] = 'Please install the XML-RPC, Curl and OpenSSL PHP extensi
$string['networkingdisabledonthissite'] = 'Networking is disabled on this site.';
$string['networkservers'] = 'Network servers';
$string['youhaveloggedinfrom1'] = 'Return to <a href="%s">%s</a>';
$string['authloginmsgtitle'] = 'Wrong login message';
\ No newline at end of file
......@@ -802,11 +802,12 @@ class PluginAuthXmlrpc extends PluginAuth {
$elements['authloginmsg'] = array(
'type' => 'wysiwyg',
'rows' => 10,
'cols' => 70,
'title' => '',
'cols' => 50,
'title' => get_string('authloginmsgtitle', 'auth.xmlrpc'),
'description' => get_string('authloginmsg2', 'auth'),
'defaultvalue' => self::$default_config['authloginmsg'],
'help' => true,
'class' => 'under-label-help',
);
$elements['ssodirection'] = array(
......
......@@ -41,6 +41,11 @@
.wysiwyg.view-description {
width: 70%;
}
.wysiwyg.under-label-help {
label + .mce-tinymce {
width:70%;
}
}
.toolbar-affix.affix {
position: fixed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment