Fix for Jira issue: EMM-1635

4.x.x
kamidu 8 years ago
parent 174555b387
commit 1a9ca2d59e

@ -72,7 +72,7 @@
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/roles'">
View Role List
</button>
<a href="{{@app.context}}/roles/add-role" class="cu-btn-inner">
<a href="{{@app.context}}/role/add" class="cu-btn-inner">
<span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>

@ -15,20 +15,40 @@
specific language governing permissions and limitations
under the License.
}}
{{#zone "userMenu"}}
<ul class="nav navbar-right float-remove-xs text-center-xs">
<li class="visible-inline-block">
<a href="#" class="dropdown" data-toggle="dropdown">
<span class="icon fw-stack fw-lg">
<i class="fw fw-circle fw-stack-2x"></i>
<i class="fw fw-user fw-stack-1x fw-inverse"></i>
</span>
<span class="hidden-xs add-padding-left-1x">
{{#if isSuperTenant }}
{{@user.username}}<span class="caret"></span>
{{else}}
{{@user.username}}@{{@user.domain}}<span class="caret"></span>
{{/if}}
</span>
</a>
<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"
role="menu">
<li class="dropdown-header visible-xs">
{{@user.username}}<span class="caret"></span>
</li>
<li class="divider visible-xs"></li>
<li>
<a href="javascript:void(0)" id="change-password">Change password</a>
</li>
<li>
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/logout">Sign out</a>
</li>
{{#zone "userMenu-items"}}
<li>
<a href="javascript:void(0)" id="change-password">Change password</a>
</li>
<li>
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/logout">Sign out</a>
</li>
<div id="change-password-window" class="hide">
<input type="hidden" id="user" value="{{username}}">
<div class="modal-header">
<h4 class="pull-left modal-title">
<div id="change-password-window" class="hide">
<input type="hidden" id="user" value="{{username}}">
<div class="modal-header">
<h4 class="pull-left modal-title">
<span class="fw-stack">
<i class="fw fw-user fw-stack-2x"></i>
<span class="fw-stack fw-move-right fw-move-bottom">
@ -37,69 +57,75 @@
<i class="fw fw-edit fw-stack-1x fw-inverse"></i>
</span>
</span>
&nbsp;&nbsp;Change password
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
</div>
<hr>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
<div id="change-password-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<h5>
Type your current password *
<br><br>
<div>
<input id="current-password" type="password" class="form-control modal-input"/>
</div>
<br><br>
Type a new password *
<br><br>
<div>
<input id="new-password" type="password" class="form-control modal-input"
placeholder="[ Password should be in minimum 5 characters long and should not include any whitespaces ]"/>
&nbsp;&nbsp;Change password
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
class="fw fw-cancel"></i></button>
</div>
<hr>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
<div id="change-password-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<h5>
Type your current password *
<br><br>
<div>
<input id="current-password" type="password" class="form-control modal-input"/>
</div>
<br><br>
Type a new password *
<br><br>
<div>
<input id="new-password" type="password" class="form-control modal-input"
placeholder="[ Password should be in minimum 5 characters long and should not include any whitespaces ]"/>
</div>
<br><br>
Reconfirm your new password *
<br><br>
<div>
<input id="retyped-new-password" type="password" class="form-control modal-input"/>
</div>
<br><br>
</h5>
</div>
<div class="modal-footer">
<div class="buttons">
<a href="#" id="change-password-yes-link" class="btn-operations">Change</a>
<a href="#" id="change-password-cancel-link" class="btn-operations">Cancel</a>
</div>
</div>
</div>
<br><br>
Reconfirm your new password *
<br><br>
<div>
<input id="retyped-new-password" type="password" class="form-control modal-input"/>
</div>
<br><br>
</h5>
</div>
<div class="modal-footer">
<div class="buttons">
<a href="#" id="change-password-yes-link" class="btn-operations">Change</a>
<a href="#" id="change-password-cancel-link" class="btn-operations">Cancel</a>
</div>
</div>
</div>
<div id="change-password-success-content" class="hide">
<div class="modal-header">
<h4 class="pull-left modal-title">
<div id="change-password-success-content" class="hide">
<div class="modal-header">
<h4 class="pull-left modal-title">
<span class="fw-stack fw-move-right fw-move-bottom">
<i class="fw fw-circle fw-stack-2x fw-stroke text-success"></i>
<i class="fw fw-check fw-stack-1x fw-inverse"></i>
</span>
&nbsp;&nbsp;Password has been successfully updated
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
</div>
<hr>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
<h5 class="text-center">
You can now try to login using your new password.
</h5>
</div>
<div class="modal-footer">
<div class="buttons">
<a href="#" id="change-password-success-link" class="btn-operations">Ok</a>
</div>
</div>
</div>
&nbsp;&nbsp;Password has been successfully updated
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
class="fw fw-cancel"></i></button>
</div>
<hr>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
<h5 class="text-center">
You can now try to login using your new password.
</h5>
</div>
<div class="modal-footer">
<div class="buttons">
<a href="#" id="change-password-success-link" class="btn-operations">Ok</a>
</div>
</div>
</div>
</ul>
</li>
</ul>
{{/zone}}
{{#zone "bottomJs"}}
{{js "/js/user-menu.js"}}
{{/zone}}

@ -16,7 +16,15 @@
* under the License.
*/
function onRequest() {
function onRequest(context) {
var constants = require("/app/modules/constants.js");
return session.get(constants["USER_SESSION_KEY"]);
var user = context.user;
var isSuperTenant = false;
if (user.tenantId == -1234){
isSuperTenant = true;
}
var viewModal = {};
viewModal.isSuperTenant = isSuperTenant;
viewModal.USER_SESSION_KEY = session.get(constants["USER_SESSION_KEY"]);
return viewModal;
}

Loading…
Cancel
Save