mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix for Jira issue: EMM-1635
This commit is contained in:
parent
174555b387
commit
1a9ca2d59e
@ -72,7 +72,7 @@
|
|||||||
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/roles'">
|
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/roles'">
|
||||||
View Role List
|
View Role List
|
||||||
</button>
|
</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">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-ring fw-stack-2x"></i>
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
|
|||||||
@ -15,20 +15,40 @@
|
|||||||
specific language governing permissions and limitations
|
specific language governing permissions and limitations
|
||||||
under the License.
|
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"}}
|
<div id="change-password-window" class="hide">
|
||||||
<li>
|
<input type="hidden" id="user" value="{{username}}">
|
||||||
<a href="javascript:void(0)" id="change-password">Change password</a>
|
<div class="modal-header">
|
||||||
</li>
|
<h4 class="pull-left modal-title">
|
||||||
<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">
|
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-user fw-stack-2x"></i>
|
<i class="fw fw-user fw-stack-2x"></i>
|
||||||
<span class="fw-stack fw-move-right fw-move-bottom">
|
<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>
|
<i class="fw fw-edit fw-stack-1x fw-inverse"></i>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
Change password
|
Change password
|
||||||
</h4>
|
</h4>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
|
||||||
</div>
|
class="fw fw-cancel"></i></button>
|
||||||
<hr>
|
</div>
|
||||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
<hr>
|
||||||
<div id="change-password-error-msg" class="alert alert-danger hidden" role="alert">
|
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||||
<i class="icon fw fw-error"></i><span></span>
|
<div id="change-password-error-msg" class="alert alert-danger hidden" role="alert">
|
||||||
</div>
|
<i class="icon fw fw-error"></i><span></span>
|
||||||
<h5>
|
</div>
|
||||||
Type your current password *
|
<h5>
|
||||||
<br><br>
|
Type your current password *
|
||||||
<div>
|
<br><br>
|
||||||
<input id="current-password" type="password" class="form-control modal-input"/>
|
<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>
|
</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>
|
|
||||||
|
|
||||||
<div id="change-password-success-content" class="hide">
|
<div id="change-password-success-content" class="hide">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="pull-left modal-title">
|
<h4 class="pull-left modal-title">
|
||||||
<span class="fw-stack fw-move-right fw-move-bottom">
|
<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-circle fw-stack-2x fw-stroke text-success"></i>
|
||||||
<i class="fw fw-check fw-stack-1x fw-inverse"></i>
|
<i class="fw fw-check fw-stack-1x fw-inverse"></i>
|
||||||
</span>
|
</span>
|
||||||
Password has been successfully updated
|
Password has been successfully updated
|
||||||
</h4>
|
</h4>
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
|
||||||
</div>
|
class="fw fw-cancel"></i></button>
|
||||||
<hr>
|
</div>
|
||||||
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
<hr>
|
||||||
<h5 class="text-center">
|
<div class="modal-body add-margin-top-2x add-margin-bottom-2x">
|
||||||
You can now try to login using your new password.
|
<h5 class="text-center">
|
||||||
</h5>
|
You can now try to login using your new password.
|
||||||
</div>
|
</h5>
|
||||||
<div class="modal-footer">
|
</div>
|
||||||
<div class="buttons">
|
<div class="modal-footer">
|
||||||
<a href="#" id="change-password-success-link" class="btn-operations">Ok</a>
|
<div class="buttons">
|
||||||
</div>
|
<a href="#" id="change-password-success-link" class="btn-operations">Ok</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
|
|
||||||
{{#zone "bottomJs"}}
|
{{#zone "bottomJs"}}
|
||||||
{{js "/js/user-menu.js"}}
|
{{js "/js/user-menu.js"}}
|
||||||
{{/zone}}
|
{{/zone}}
|
||||||
@ -16,7 +16,15 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function onRequest() {
|
function onRequest(context) {
|
||||||
var constants = require("/app/modules/constants.js");
|
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…
Reference in New Issue
Block a user