VIVO-333 External-auth login button should be language-sensitive.

Don't specify the text in the runtime.properties. Instead, get it from all.properties. Show the button if externalAuth.netIdHeaderName is specified.
This commit is contained in:
j2blake 2013-10-09 16:38:35 -04:00
parent 73cb80152a
commit 383e2f4233
3 changed files with 23 additions and 19 deletions

View file

@ -363,7 +363,7 @@
<em>External authentication:</em> <em>External authentication:</em>
If you want to use an external If you want to use an external
authentication system like Shibboleth or CUWebAuth, you will need to authentication system like Shibboleth or CUWebAuth, you will need to
set additional properties in this file. See the step below set an additional property in this file. See the step below
entitled <a href="#external_auth">Using an External Authentication entitled <a href="#external_auth">Using an External Authentication
System with VIVO</a>. System with VIVO</a>.
</p> </p>
@ -615,21 +615,16 @@
<tr> <tr>
<td colspan="2"> <td colspan="2">
If an external authentication system like Shibboleth or CUWebAuth is to be If an external authentication system like Shibboleth or CUWebAuth is to be
used, these properties say how the login button should be labeled, and which used, this property says which HTTP header will contain the user ID from
HTTP header will contain the user ID from the authentication system. If such the authentication system. If such a system is not to be used,
a system is not to be used, leave these commented out. Consult the installation leave this commented out.
instructions for more details.
</td> </td>
</tr> </tr>
<tr class="odd_row"> <tr class="odd_row">
<td> <td>
externalAuth.buttonText
<br/>
externalAuth.netIdHeaderName externalAuth.netIdHeaderName
</td> </td>
<td> <td>
Log in using BearCat Shibboleth
<br/>
remote_userID remote_userID
</td> </td>
</tr> </tr>
@ -1219,14 +1214,19 @@
the VIVO login form. You need to tell VIVO what text should appear in the VIVO login form. You need to tell VIVO what text should appear in
that button. that button.
<p> <p>
Put a line like this in the runtime.properties file: In your theme, add a line to the <code>all.properties</code> file,
externalAuth.buttonText = [the text for your login button] For example: like this one:
</p> <pre>external_login_text = <em>[the text for your login button]</em></pre>
<pre>externalAuth.buttonText = Log in using BearCat Shibboleth</pre> For example:
<p> <pre>external_login_text = Log in using BearCat Shibboleth</pre>
The VIVO login form will display a button labelled "Log in The VIVO login form will display a button labelled "Log in
using BearCat Shibboleth". using BearCat Shibboleth".
</p> </p>
<p>
If your site supports additional languages, add lines to the corresponding files.
For example, <code>all_es.properties</code> might contain this line:
<pre>external_login_text = Entrar usando Shibboleth GatoOso</pre>
</p>
</li> </li>
<li> <li>
<h5>Associating a User with a profile page.</h5> <h5>Associating a User with a profile page.</h5>

View file

@ -742,6 +742,12 @@ rdf/tbox/filegraph/tbox/vivo-skos-1.5.owl</pre>
</tbody> </tbody>
</table> </table>
<p>
Note that the property named <code>externalAuth.buttonText</code> is no longer used.
You can specify the text of the external login button by adding a property to
<code>all.properties</code> like this:
<pre>external_login_text = Log in using BearCat Shibboleth</pre>
</p>
<p> <p>
3. Apply any previous changes you have made to the new source 3. Apply any previous changes you have made to the new source

View file

@ -101,12 +101,10 @@ selfEditing.idMatchingProperty = http://vivo.mydomain.edu/ns#networkId
# #
# If an external authentication system like Shibboleth or CUWebAuth is to be # If an external authentication system like Shibboleth or CUWebAuth is to be
# used, these properties say how the login button should be labeled, and which # used, this property says which HTTP header will contain the user ID from
# HTTP header will contain the user ID from the authentication system. If such # the authentication system. If such a system is not to be used, leave this
# a system is not to be used, leave these commented out. Consult the # commented out. Consult the installation instructions for more details.
# installation instructions for more details.
# #
#externalAuth.buttonText = Log in using BearCat Shibboleth
#externalAuth.netIdHeaderName = remote_userID #externalAuth.netIdHeaderName = remote_userID
# #