revert-70aa11f8
kamidu 8 years ago
commit 83cbd56b03

@ -113,15 +113,17 @@
<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>
<br>
An invitation mail will be sent to this user to initiate device enrollment.
Below QR code can also be used to enroll a device.
<p>
An invitation mail will be sent to this user to initiate device enrollment.
Below QR code can also be used to enroll a device.
</p>
<div class="panel panel-default">
<div id="qr-code-modal" class="hidden" data-enrollment-url="{{enrollmentURL}}"></div>
<div class="panel-body">
<div class="qr-code col-lg-5 col-md-6 col-centered"></div>
</div>
</div>
<br>Please click <b>"Add Another User"</b>, if you wish to add another user or click
<b>"View User List"</b> to complete the process and go back to the user list.
<hr/>

@ -39,6 +39,7 @@ function onRequest() {
page["firstnameRegExViolationErrorMsg"] = devicemgtProps["userValidationConfig"]["firstnameRegExViolationErrorMsg"];
page["lastnameJSRegEx"] = devicemgtProps["userValidationConfig"]["lastnameJSRegEx"];
page["lastnameRegExViolationErrorMsg"] = devicemgtProps["userValidationConfig"]["lastnameRegExViolationErrorMsg"];
page["enrollmentURL"] = devicemgtProps["generalConfig"]["host"] + devicemgtProps["enrollmentDir"];
return page;
}

@ -86,7 +86,7 @@ validateInline["user-name"] = function () {
validateInline["first-name"] = function () {
var firstnameInput = $("input#firstname");
if (firstnameInput.val()) {
disableInlineError("firstNameField", "fnError");
disableInlineError("firstNameField", "fnError");
} else {
enableInlineError("firstNameField", "fnError");
}
@ -161,6 +161,18 @@ function emailIsValid(email) {
return regExp.test(email);
}
/*
* QR-code generation function.
*/
function generateQRCode(qrCodeClass) {
var enrollmentURL = $("#qr-code-modal").data("enrollment-url");
$(qrCodeClass).qrcode({
text: enrollmentURL,
width: 200,
height: 200
});
}
$("#userStore").change(
function () {
var str = "";

@ -16,6 +16,18 @@
* under the License.
*/
/**
* Checks if provided input is valid against RegEx input.
*
* @param regExp Regular expression
* @param inputString Input string to check
* @returns {boolean} Returns true if input matches RegEx
*/
function inputIsValid(regExp, inputString) {
regExp = new RegExp(regExp);
return regExp.test(inputString);
}
$(function () {
var sortableElem = '.wr-sortable';
$(sortableElem).sortable({

Loading…
Cancel
Save