Commit da37bcd8 authored by Son Nguyen's avatar Son Nguyen Committed by Hugh Davenport
Browse files

Rename BrowserID to Persona (bug #1030033)



- Rename BrowserID to Persona
- Replace the login via 'BrowserID' button with standard graphical
Persona button.
- Add Persona logo
- Update css style of all availlable themes: raw, aqua, default, primary
school, fresh, sunset, and ultima.
- Change Persona button background for aqua theme

Change-Id: Icf7932dbf3e1dd32660280ab8e269d4b837b3536
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent 3f5f517e
......@@ -23,18 +23,18 @@
defined('INTERNAL') || die();
$string['browserid'] = 'BrowserID';
$string['title'] = 'BrowserID';
$string['description'] = 'Authenticate using a BrowserID';
$string['browserid'] = 'Persona';
$string['title'] = 'Persona';
$string['description'] = 'Authenticate using Persona';
$string['notusable'] = 'Please install the PHP cURL extension and check the connection to the BrowserID verifier';
$string['badassertion'] = 'The given BrowserID assertion is not valid: %s';
$string['badverification'] = 'Mahara did not receive valid JSON output from the BrowserID verifier.';
$string['login'] = 'BrowserID';
$string['register'] = 'Register with BrowserID';
$string['missingassertion'] = 'BrowserID did not return an alpha-numeric assertion.';
$string['badassertion'] = 'The given Persona assertion is not valid: %s';
$string['badverification'] = 'Mahara did not receive valid JSON output from the Persona verifier.';
$string['login'] = 'Persona';
$string['register'] = 'Register with Persona';
$string['missingassertion'] = 'Persona did not return an alpha-numeric assertion.';
$string['emailalreadyclaimed'] = "Another user account has already claimed the email address '%s'.";
$string['emailclaimedasusername'] = "Another user account has already claimed the email address '%s' as a username.";
$string['browseridnotenabled'] = "The BrowserID authentication plugin is not enabled in any active institution.";
$string['emailnotfound'] = "A user account with an email address of '%s' was not found in any of the institutions where BrowserID is enabled.";
$string['browseridnotenabled'] = "The Persona authentication plugin is not enabled in any active institution.";
$string['emailnotfound'] = "A user account with an email address of '%s' was not found in any of the institutions where Persona is enabled.";
......@@ -65,13 +65,13 @@ class AuthBrowserid extends Auth {
throw new AccountAutoCreationException(get_string('emailclaimedasusername', 'auth.browserid', $email));
}
// Personal details are currently not provided by the BrowserID API.
// Personal details are currently not provided by the Persona API.
$user->username = $email;
$user->firstname = '';
$user->lastname = '';
$user->email = $email;
// no need for a password on BrowserID accounts
// no need for a password on Persona accounts
$user->password = '';
$user->passwordchange = 0;
$user->authinstance = $this->instanceid;
......@@ -144,7 +144,7 @@ class PluginAuthBrowserid extends PluginAuth {
),
'instancename' => array(
'type' => 'hidden',
'value' => 'BrowserID',
'value' => 'Persona',
),
'authname' => array(
'type' => 'hidden',
......@@ -239,18 +239,18 @@ class PluginAuthBrowserid extends PluginAuth {
}
/**
* Add a BrowserID link/button.
* Add a Persona link/button.
*/
public static function login_form_elements() {
return array(
'loginbrowserid' => array(
'value' => '<div class="login-externallink"><a class="btn" href="javascript:window.browserid_login()">' . get_string('login', 'auth.browserid') . '</a></div>'
'value' => '<div class="login-externallink"><a class="persona-button" href="javascript:window.browserid_login()"><span>' . get_string('login', 'auth.browserid') . '</span></a></div>'
)
);
}
/**
* Load all of the Javascript needed to retrieve BrowserIDs from
* Load all of the Javascript needed to retrieve Personas from
* the browser.
*/
public static function login_form_js() {
......
......@@ -60,7 +60,7 @@ if (empty($_SESSION['browseridexpires']) || time() >= $_SESSION['browseridexpire
$_SESSION['browseridemail'] = $jsondata->email;
}
$USER = new BrowserIDUser;
$USER = new BrowserIDUser();
$USER->login($_SESSION['browseridemail']);
unset($_SESSION['browseridexpires']);
unset($_SESSION['browseridemail']);
......@@ -79,7 +79,7 @@ function get_audience() {
$port = $url['port'];
}
else {
log_debug('BrowserID: cannot decipher the value of wwwroot');
log_debug('Persona: cannot decipher the value of wwwroot');
return '';
}
return $url['scheme'] . '://' .$url['host'] . ':' . $port;
......
......@@ -139,7 +139,7 @@ $string['plugin_artefact_file_version'] = 'Artefact plugin File version';
$string['plugin_artefact_internal_version'] = 'Artefact plugin XXXXXX version';
$string['plugin_artefact_plans_version'] = 'Artefact plugin Plans version';
$string['plugin_artefact_resume_version'] = 'Artefact plugin Résumé version';
$string['plugin_auth_browserid_version'] = 'Authentication plugin BrowserID version';
$string['plugin_auth_browserid_version'] = 'Authentication plugin Persona version';
$string['plugin_auth_imap_version'] = 'Authentication pluginn IMAP version';
$string['plugin_auth_internal_version'] = 'Authentication plugin Internal version';
$string['plugin_auth_ldap_version'] = 'Authentication plugin LDAP version';
......
......@@ -463,3 +463,39 @@ div.sideblock h3 a:hover {
background: #F4F7F9;
border: 0;
}
/* Persona button */
/* Link body */
a.persona-button {
background: #0b1962;
background: -moz-linear-gradient(top, #012cac, #0b1962);
background: -ms-linear-gradient(top, #012cac, #0b1962);
background: -o-linear-gradient(top, #012cac, #0b1962);
background: -webkit-linear-gradient(top, #012cac, #0b1962);
background: linear-gradient(top, #012cac, #0b1962);
}
a.persona-button:hover {
background: #012cac;
background: -moz-linear-gradient(top, #0b1962, #012cac);
background: -ms-linear-gradient(top, #0b1962, #012cac);
background: -o-linear-gradient(top, #0b1962, #012cac);
background: -webkit-linear-gradient(top, #0b1962, #012cac);
background: linear-gradient(top, #0b1962, #012cac);
}
/* Icon background */
a.persona-button span:before {
background: #3c3c3c;
background: -moz-linear-gradient(top, #606060, #3c3c3c);
background: -ms-linear-gradient(top, #606060, #3c3c3c);
background: -o-linear-gradient(top, #606060, #3c3c3c);
background: -webkit-linear-gradient(top, #606060, #3c3c3c);
background: linear-gradient(top, #606060, #3c3c3c);
}
/* Triangle */
a.persona-button:before {
background: #3c3c3c;
background: -moz-linear-gradient(-45deg, #606060, #3c3c3c);
background: -ms-linear-gradient(-45deg, #606060, #3c3c3c);
background: -o-linear-gradient(-45deg, #606060, #3c3c3c);
background: -webkit-linear-gradient(-45deg, #606060, #3c3c3c);
background: linear-gradient(-45deg, #3c3c3c, #606060); /* flipped for updated spec */
}
......@@ -763,6 +763,25 @@ div.sideblock h3 a:hover {
#sb-loginbox label {
color: #677A8A;
}
/* Persona button */
/* Icon background */
a.persona-button span:before {
background: #2d5308;
background: -moz-linear-gradient(top, #79ac45, #2d5308);
background: -ms-linear-gradient(top, #79ac45, #2d5308);
background: -o-linear-gradient(top, #79ac45, #2d5308);
background: -webkit-linear-gradient(top, #79ac45, #2d5308);
background: linear-gradient(top, #79ac45, #2d5308);
}
/* Triangle */
a.persona-button:before {
background: #2d5308;
background: -moz-linear-gradient(-45deg, #79ac45, #2d5308);
background: -ms-linear-gradient(-45deg, #79ac45, #2d5308);
background: -o-linear-gradient(-45deg, #79ac45, #2d5308);
background: -webkit-linear-gradient(-45deg, #79ac45, #2d5308);
background: linear-gradient(-45deg, #2d5308, #79ac45); /* flipped for updated spec */
}
/* Side Profile */
#sb-profile ul ul a,
......
......@@ -785,3 +785,36 @@ div.groupbox div.jointype {
color: #FFF;
text-decoration: none;
}
/* Persona button */
a.persona-button{
background: #1b3b46;
background: -moz-linear-gradient(top, #254e5c, #1b3b46);
background: -ms-linear-gradient(top, #254e5c, #1b3b46);
background: -o-linear-gradient(top, #254e5c, #1b3b46);
background: -webkit-linear-gradient(top, #254e5c, #1b3b46);
background: linear-gradient(top, #254e5c, #1b3b46);
}
a.persona-button:hover{
background: #1b3b46;
background: -moz-linear-gradient(top, #254e5c, #1b3b46);
background: -ms-linear-gradient(top, #254e5c, #1b3b46);
background: -o-linear-gradient(top, #254e5c, #1b3b46);
background: -webkit-linear-gradient(top, #254e5c, #1b3b46);
background: linear-gradient(top, #254e5c, #1b3b46);
}
a.persona-button span:before{ /* Icon BG */
background: #42a9dd;
background: -moz-linear-gradient(top, #50b8e8, #3095ce);
background: -ms-linear-gradient(top, #50b8e8, #3095ce);
background: -o-linear-gradient(top, #50b8e8, #3095ce);
background: -webkit-linear-gradient(top, #50b8e8, #3095ce);
background: linear-gradient(top, #50b8e8, #3095ce);
}
a.persona-button:before{ /* Triangle */
background: #42a9dd;
background: -moz-linear-gradient(-45deg, #50b8e8, #3095ce);
background: -ms-linear-gradient(-45deg, #50b8e8, #3095ce);
background: -o-linear-gradient(-45deg, #50b8e8, #3095ce);
background: -webkit-linear-gradient(-45deg, #50b8e8, #3095ce);
background: linear-gradient(-45deg, #3095ce, #50b8e8); /* flipped for updated spec */
}
......@@ -863,3 +863,20 @@ ul.colnav li a {
#containerX ul.colnav li a {
background: #5b6eae;
}
/* Persona button */
a.persona-button span:before{ /* Icon BG */
background: #f58f14;
background: -moz-linear-gradient(top, #fed54c, #f58f14);
background: -ms-linear-gradient(top, #fed54c, #f58f14);
background: -o-linear-gradient(top, #fed54c, #f58f14);
background: -webkit-linear-gradient(top, #fed54c, #f58f14);
background: linear-gradient(top, #fed54c, #f58f14);
}
a.persona-button:before{ /* Triangle */
background: #f58f14;
background: -moz-linear-gradient(-45deg, #fed54c, #f58f14);
background: -ms-linear-gradient(-45deg, #fed54c, #f58f14);
background: -o-linear-gradient(-45deg, #fed54c, #f58f14);
background: -webkit-linear-gradient(-45deg, #fed54c, #f58f14);
background: linear-gradient(-45deg, #f58f14, #fed54c); /* flipped for updated spec */
}
......@@ -3339,3 +3339,139 @@ table.groupviewsreport li span.right, table.sharedviewsreport li span.right {
min-width: 960px;
margin: 0 auto;
}
/* Persona button */
/* Link body */
a.persona-button {
color: #fff !important;
display: inline-block;
line-height: 1.1;
overflow: hidden;
position: relative;
text-decoration: none;
text-shadow: 0 1px rgba(0,0,0,0.5), 0 0 2px rgba(0,0,0,0.2);
background: #3c3c3c;
background: -moz-linear-gradient(top, #606060, #3c3c3c);
background: -ms-linear-gradient(top, #606060, #3c3c3c);
background: -o-linear-gradient(top, #606060, #3c3c3c);
background: -webkit-linear-gradient(top, #606060, #3c3c3c);
background: linear-gradient(top, #606060, #3c3c3c);
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.2);
-ms-box-shadow: 0 1px 0 rgba(0,0,0,0.2);
-o-box-shadow: 0 1px 0 rgba(0,0,0,0.2);
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2);
box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
a.persona-button:hover {
background: #2d2d2d;
background: -moz-linear-gradient(top, #484848, #2d2d2d);
background: -ms-linear-gradient(top, #484848, #2d2d2d);
background: -o-linear-gradient(top, #484848, #2d2d2d);
background: -webkit-linear-gradient(top, #484848, #2d2d2d);
background: linear-gradient(top, #484848, #2d2d2d);
}
a.persona-button:active, a.persona-button:focus {
top: 1px;
-moz-box-shadow: none;
-ms-box-shadow: none;
-o-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
a.persona-button span {
display: inline-block;
padding: 5px 5px 5px 40px;
}
.ie7 a.persona-button span {
padding: 5px;
}
/* Icon */
a.persona-button span:after {
background: url(../images/persona_logo.png) 10px center no-repeat;
content: '';
display: block;
width: 31px;
position: absolute;
bottom: 0;
left: -3px;
top: 0;
z-index: 10;
}
/* Icon background */
a.persona-button span:before {
content: '';
display: block;
height: 100%;
width: 20px;
position: absolute;
bottom: 0;
left: 0;
top: 0;
z-index: 1;
background: #d34f2d;
background: -moz-linear-gradient(top, #ebac45, #d34f2d);
background: -ms-linear-gradient(top, #ebac45, #d34f2d);
background: -o-linear-gradient(top, #ebac45, #d34f2d);
background: -webkit-linear-gradient(top, #ebac45, #d34f2d);
background: linear-gradient(top, #ebac45, #d34f2d);
-moz-border-radius: 3px 0 0 3px;
-ms-border-radius: 3px 0 0 3px;
-o-border-radius: 3px 0 0 3px;
-webkit-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
/* Triangle */
a.persona-button:before {
content: '';
display: block;
height: 26px;
width: 26px;
position: absolute;
left: 2px;
top: 50%;
margin-top: -13px;
z-index: 0;
background: #d34f2d;
background: -moz-linear-gradient(-45deg, #ebac45, #d34f2d);
background: -ms-linear-gradient(-45deg, #ebac45, #d34f2d);
background: -o-linear-gradient(-45deg, #ebac45, #d34f2d);
background: -webkit-linear-gradient(-45deg, #ebac45, #d34f2d);
background: linear-gradient(-45deg, #d34f2d, #ebac45); /* flipped for updated spec */
-moz-box-shadow: 1px -1px 1px rgba(0,0,0,0.1);
-ms-box-shadow: 1px -1px 1px rgba(0,0,0,0.1);
-o-box-shadow: 1px -1px 1px rgba(0,0,0,0.1);
-webkit-box-shadow: 1px -1px 1px rgba(0,0,0,0.1);
box-shadow: 1px -1px 1px rgba(0,0,0,0.1);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
/* Inset shadow (required here because the icon background clips it when on the `a` element) */
a.persona-button:after {
content: '';
display: block;
height: 100%;
width: 100%;
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
z-index: 10;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.3);
-ms-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.3);
-o-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.3);
-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.3);
box-shadow: inset 0 -1px 0 rgba(0,0,0,0.3);
}
......@@ -504,3 +504,21 @@ div.sideblock h3 a:active {
#main-nav #dropdown-nav li.selected ul.dropdown-sub li.selected a {
font-weight: bold;
}
/* Persona button */
a.persona-button span:before{ /* Icon BG */
background: #cc7314;
background: -moz-linear-gradient(top, #e09d1d, #cc7314);
background: -ms-linear-gradient(top, #e09d1d, #cc7314);
background: -o-linear-gradient(top, #e09d1d, #cc7314);
background: -webkit-linear-gradient(top, #e09d1d, #cc7314);
background: linear-gradient(top, #e09d1d, #cc7314);
}
a.persona-button:before{ /* Triangle */
background: #cc7314;
background: -moz-linear-gradient(-45deg, #e09d1d, #cc7314);
background: -ms-linear-gradient(-45deg, #e09d1d, #cc7314);
background: -o-linear-gradient(-45deg, #e09d1d, #cc7314);
background: -webkit-linear-gradient(-45deg, #e09d1d, #cc7314);
background: linear-gradient(-45deg, #cc7314, #e09d1d); /* flipped for updated spec */
}
......@@ -527,3 +527,20 @@ div.sideblock #friendscontrol label {
#main-nav li.selected .dropdown-sub li a, #main-nav li.selected .dropdown-sub li a:link, #main-nav li.selected .dropdown-sub li a:visited, #main-nav li.selected .dropdown-sub li a:active {
font-weight: normal;
}
/* Persona button */
a.persona-button span:before{ /* Icon BG */
background: #861d80;
background: -moz-linear-gradient(top, #c94cb4, #861d80);
background: -ms-linear-gradient(top, #c94cb4, #861d80);
background: -o-linear-gradient(top, #c94cb4, #861d80);
background: -webkit-linear-gradient(top, #c94cb4, #861d80);
background: linear-gradient(top, #c94cb4, #861d80);
}
a.persona-button:before{ /* Triangle */
background: #861d80;
background: -moz-linear-gradient(-45deg, #c94cb4, #861d80);
background: -ms-linear-gradient(-45deg, #c94cb4, #861d80);
background: -o-linear-gradient(-45deg, #c94cb4, #861d80);
background: -webkit-linear-gradient(-45deg, #c94cb4, #861d80);
background: linear-gradient(-45deg, #861d80, #c94cb4); /* flipped for updated spec */
}
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