Added user creation success modal.

revert-70aa11f8
Menaka Jayawardena 7 years ago
parent 9ee5056967
commit bf789b91f3

@ -16,7 +16,7 @@
under the License. under the License.
}} }}
{{unit "cdmf.unit.ui.title" pageTitle="User Management | Add User"}} {{unit "cdmf.unit.ui.title" pageTitle="User Management | Add User"}}
{{unit "cdmf.unit.ui.modal"}}
{{#zone "breadcrumbs"}} {{#zone "breadcrumbs"}}
<li> <li>
<a href="{{@app.context}}/"> <a href="{{@app.context}}/">
@ -122,26 +122,14 @@
<button id="add-user-btn" class="wr-btn">Add User</button> <button id="add-user-btn" class="wr-btn">Add User</button>
</div> </div>
</div> </div>
<div id="user-created-msg" class="container col-centered wr-content hidden">
<div class="wr-form">
<p class="page-sub-title">User was added successfully.</p>
<p>
An invitation mail will be sent to this user to initiate device enrollment.
</p>
<br>Please click <b>"Add Another User"</b>, if you wish to add another user or click <div id="modal-content-user-created" class="hide">
<b>"View User List"</b> to complete the process and go back to the user list. <div id="notification-error-msg" class="alert alert-danger hidden" role="alert">
<hr/> <i class="icon fw fw-error"></i><span></span>
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/users'">View User List
</button>
<a href="{{@app.context}}/user/add" class="cu-btn-inner">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
Add Another User
</a>
</div> </div>
<h4>
An invitation mail will be sent to this user to initiate device enrollment.
</h4>
</div> </div>
<!-- /content --> <!-- /content -->
</div> </div>

@ -282,7 +282,13 @@ $(document).ready(function () {
} }
// Refreshing with success message // Refreshing with success message
$("#user-create-form").addClass("hidden"); $("#user-create-form").addClass("hidden");
$("#user-created-msg").removeClass("hidden"); modalDialog.header('<span class="fw-stack">' +
'<i class="fw fw-info fw-stack-1x"></i> </span> User was added successfully');
modalDialog.content($("#modal-content-user-created").html());
modalDialog.footer('<div class="buttons"> ' +
'<a href="/devicemgt/users" id="reset-password-yes-link" class="btn-operations"> OK' +
' </a></div>');
modalDialog.show();
generateQRCode("#user-created-msg .qr-code"); generateQRCode("#user-created-msg .qr-code");
} }

Loading…
Cancel
Save