NIHVIVO-2848: changes to support the new externalAuthOnly flag
This commit is contained in:
parent
3044b4c2c2
commit
3be6ec7b86
4 changed files with 82 additions and 38 deletions
|
@ -50,6 +50,12 @@ table#account td a {
|
|||
table#account tr:nth-child(2n) {
|
||||
background-color: rgba(200, 200, 180,.25);
|
||||
}
|
||||
input#externalAuthChkBox {
|
||||
height:18px;
|
||||
width:18px;
|
||||
margin-top:10px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
#filter-roles {
|
||||
float: left;
|
||||
padding-bottom: 20px;
|
||||
|
|
26
webapp/web/js/account/accountExternalAuthFlag.js
Normal file
26
webapp/web/js/account/accountExternalAuthFlag.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
// Change form actions in account main page
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// The externalAuthOnly checkbox drives the display of the password and re-set
|
||||
// password fields. When checked, the password fields are hidden
|
||||
$('input:checkbox[name=externalAuthOnly]').click(function(){
|
||||
if ( this.checked ) {
|
||||
// If checked, hide those puppies
|
||||
$('#passwordContainer').addClass('hidden');
|
||||
$('#pwdResetContainer').addClass('hidden');
|
||||
// And clear any values entered in the password fields
|
||||
$('input[name=confirmPassword]').val("");
|
||||
$('input[name=initialPassword]').val("");
|
||||
$('input[name=newPassword]').val("");
|
||||
}
|
||||
else {
|
||||
// if not checked, display them
|
||||
$('#passwordContainer').removeClass('hidden');
|
||||
$('#pwdResetContainer').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
|
@ -64,6 +64,7 @@
|
|||
|
||||
<#include "userAccounts-associateProfilePanel.ftl">
|
||||
|
||||
<p><input id="externalAuthChkBox" type="checkbox" name="externalAuthOnly" <#if externalAuthOnly?? >checked</#if> /><span>Externally Authenticated Only</span></p>
|
||||
<p>Roles<span class="requiredHint"> *</span></p>
|
||||
<#list roles as role>
|
||||
<input type="radio" name="role" value="${role.uri}" role="radio" <#if selectedRole = role.uri>checked</#if> />
|
||||
|
@ -78,6 +79,7 @@
|
|||
It will include instructions for activating the account and creating a password.
|
||||
</p>
|
||||
<#else>
|
||||
<div id="passwordContainer">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -93,6 +95,7 @@
|
|||
</table>
|
||||
|
||||
<p class="explanatoryText" style="margin-top:-8px">Minimum of ${minimumLength} characters in length.</p>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
<br />
|
||||
|
@ -104,3 +107,5 @@
|
|||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/account/accountExternalAuthFlag.js"></script>')}
|
|
@ -64,6 +64,7 @@
|
|||
|
||||
<#include "userAccounts-associateProfilePanel.ftl">
|
||||
|
||||
<p><input id="externalAuthChkBox" type="checkbox" name="externalAuthOnly" <#if externalAuthOnly?? >checked</#if> /><span>Externally Authenticated Only</span></p>
|
||||
<#if roles?has_content>
|
||||
<p>Roles<span class="requiredHint"> *</span></p>
|
||||
<#list roles as role>
|
||||
|
@ -74,6 +75,7 @@
|
|||
</#if>
|
||||
|
||||
<#if emailIsEnabled??>
|
||||
<div id="pwdResetContainer" <#if externalAuthOnly?? >class="hidden"</#if> >
|
||||
<input type="checkbox" name="resetPassword" value="" id="reset-password" role="checkbox" <#if resetPassword??>checked</#if> />
|
||||
<label class="inline" for="reset-password"> Reset password</label>
|
||||
|
||||
|
@ -82,7 +84,9 @@
|
|||
be emailed to the address entered above. The password will not
|
||||
be reset until the user follows the link provided in this email.
|
||||
</p>
|
||||
</div>
|
||||
<#else>
|
||||
<div id="passwordContainer" <#if externalAuthOnly?? >class="hidden"</#if> >
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -98,6 +102,7 @@
|
|||
</table>
|
||||
<p class="explanatoryText" style="margin-top:-8px">Minimum of ${minimumLength} characters in length.</p>
|
||||
<p class="explanatoryText">Leaving this blank means that the password will not be changed.</p>
|
||||
</div>
|
||||
</#if>
|
||||
<br />
|
||||
<input type="submit" name="submitEdit" value="Save changes" class="submit" /> or <a class="cancel" href="${formUrls.list}">Cancel</a>
|
||||
|
@ -108,3 +113,5 @@
|
|||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/account/accountExternalAuthFlag.js"></script>')}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue