Adding emm policy edit UI

revert-dabc3590
dilanua 9 years ago
parent 935b429198
commit bd5ef4158b

@ -1,239 +1,233 @@
{{! {{#zone "content"}}
Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
WSO2 Inc. licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file except
in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
}}
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="wr-steps hidden"> <div class="wr-steps hidden">
<div class="col-md-3 col-xs-3"> <div class="col-md-3 col-xs-3">
<div class="itm-wiz itm-wiz-current" data-step="policy-profile"><div class="wiz-no">1</div><div class="wiz-lbl hidden-xs"><span>Edit current profile</span></div></div> <div class="itm-wiz itm-wiz-current" data-step="policy-profile"><div class="wiz-no">1</div><div class="wiz-lbl hidden-xs"><span>Edit current profile</span></div></div>
<br class="c-both" /> <br class="c-both" />
</div> </div>
<div class="col-md-3 col-xs-3"> <div class="col-md-3 col-xs-3">
<div class="itm-wiz" data-step="policy-criteria"><div class="wiz-no">2</div><div class="wiz-lbl hidden-xs"><span>Edit assignment groups</span></div></div> <div class="itm-wiz" data-step="policy-criteria"><div class="wiz-no">2</div><div class="wiz-lbl hidden-xs"><span>Edit assignment groups</span></div></div>
<br class="c-both" /> <br class="c-both" />
</div> </div>
<div class="col-md-3 col-xs-3"> <div class="col-md-3 col-xs-3">
<div class="itm-wiz" data-step="policy-naming"><div class="wiz-no">3</div><div class="wiz-lbl hidden-xs"><span>Republish to devices</span></div></div> <div class="itm-wiz" data-step="policy-naming"><div class="wiz-no">3</div><div class="wiz-lbl hidden-xs"><span>Republish to devices</span></div></div>
<br class="c-both" /> <br class="c-both" />
</div> </div>
</div> </div>
<div class="container col-centered wr-content policy-message hidden"> <div class="container col-centered wr-content policy-message hidden">
<div class="wr-form"> <div class="wr-form">
<h1 id="policy-message-page-wizard-title" class="page-sub-title">Policy is successfully re-configured.</h1> <h1 id="policy-message-page-wizard-title" class="page-sub-title">Policy is successfully re-configured.</h1>
<br>Please click <b>"Add Another Policy"</b>, if you wish to add another policy or click <br>Please click <b>"Add Another Policy"</b>, if you wish to add another policy or click
<b>"View policy list"</b> to complete the process and go back to the policy list. <b>"View policy list"</b> to complete the process and go back to the policy list.
<hr> <hr>
<button class="wr-btn wizard-stepper" data-current="policy-message" data-direct="{{@app.context}}/policies/"> <button class="wr-btn wizard-stepper" data-current="policy-message" data-direct="/emm/policies/">
View policy list View policy list
</button> </button>
<a href="{{@app.context}}/policy/add" class="cu-btn-inner"> <a href="/emm/policies/add-policy" 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>
</span> </span>
Add another policy Add another policy
</a> </a>
</div> </div>
</div> </div>
<div class="container col-centered wr-content policy-naming hidden"> <div class="container col-centered wr-content policy-naming hidden">
<div class="wr-form"> <div class="wr-form">
<h1 id="policy-naming-page-wizard-title" class="page-sub-title">EDIT POLICY</h1> <h1 id="policy-naming-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
<hr> <hr>
<div id="policy-naming-wizard-steps" class="row wr-wizard"></div> <div id="policy-naming-wizard-steps" class="row wr-wizard"></div>
<hr> <hr>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h4>Step 3: Republish to devices</h4> <h4 class="visible-xs">Step 3: Republish to devices</h4>
<br> <br>
<div id="policy-naming-main-error-msg" class="alert alert-danger hidden" role="alert"> <div id="policy-naming-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div> </div>
<div> <div>
<label class="wr-input-label"> <label class="wr-input-label">
Set a name * to your policy<br> Set a name * to your policy<br>
( should be 1-to-30 characters long ) ( should be 1-to-30 characters long )
</label> </label>
<div class="wr-input-control"> <div id="policy-name-field" class="form-group wr-input-control">
<div class="cus-col-50"> <div class="cus-col-50">
<input id="policy-name-input" class="form-control" type="text" value="" placeholder="[ Required field ]"/> <input id="policy-name-input" class="form-control" type="text" value="" placeholder="[ Required field ]"/>
</div>
<br class="c-both" />
</div>
<label class="wr-input-label">
Add a description
</label>
<div class="wr-input-control">
<div class="cus-col-50">
<textarea id="policy-description-input" class="form-control" rows="10" placeholder="[ Optional field ]"></textarea>
</div>
<br class="c-both" />
</div>
</div> </div>
<div class="wr-input-control wr-btn-grp"> <br class="c-both"/>
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true" data-current="policy-naming" data-next="policy-criteria"> <span class=" nameError hidden glyphicon glyphicon-remove form-control-feedback"></span>
Back <label class="error nameEmpty hidden" for="summary">Policy name is required & Should be be 1-to-30 characters long.</label>
</a> </div>
<a href="#" class="wr-btn wizard-stepper" data-current="policy-naming-publish" data-next="policy-message" data-validate="true"> <label class="wr-input-label">
Save & Publish Add a description
</a> </label>
<a href="#" class="wr-btn wizard-stepper" data-current="policy-naming" data-next="policy-message" data-validate="true"> <div class="wr-input-control">
Save <div class="cus-col-50">
</a> <textarea id="policy-description-input" class="form-control" rows="10" placeholder="[ Optional field ]"></textarea>
</div> </div>
<br class="c-both" />
</div> </div>
</div> </div>
<div class="wr-input-control wr-btn-grp">
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true" data-current="policy-naming" data-next="policy-criteria">
Back
</a>
<a href="#" class="wr-btn wizard-stepper" data-current="policy-naming-publish" data-next="policy-message" data-validate="true">
Save & Publish
</a>
<a href="#" class="wr-btn wizard-stepper" data-current="policy-naming" data-next="policy-message" data-validate="true">
Save
</a>
</div>
</div> </div>
</div> </div>
</div>
</div>
<div class="container col-centered wr-content policy-criteria hidden"> <div class="container col-centered wr-content policy-criteria hidden">
<div class="wr-form"> <div class="wr-form">
<h1 id="policy-criteria-page-wizard-title" class="page-sub-title">EDIT POLICY</h1> <h1 id="policy-criteria-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
<hr> <hr>
<div id="policy-criteria-wizard-steps" class="row wr-wizard"></div> <div id="policy-criteria-wizard-steps" class="row wr-wizard"></div>
<hr> <hr>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h4>Step 2: Edit assignment groups</h4> <h4 class="visible-xs">Step 2: Edit assignment groups</h4>
<br> <br>
<div id="policy-criteria-main-error-msg" class="alert alert-danger hidden" role="alert"> <div id="policy-criteria-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div>
<div>
<label class="wr-input-label">
Set device ownership type
</label>
<div class="wr-input-control">
<div class="cus-col-50">
<select id="ownership-input" class="form-control">
<option value="ANY" selected>ANY</option>
<option value="BYOD">BYOD (Bring Your Own Device) </option>
<option value="COPE">COPE (Corporate-Owned, Personally Enabled)</option>
</select>
</div> </div>
<div> <br class="c-both" />
<label class="wr-input-label"> </div>
Set device ownership type <div class="wr-input-control">
</label> <label class="wr-input-control radio light">
<div class="wr-input-control"> <input id="user-roles-radio-btn" type="radio" name="select-users-radio-btn" class="select-users-radio" checked/>
<div class="cus-col-50"> <span class="helper">&nbsp;Set user role(s)</span>
<select id="ownership-input" class="form-control"> </label>
<option value="ANY" selected>ANY</option> <label class="wr-input-control radio light" rel="assetfilter">
<option value="BYOD">BYOD (Bring Your Own Device) </option> <input id="users-radio-btn" type="radio" name="select-users-radio-btn" class="select-users-radio" />
<option value="COPE">COPE (Corporate-Owned, Personally Enabled)</option> <span class="helper">&nbsp;Set user(s)</span>
</select> </label>
</div> </div>
<br class="c-both" /> <div id="user-roles-select-field" class="select-users">
</div> <div class="wr-input-control">
<div class="wr-input-control"> <div class="cus-col-50">
<label class="wr-input-control radio light"> <select id="user-roles-input" class="form-control select2" multiple="multiple">
<input id="user-roles-radio-btn" type="radio" name="select-users-radio-btn" class="select-users-radio" checked/> <option value="ANY" selected>ANY</option>
<span class="helper">&nbsp;Set user role(s)</span> {{#each roles}}
</label> <option>{{this}}</option>
<label class="wr-input-control radio light" rel="assetfilter"> {{/each}}
<input id="users-radio-btn" type="radio" name="select-users-radio-btn" class="select-users-radio" /> </select>
<span class="helper">&nbsp;Set user(s)</span>
</label>
</div>
<div id="user-roles-select-field" class="select-users">
<div class="wr-input-control">
<div class="cus-col-50">
<select id="user-roles-input" class="form-control select2" multiple="multiple">
<option value="ANY" selected>ANY</option>
{{#each roles}}
<option>{{this}}</option>
{{/each}}
</select>
</div>
<br class="c-both" />
</div>
</div>
<div id="users-select-field" class="select-users">
<div class="wr-input-control">
<div class="cus-col-50">
<select id="users-input" class="form-control select2" multiple="multiple">
<option value="ANY" selected>ANY</option>
{{#each users}}
<option>{{this}}</option>
{{/each}}
</select>
</div>
<br class="c-both" />
</div>
</div> </div>
<br> <br class="c-both" />
<label class="wr-input-label" title=""> </div>
Set an action upon non-compliance </div>
</label> <div id="users-select-field" class="select-users">
<div class="wr-input-control"> <div class="wr-input-control">
<div class="cus-col-50"> <div class="cus-col-50">
<select id="action-input" class="form-control"> <select id="users-input" class="form-control select2" multiple="multiple">
<option value="enforce" data-action="enforce" selected>Enforce</option> <option value="ANY" selected>ANY</option>
<option value="warn" data-action="warn">Warn</option> {{#each users}}
<option value="monitor" data-action="monitor">Monitor</option> <option>{{username}}</option>
</select> {{/each}}
</div> </select>
<br class="c-both" />
</div> </div>
<br class="c-both" />
</div> </div>
<div class="wr-input-control wr-btn-grp"> </div>
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true" data-current="policy-criteria" data-next="policy-profile"> <br>
Back <label class="wr-input-label" title="">
</a> Set an action upon non-compliance
<a href="#" class="wr-btn wizard-stepper" data-current="policy-criteria" data-next="policy-naming" data-validate="true"> </label>
Continue <div class="wr-input-control">
</a> <div class="cus-col-50">
<select id="action-input" class="form-control">
<option value="enforce" data-action="enforce" selected>Enforce</option>
<option value="warn" data-action="warn">Warn</option>
<option value="monitor" data-action="monitor">Monitor</option>
</select>
</div> </div>
<br class="c-both" />
</div> </div>
</div> </div>
<div class="wr-input-control wr-btn-grp">
<a href="#" class="wr-btn wizard-stepper" data-is-back-btn="true" data-current="policy-criteria" data-next="policy-profile">
Back
</a>
<a href="#" class="wr-btn wizard-stepper" data-current="policy-criteria" data-next="policy-naming" data-validate="true">
Continue
</a>
</div>
</div> </div>
</div> </div>
</div>
</div>
<div class="container col-centered wr-content policy-profile"> <div class="container col-centered wr-content policy-profile">
<div class="wr-form"> <div class="wr-form">
<h1 id="policy-profile-page-wizard-title" class="page-sub-title">EDIT POLICY</h1> <h1 id="policy-profile-page-wizard-title" class="page-sub-title">EDIT POLICY</h1>
<hr> <hr>
<div id="policy-profile-wizard-steps" class="row wr-wizard"></div> <div id="policy-profile-wizard-steps" class="row wr-wizard"></div>
<hr> <hr>
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<h4>Step 1: Edit current profile</h4> <h4 class="visible-xs">Step 1: Edit current profile</h4>
<br>
<div id="policy-profile-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<div class="wr-advance-operations">
<div class="wr-advance-operations-init">
<br>
&nbsp;&nbsp;
<i class="fw fw-settings fw-spin fw-2x"></i>
&nbsp;Loading platform features . . .
<br>
<br> <br>
<div id="policy-profile-main-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<div class="wr-advance-operations">
<div class="wr-advance-operations-init">
<br>
<i class="fw fw-settings fw-spin fw-2x"></i>
Loading platform features . . .
<br>
<br>
</div>
</div>
<div class="wr-input-control wr-btn-grp">
<a href="#" class="wr-btn wizard-stepper" data-current="policy-profile" data-next="policy-criteria" data-validate="true">
Continue
</a>
</div>
</div> </div>
</div> </div>
<div class="wr-input-control wr-btn-grp">
<a href="#" class="wr-btn wizard-stepper" data-current="policy-profile" data-next="policy-criteria" data-validate="true">
Continue
</a>
</div>
</div> </div>
</div> </div>
</div>
</div>
<!-- content --> <!-- content -->
</div>
</div> </div>
</div>
{{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}
<script id="hidden-operations-ios" src="{{@unit.publicUri}}/templates/hidden-operations-ios.hbs" type="text/x-handlebars-template" ></script> <!--suppress HtmlUnknownTarget -->
<script id="hidden-operations-android" src="{{@unit.publicUri}}/templates/hidden-operations-android.hbs" type="text/x-handlebars-template" ></script> <script id="hidden-operations-ios" src="{{@unit.publicUri}}/templates/hidden-operations-ios.hbs"
<script id="hidden-operations-windows" src="{{@unit.publicUri}}/templates/hidden-operations-windows.hbs" type="text/x-handlebars-template" ></script> type="text/x-handlebars-template"></script>
{{js "js/policy-create.js"}} <!--suppress HtmlUnknownTarget -->
<script id="hidden-operations-android" src="{{@unit.publicUri}}/templates/hidden-operations-android.hbs"
type="text/x-handlebars-template"></script>
<!--suppress HtmlUnknownTarget -->
<script id="hidden-operations-windows" src="{{@unit.publicUri}}/templates/hidden-operations-windows.hbs"
type="text/x-handlebars-template"></script>
{{js "js/edit.js"}}
{{/zone}} {{/zone}}

@ -1,17 +1,17 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an * software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* KIND, either express or implied. See the License for the * either express or implied. See the License for the
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
@ -19,8 +19,18 @@
function onRequest(context) { function onRequest(context) {
var log = new Log("policy-view-edit-unit backend js"); var log = new Log("policy-view-edit-unit backend js");
log.debug("calling policy-view-edit-unit"); log.debug("calling policy-view-edit-unit");
var userModule = require("/app/modules/business-controllers/user.js")["userModule"]; var userModule = require("/app/modules/business-controllers/user.js")["userModule"];
context.roles = userModule.getRoles().content;
context.users = userModule.getUsersByUsername().content; var rolesResult = userModule.getRoles();
if (rolesResult.status == "success") {
context.roles = rolesResult.content;
}
var usersResult = userModule.getUsers();
if (usersResult.status == "success") {
context.users = usersResult.content;
}
return context; return context;
} }

@ -1,17 +1,17 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. * in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, * Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an * software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* KIND, either express or implied. See the License for the * either express or implied. See the License for the
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
@ -24,6 +24,71 @@ var policy = {};
var configuredOperations = []; var configuredOperations = [];
var currentlyEffected = {}; var currentlyEffected = {};
var validateInline = {};
var clearInline = {};
var enableInlineError = function (inputField, errorMsg, errorSign) {
var fieldIdentifier = "#" + inputField;
var errorMsgIdentifier = "#" + inputField + " ." + errorMsg;
var errorSignIdentifier = "#" + inputField + " ." + errorSign;
if (inputField) {
$(fieldIdentifier).addClass(" has-error has-feedback");
}
if (errorMsg) {
$(errorMsgIdentifier).removeClass(" hidden");
}
if (errorSign) {
$(errorSignIdentifier).removeClass(" hidden");
}
};
var disableInlineError = function (inputField, errorMsg, errorSign) {
var fieldIdentifier = "#" + inputField;
var errorMsgIdentifier = "#" + inputField + " ." + errorMsg;
var errorSignIdentifier = "#" + inputField + " ." + errorSign;
if (inputField) {
$(fieldIdentifier).removeClass(" has-error has-feedback");
}
if (errorMsg) {
$(errorMsgIdentifier).addClass(" hidden");
}
if (errorSign) {
$(errorSignIdentifier).addClass(" hidden");
}
};
/**
*clear inline validation messages.
*/
clearInline["policy-name"] = function () {
disableInlineError("policy-name-field", "nameEmpty", "nameError");
};
/**
* Validate if provided policy name is valid against RegEx configures.
*/
validateInline["policy-name"] = function () {
var policyName = $("input#policy-name-input").val();
if (policyName && inputIsValidAgainstLength(policyName, 1, 30)) {
disableInlineError("policy-name-field", "nameEmpty", "nameError");
} else {
enableInlineError("policy-name-field", "nameEmpty", "nameError");
}
};
$("#policy-name-input").focus(function(){
clearInline["policy-name"]();
}).blur(function(){
validateInline["policy-name"]();
});
// Constants to define platform types available // Constants to define platform types available
var platformTypeConstants = { var platformTypeConstants = {
"ANDROID": "android", "ANDROID": "android",
@ -47,7 +112,9 @@ var androidOperationConstants = {
"ENCRYPT_STORAGE_OPERATION": "encrypt-storage", "ENCRYPT_STORAGE_OPERATION": "encrypt-storage",
"ENCRYPT_STORAGE_OPERATION_CODE": "ENCRYPT_STORAGE", "ENCRYPT_STORAGE_OPERATION_CODE": "ENCRYPT_STORAGE",
"WIFI_OPERATION": "wifi", "WIFI_OPERATION": "wifi",
"WIFI_OPERATION_CODE": "WIFI" "WIFI_OPERATION_CODE": "WIFI",
"APPLICATION_OPERATION":"app-restriction",
"APPLICATION_OPERATION_CODE":"APP-RESTRICTION"
}; };
// Constants to define Android Operation Constants // Constants to define Android Operation Constants
@ -110,24 +177,30 @@ var updateGroupedInputVisibility = function (domElement) {
skipStep["policy-platform"] = function (policyPayloadObj) { skipStep["policy-platform"] = function (policyPayloadObj) {
policy["name"] = policyPayloadObj["policyName"]; policy["name"] = policyPayloadObj["policyName"];
policy["platform"] = policyPayloadObj["profile"]["deviceType"]["name"]; policy["platform"] = policyPayloadObj["profile"]["deviceType"];
policy["platformId"] = policyPayloadObj["profile"]["deviceType"]["id"];
var userRoleInput = $("#user-roles-input"); var userRoleInput = $("#user-roles-input");
var ownershipInput = $("#ownership-input"); var ownershipInput = $("#ownership-input");
var userInput = $("#users-input"); var userInput = $("#users-input");
var actionInput = $("#action-input"); var actionInput = $("#action-input");
var policyNameInput = $("#policy-name-input"); var policyNameInput = $("#policy-name-input");
var policyDescriptionInput = $("#policy-description-input"); var policyDescriptionInput = $("#policy-description-input");
currentlyEffected["roles"] = policyPayloadObj.roles; currentlyEffected["roles"] = policyPayloadObj.roles;
currentlyEffected["users"] = policyPayloadObj.users; currentlyEffected["users"] = policyPayloadObj.users;
userRoleInput.val(currentlyEffected["roles"]).trigger("change");
userInput.val(currentlyEffected["users"]).trigger("change");
if (currentlyEffected["users"].length > 0) { if (currentlyEffected["roles"].length > 0) {
$("#users-radio-btn").prop("checked", true) $("#user-roles-radio-btn").prop("checked", true);
$("#user-roles-select-field").show();
$("#users-select-field").hide();
userRoleInput.val(currentlyEffected["roles"]).trigger("change");
} else if (currentlyEffected["users"].length > 0) {
$("#users-radio-btn").prop("checked", true);
$("#users-select-field").show(); $("#users-select-field").show();
$("#user-roles-select-field").hide(); $("#user-roles-select-field").hide();
userInput.val(currentlyEffected["users"]).trigger("change");
} }
ownershipInput.val(policyPayloadObj.ownershipType); ownershipInput.val(policyPayloadObj.ownershipType);
actionInput.val(policyPayloadObj.compliance); actionInput.val(policyPayloadObj.compliance);
policyNameInput.val(policyPayloadObj["policyName"]); policyNameInput.val(policyPayloadObj["policyName"]);
@ -157,9 +230,8 @@ skipStep["policy-platform"] = function (policyPayloadObj) {
for (var i = 0; i < configuredOperations.length; ++i) { for (var i = 0; i < configuredOperations.length; ++i) {
var configuredOperation = configuredOperations[i]; var configuredOperation = configuredOperations[i];
$(".operation-data").filterByData("operation-code", configuredOperation). $(".operation-data").filterByData("operation-code", configuredOperation).
find(".panel-title .wr-input-control.switch input[type=checkbox]").each(function () { find(".panel-title .wr-input-control.switch input[type=checkbox]").
$(this).click(); each(function () {$(this).click();});
});
} }
}); });
}, },
@ -321,9 +393,107 @@ validateStep["policy-profile"] = function () {
// updating validationStatusArray with validationStatus // updating validationStatusArray with validationStatus
validationStatusArray.push(validationStatus); validationStatusArray.push(validationStatus);
} }
if ($.inArray(androidOperationConstants["APPLICATION_OPERATION_CODE"], configuredOperations) != -1) {
//If application restriction configured
operation = androidOperationConstants["APPLICATION_OPERATION"];
// Initializing continueToCheckNextInputs to true
continueToCheckNextInputs = true;
var appRestrictionType = $("#app-restriction-type").val();
var restrictedApplicationsGridChildInputs = "div#restricted-applications .child-input";
if (!appRestrictionType) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications restriction type is not provided.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
if (continueToCheckNextInputs) {
if ($(restrictedApplicationsGridChildInputs).length == 0) {
validationStatus = {
"error": true,
"subErrorMsg": "Applications are not provided in application restriction list.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
else {
childInputCount = 0;
childInputArray = [];
emptyChildInputCount = 0;
duplicatesExist = false;
// Looping through each child input
$(restrictedApplicationsGridChildInputs).each(function () {
childInputCount++;
if (childInputCount % 2 == 0) {
// If child input is of second column
childInput = $(this).val();
childInputArray.push(childInput);
// Updating emptyChildInputCount
if (!childInput) {
// If child input field is empty
emptyChildInputCount++;
}
}
});
// Checking for duplicates
initialChildInputArrayLength = childInputArray.length;
if (emptyChildInputCount == 0 && initialChildInputArrayLength > 1) {
for (m = 0; m < (initialChildInputArrayLength - 1); m++) {
poppedChildInput = childInputArray.pop();
for (n = 0; n < childInputArray.length; n++) {
if (poppedChildInput == childInputArray[n]) {
duplicatesExist = true;
break;
}
}
if (duplicatesExist) {
break;
}
}
}
// Updating validationStatus
if (emptyChildInputCount > 0) {
// If empty child inputs are present
validationStatus = {
"error": true,
"subErrorMsg": "One or more package names of " +
"applications are empty.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
} else if (duplicatesExist) {
// If duplicate input is present
validationStatus = {
"error": true,
"subErrorMsg": "Duplicate values exist with " +
"for package names.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
}
}
}
if (continueToCheckNextInputs) {
validationStatus = {
"error": false,
"okFeature": operation
};
}
// Updating validationStatusArray with validationStatus
validationStatusArray.push(validationStatus);
}
} }
} } if (policy["platform"] == platformTypeConstants["WINDOWS"]) {
if (policy["platform"] == platformTypeConstants["WINDOWS"]) {
if (configuredOperations.length == 0) { if (configuredOperations.length == 0) {
// updating validationStatus // updating validationStatus
validationStatus = { validationStatus = {
@ -541,7 +711,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more permitted App ID entries in " + "subErrorMsg": "One or more permitted App ID entries in " +
"Autonomous Single App Mode are empty.", "Autonomous Single App Mode are empty.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -549,7 +719,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist with permitted App ID entries in " + "subErrorMsg": "Duplicate values exist with permitted App ID entries in " +
"Autonomous Single App Mode.", "Autonomous Single App Mode.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -622,7 +792,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Wi-Fi Proxy Port is not within the range " + "subErrorMsg": "Wi-Fi Proxy Port is not within the range " +
"of valid port numbers.", "of valid port numbers.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -672,7 +842,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more Payload Certificate " + "subErrorMsg": "One or more Payload Certificate " +
"Anchor UUIDs are empty.", "Anchor UUIDs are empty.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -680,7 +850,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist " + "subErrorMsg": "Duplicate values exist " +
"with Payload Certificate Anchor UUIDs.", "with Payload Certificate Anchor UUIDs.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -732,7 +902,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist " + "subErrorMsg": "Duplicate values exist " +
"with TLS Trusted Server Names.", "with TLS Trusted Server Names.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -793,7 +963,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more Roaming Consortium OIs " + "subErrorMsg": "One or more Roaming Consortium OIs " +
"are out of allowed length.", "are out of allowed length.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -802,7 +972,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more Roaming Consortium OIs " + "subErrorMsg": "One or more Roaming Consortium OIs " +
"contain non-hexadecimal characters.", "contain non-hexadecimal characters.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -941,7 +1111,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more MCC/MNC pairs " + "subErrorMsg": "One or more MCC/MNC pairs " +
"do not fulfill the accepted length of 6 digits.", "do not fulfill the accepted length of 6 digits.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1011,7 +1181,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Incoming Mail Server Port is not within the range " + "subErrorMsg": "Incoming Mail Server Port is not within the range " +
"of valid port numbers.", "of valid port numbers.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1045,7 +1215,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Outgoing Mail Server Port is not within the range " + "subErrorMsg": "Outgoing Mail Server Port is not within the range " +
"of valid port numbers.", "of valid port numbers.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1126,7 +1296,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more Device Names of " + "subErrorMsg": "One or more Device Names of " +
"AirPlay Credentials are empty.", "AirPlay Credentials are empty.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1135,7 +1305,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist with " + "subErrorMsg": "Duplicate values exist with " +
"Device Names of AirPlay Credentials.", "Device Names of AirPlay Credentials.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1158,7 +1328,7 @@ validateStep["policy-profile"] = function () {
// if child input field is empty // if child input field is empty
emptyChildInputCount++; emptyChildInputCount++;
} else if (!inputIsValidAgainstRegExp( } else if (!inputIsValidAgainstRegExp(
/([a-z|A-Z|0-9][a-z|A-Z|0-9][:]){5}([a-z|A-Z|0-9][a-z|A-Z|0-9])$/, childInput)) { /([a-z|A-Z|0-9][a-z|A-Z|0-9][:]){5}([a-z|A-Z|0-9][a-z|A-Z|0-9])$/, childInput)) {
// if child input field is invalid against RegEx // if child input field is invalid against RegEx
invalidAgainstRegExCount++ invalidAgainstRegExCount++
} }
@ -1193,7 +1363,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "One or more AirPlay Destination fields " + "subErrorMsg": "One or more AirPlay Destination fields " +
"do not fulfill expected format.", "do not fulfill expected format.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1295,7 +1465,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist with " + "subErrorMsg": "Duplicate values exist with " +
"Search Setting Search Base and Scope pairs.", "Search Setting Search Base and Scope pairs.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1352,7 +1522,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Account Port is not within the range " + "subErrorMsg": "Account Port is not within the range " +
"of valid port numbers.", "of valid port numbers.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1465,7 +1635,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist with " + "subErrorMsg": "Duplicate values exist with " +
"APN fields of Configurations.", "APN fields of Configurations.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1553,7 +1723,7 @@ validateStep["policy-profile"] = function () {
validationStatus = { validationStatus = {
"error": true, "error": true,
"subErrorMsg": "Duplicate values exist with " + "subErrorMsg": "Duplicate values exist with " +
"APN fields of APN Configurations.", "APN fields of APN Configurations.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
@ -1663,7 +1833,9 @@ stepForwardFrom["policy-criteria"] = function () {
if ($(this).is(":checked")) { if ($(this).is(":checked")) {
if ($(this).attr("id") == "users-radio-btn") { if ($(this).attr("id") == "users-radio-btn") {
policy["selectedUsers"] = $("#users-input").val(); policy["selectedUsers"] = $("#users-input").val();
policy["selectedUserRoles"] = null;
} else if ($(this).attr("id") == "user-roles-radio-btn") { } else if ($(this).attr("id") == "user-roles-radio-btn") {
policy["selectedUsers"] = null;
policy["selectedUserRoles"] = $("#user-roles-input").val(); policy["selectedUserRoles"] = $("#user-roles-input").val();
} }
} }
@ -1810,14 +1982,15 @@ var updatePolicy = function (policy, state) {
// traverses key by key in policy["profile"] // traverses key by key in policy["profile"]
var key; var key;
for (key in policy["profile"]) { for (key in policy["profile"]) {
if (policy["platformId"] == platformTypeIds["WINDOWS"] && key == windowsOperationConstants["PASSCODE_POLICY_OPERATION_CODE"]) { if (policy["platform"] == platformTypeConstants["WINDOWS"] &&
policy["profile"][key].enablePassword = true; key == windowsOperationConstants["PASSCODE_POLICY_OPERATION_CODE"]) {
policy["profile"][windowsOperationConstants["PASSCODE_POLICY_OPERATION_CODE"]].enablePassword = true;
} }
if (policy["profile"].hasOwnProperty(key)) { if (policy["profile"].hasOwnProperty(key)) {
profilePayloads.push({ profilePayloads.push({
"featureCode": key, "featureCode": key,
"deviceTypeId": policy["platformId"], "deviceType": policy["platform"],
"content": policy["profile"][key] "content": policy["profile"][key]
}); });
} }
@ -1825,7 +1998,7 @@ var updatePolicy = function (policy, state) {
$.each(profilePayloads, function (i, item) { $.each(profilePayloads, function (i, item) {
$.each(item.content, function (key, value) { $.each(item.content, function (key, value) {
if (value === "" || value === undefined) { if (value === null || value === undefined || value === "") {
item.content[key] = null; item.content[key] = null;
} }
}); });
@ -1838,68 +2011,72 @@ var updatePolicy = function (policy, state) {
"ownershipType": policy["selectedOwnership"], "ownershipType": policy["selectedOwnership"],
"profile": { "profile": {
"profileName": policy["policyName"], "profileName": policy["policyName"],
"deviceType": { "deviceType": policy["platform"],
"id": policy["platformId"]
},
"profileFeaturesList": profilePayloads "profileFeaturesList": profilePayloads
} }
}; };
if (policy["selectedUsers"]) { if (policy["selectedUsers"]) {
payload["users"] = policy["selectedUsers"]; payload["users"] = policy["selectedUsers"];
payload["roles"] = [];
} else if (policy["selectedUserRoles"]) { } else if (policy["selectedUserRoles"]) {
payload["users"] = [];
payload["roles"] = policy["selectedUserRoles"]; payload["roles"] = policy["selectedUserRoles"];
} else { } else {
payload["users"] = []; payload["users"] = [];
payload["roles"] = []; payload["roles"] = [];
} }
var serviceURL = "/devicemgt_admin/policies/" + getParameterByName("id"); var serviceURL = "/api/device-mgt/v1.0/policies/" + getParameterByName("id");
invokerUtil.put( invokerUtil.put(
serviceURL, serviceURL,
payload, payload,
// on success // on success
function () { function (data, textStatus, jqXHR) {
if (state == "save") { if (jqXHR.status == 200) {
var policyList = [];
policyList.push(getParameterByName("id"));
serviceURL = "/devicemgt_admin/policies/inactivate";
invokerUtil.put(
serviceURL,
policyList,
// on success
function () {
$(".add-policy").addClass("hidden");
$(".policy-message").removeClass("hidden");
},
// on error
function (daa) {
console.log(data);
}
);
} else if (state == "publish") {
var policyList = []; var policyList = [];
policyList.push(getParameterByName("id")); policyList.push(getParameterByName("id"));
serviceURL = "/devicemgt_admin/policies/activate"; if (state == "save") {
invokerUtil.put( serviceURL = "/api/device-mgt/v1.0/policies/deactivate-policy";
serviceURL, invokerUtil.put(
policyList, serviceURL,
// on success policyList,
function () { // on success
$(".add-policy").addClass("hidden"); function (data, textStatus, jqXHR) {
$(".policy-naming").addClass("hidden"); if (jqXHR.status == 200) {
$(".policy-message").removeClass("hidden"); $(".add-policy").addClass("hidden");
}, $(".policy-message").removeClass("hidden");
// on error }
function (data) { },
console.log(data); // on error
} function (jqXHR) {
); console.log("error in saving policy. Received error code : " + jqXHR.status);
}
);
} else if (state == "publish") {
serviceURL = "/api/device-mgt/v1.0/policies/activate-policy";
invokerUtil.put(
serviceURL,
policyList,
// on success
function (data, textStatus, jqXHR) {
if (jqXHR.status == 200) {
$(".add-policy").addClass("hidden");
$(".policy-naming").addClass("hidden");
$(".policy-message").removeClass("hidden");
}
},
// on error
function (jqXHR) {
console.log("error in publishing policy. Received error code : " + jqXHR.status);
}
);
}
} }
}, },
// on error // on error
function () { function (jqXHR) {
console.log("error in updating policy. Received error code : " + jqXHR.status);
} }
); );
}; };
@ -1913,6 +2090,57 @@ var showAdvanceOperation = function (operation, button) {
$(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide(); $(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
}; };
/**
* This method will display appropriate fields based on wifi type
* @param {object} wifi type select object
*/
var changeAndroidWifiPolicy = function (select) {
slideDownPaneAgainstValueSet(select, 'control-wifi-password', ['wep', 'wpa', '802eap']);
slideDownPaneAgainstValueSet(select, 'control-wifi-eap', ['802eap']);
slideDownPaneAgainstValueSet(select, 'control-wifi-phase2', ['802eap']);
slideDownPaneAgainstValueSet(select, 'control-wifi-identity', ['802eap']);
slideDownPaneAgainstValueSet(select, 'control-wifi-anoidentity', ['802eap']);
slideDownPaneAgainstValueSet(select, 'control-wifi-cacert', ['802eap']);
}
/**
* This method will display appropriate fields based on wifi EAP type
* @param {object} wifi eap select object
* @param {object} wifi type select object
*/
var changeAndroidWifiPolicyEAP = function (select, superSelect) {
slideDownPaneAgainstValueSet(select, 'control-wifi-password', ['peap', 'ttls', 'pwd' ,'fast', 'leap']);
slideDownPaneAgainstValueSet(select, 'control-wifi-phase2', ['peap', 'ttls', 'fast']);
slideDownPaneAgainstValueSet(select, 'control-wifi-provisioning', ['fast']);
slideDownPaneAgainstValueSet(select, 'control-wifi-identity', ['peap', 'tls', 'ttls', 'pwd', 'fast', 'leap']);
slideDownPaneAgainstValueSet(select, 'control-wifi-anoidentity', ['peap', 'ttls']);
slideDownPaneAgainstValueSet(select, 'control-wifi-cacert', ['peap', 'tls', 'ttls']);
if(superSelect.value != '802eap'){
changeAndroidWifiPolicy(superSelect);
}
}
/**
* This method will encode the fileinput and enter the values to given input files
* @param {object} fileInput
* @param {object} fileHiddenInput
* @param {object} fileNameHiddenInput
*/
var base64EncodeFile = function (fileInput, fileHiddenInput, fileNameHiddenInput) {
var file = fileInput.files[0];
if (file) {
var reader = new FileReader();
reader.onload = function(readerEvt) {
var binaryString = readerEvt.target.result;
fileHiddenInput.value = (btoa(binaryString));
fileNameHiddenInput.value = file.name.substr(0,file.name.lastIndexOf("."));
};
reader.readAsBinaryString(file);
}
}
/** /**
* Method to slide down a provided pane upon provided value set. * Method to slide down a provided pane upon provided value set.
* *
@ -1922,6 +2150,9 @@ var showAdvanceOperation = function (operation, button) {
*/ */
var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) { var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) {
var selectedValueOnChange = $(selectElement).find("option:selected").val(); var selectedValueOnChange = $(selectElement).find("option:selected").val();
if ($(selectElement).is("input:checkbox")) {
selectedValueOnChange = $(selectElement).is(":checked").toString();
}
var i, slideDownVotes = 0; var i, slideDownVotes = 0;
for (i = 0; i < valueSet.length; i++) { for (i = 0; i < valueSet.length; i++) {
if (selectedValueOnChange == valueSet[i]) { if (selectedValueOnChange == valueSet[i]) {
@ -2033,54 +2264,49 @@ var getParameterByName = function (name) {
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}; };
function formatRepo(user) { //function formatRepo(user) {
if (user.loading) { // if (user.loading) {
return user.text // return user.text
} // }
if (!user.username) { // if (!user.username) {
return; // return;
} // }
var markup = '<div class="clearfix">' + // var markup = '<div class="clearfix">' +
'<div clas="col-sm-8">' + // '<div clas="col-sm-8">' +
'<div class="clearfix">' + // '<div class="clearfix">' +
'<div class="col-sm-3">' + user.username + '</div>'; // '<div class="col-sm-3">' + user.username + '</div>';
if (user.firstname) { // if (user.firstname) {
markup += '<div class="col-sm-3"><i class="fa fa-code-fork"></i> ' + user.firstname + '</div>'; // markup += '<div class="col-sm-3"><i class="fa fa-code-fork"></i> ' + user.firstname + '</div>';
} // }
if (user.emailAddress) { // if (user.emailAddress) {
markup += '<div class="col-sm-2"><i class="fa fa-star"></i> ' + user.emailAddress + '</div></div>'; // markup += '<div class="col-sm-2"><i class="fa fa-star"></i> ' + user.emailAddress + '</div></div>';
} // }
markup += '</div></div>'; // markup += '</div></div>';
return markup; // return markup;
} //}
//
function formatRepoSelection(user) { //function formatRepoSelection(user) {
return user.username || user.text; // return user.username || user.text;
} //}
$(document).ready(function () { $(document).ready(function () {
// Adding initial state of wizard-steps. // Adding initial state of wizard-steps.
var policyPayloadObj;
invokerUtil.get( invokerUtil.get(
"/devicemgt_admin/policies/" + getParameterByName("id"), "/api/device-mgt/v1.0/policies/" + getParameterByName("id"),
// on success // on success
function (data) { function (data, textStatus, jqXHR) {
data = JSON.parse(data); if (jqXHR.status == 200 && data) {
policyPayloadObj = data["responseContent"]; var policy = JSON.parse(data);
skipStep["policy-platform"](policyPayloadObj); skipStep["policy-platform"](policy);
}
}, },
// on error // on error
function (data) { function (jqXHR) {
console.log(data); console.log(jqXHR);
// should be redirected to an error page // should be redirected to an error page
} }
); );
$("#users-select-field").hide();
$("#user-roles-select-field").show();
$("input[type='radio'].select-users-radio").change(function () { $("input[type='radio'].select-users-radio").change(function () {
if ($("#users-radio-btn").is(":checked")) { if ($("#users-radio-btn").is(":checked")) {
$("#user-roles-select-field").hide(); $("#user-roles-select-field").hide();
@ -2093,7 +2319,7 @@ $(document).ready(function () {
}); });
// Support for special input type "ANY" on user(s) & user-role(s) selection // Support for special input type "ANY" on user(s) & user-role(s) selection
$("#user-roles-input,#user-input").select2({ $("#user-roles-input").select2({
"tags": false "tags": false
}).on("select2:select", function (e) { }).on("select2:select", function (e) {
if (e.params.data.id == "ANY") { if (e.params.data.id == "ANY") {
@ -2102,12 +2328,19 @@ $(document).ready(function () {
$("option[value=ANY]", this).prop("selected", false).parent().trigger("change"); $("option[value=ANY]", this).prop("selected", false).parent().trigger("change");
} }
}); });
$("#policy-profile-wizard-steps").html($(".wr-steps").html());
$("select.select2[multiple=multiple]").select2({ $("#users-input").select2({
"tags": false "tags": false
}).on("select2:select", function (e) {
if (e.params.data.id == "ANY") {
$(this).val("ANY").trigger("change");
} else {
$("option[value=ANY]", this).prop("selected", false).parent().trigger("change");
}
}); });
$("#policy-profile-wizard-steps").html($(".wr-steps").html());
// Maintains an array of configured features of the profile // Maintains an array of configured features of the profile
var advanceOperations = ".wr-advance-operations"; var advanceOperations = ".wr-advance-operations";
$(advanceOperations).on("click", ".wr-input-control.switch", function (event) { $(advanceOperations).on("click", ".wr-input-control.switch", function (event) {
@ -2318,4 +2551,4 @@ $(document).ready(function () {
} }
}); });
}); });

@ -1,460 +1,568 @@
<div class="row no-gutter"> <div class="row no-gutter">
<div class="wr-hidden-operations-nav col-lg-4"> <div class="wr-hidden-operations-nav col-lg-4">
<a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected"> <a href="javascript:void(0)" onclick="showAdvanceOperation('passcode-policy', this)" class="selected">
<span class="wr-hidden-operations-icon fw-stack"> <span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-key fw-stack-2x"></i> <i class="fw fw-key fw-stack-2x"></i>
</span> </span>
Passcode Policy Passcode Policy
<span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span> <span id="passcode-policy-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="passcode-policy-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="passcode-policy-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)"> <a href="javascript:void(0)" onclick="showAdvanceOperation('camera', this)">
<span class="wr-hidden-operations-icon fw-stack"> <span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-block fw-stack-2x"></i> <i class="fw fw-block fw-stack-2x"></i>
</span> </span>
Restrictions on Camera Restrictions on Camera
<span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span> <span id="camera-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="camera-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span> <span class="camera-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
<a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)"> <a href="javascript:void(0)" onclick="showAdvanceOperation('encrypt-storage', this)">
<span class="wr-hidden-operations-icon fw-stack"> <span class="wr-hidden-operations-icon fw-stack">
<i class="fw fw-security fw-stack-2x"></i> <i class="fw fw-security fw-stack-2x"></i>
</span> </span>
Encryption Settings Encryption Settings
<span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span> <span id="encrypt-storage-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span> <span id="encrypt-storage-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span> <span id="encrypt-storage-error" class="encryption-error status-icon hidden"><i class="fw fw-error"></i></span>
</a> </a>
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">--> <a href="javascript:void(0)" onclick="showAdvanceOperation('app-restriction', this)">
<!--<span class="wr-hidden-operations-icon fw-stack">--> <span class="fw-stack fw-lg">
<!--<i class="fw fw-wifi fw-stack-2x"></i>--> <i class="fw fw-application fw-stack-1x"></i>
<!--</span>--> <i class="fw fw-block fw-stack-2x"></i>
<!--Wi-Fi Settings--> </span>
<!--<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>--> Applications Restrictions
<!--<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>--> <span id="app-restriction-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>
<!--<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>--> <span id="app-restriction-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>
<!--</a>--> <span id="app-restriction-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('install-apps', this)">--> </a>
<!--<span class="wr-hidden-operations-icon fw-stack">--> <!--<a href="javascript:void(0)" onclick="showAdvanceOperation('wifi', this)">-->
<!--<i class="fw fw-application fw-stack-2x"></i>--> <!--<span class="wr-hidden-operations-icon fw-stack">-->
<!--</span>--> <!--<i class="fw fw-wifi fw-stack-2x"></i>-->
<!--App Installations--> <!--</span>-->
<!--</a>--> <!--Wi-Fi Settings-->
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('blacklist-apps', this)">--> <!--<span id="wifi-configured" class="has-configured status-icon hidden"><i class="fw fw-ok"></i></span>-->
<!--<span class="wr-hidden-operations-icon fw-stack">--> <!--<span id="wifi-ok" class="has-success status-icon hidden"><i class="fw fw-ok"></i></span>-->
<!--<i class="fw fw-block fw-stack-2x"></i>--> <!--<span id="wifi-error" class="has-error status-icon hidden"><i class="fw fw-error"></i></span>-->
<!--</span>--> <!--</a>-->
<!--App Blacklisting--> <!--<a href="javascript:void(0)" onclick="showAdvanceOperation('install-apps', this)">-->
<!--</a>--> <!--<span class="wr-hidden-operations-icon fw-stack">-->
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('web-clips', this)">--> <!--<i class="fw fw-application fw-stack-2x"></i>-->
<!--<span class="wr-hidden-operations-icon fw-stack">--> <!--</span>-->
<!--<i class="fw fw-website fw-stack-2x"></i>--> <!--App Installations-->
<!--</span>--> <!--</a>-->
<!--Web clips--> <!--<a href="javascript:void(0)" onclick="showAdvanceOperation('blacklist-apps', this)">-->
<!--</a>--> <!--<span class="wr-hidden-operations-icon fw-stack">-->
</div> <!--<i class="fw fw-block fw-stack-2x"></i>-->
<!--</span>-->
<!--App Blacklisting-->
<!--</a>-->
<!--<a href="javascript:void(0)" onclick="showAdvanceOperation('web-clips', this)">-->
<!--<span class="wr-hidden-operations-icon fw-stack">-->
<!--<i class="fw fw-website fw-stack-2x"></i>-->
<!--</span>-->
<!--Web clips-->
<!--</a>-->
</div>
<div class="wr-hidden-operations-content col-lg-8"> <div class="wr-hidden-operations-content col-lg-8">
<!-- passcode-policy --> <!-- passcode-policy -->
<div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block"> <div class="wr-hidden-operation" data-operation="passcode-policy" style="display: block">
<div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY"> <div class="panel panel-default operation-data" data-operation="passcode-policy" data-operation-code="PASSCODE_POLICY">
<div id="passcode-policy-heading" class="panel-heading" role="tab"> <div id="passcode-policy-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title"> <h2 class="sub-title panel-title">
Passcode Policy Passcode Policy
<label id="passcode-policy-lbl" class="wr-input-control switch" data-toggle="collapse" data-target="#passcode-policy-body"> <label id="passcode-policy-lbl" class="wr-input-control switch" data-toggle="collapse" data-target="#passcode-policy-body">
<input type="checkbox" /> <input type="checkbox" />
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
</label> </label>
<hr> <hr>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to set a passcode policy to an Windows Device. This configuration can be used to set a passcode policy to an Windows Device.
Once this configuration profile is installed on a device, corresponding users will not be able Once this configuration profile is installed on a device, corresponding users will not be able
to modify these settings on their devices. to modify these settings on their devices.
</div>
</h2>
</div> </div>
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body"> </h2>
</div>
<div id="passcode-policy-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="passcode-policy-body">
<div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert"> <div id="passcode-policy-feature-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span> <i class="icon fw fw-error"></i><span></span>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" /> <input id="passcode-policy-allow-simple" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyAllowSimple" checked="checked" />
<span class="helper" title="Permit the use of repeating, ascending and descending character sequences"> <span class="helper" title="Permit the use of repeating, ascending and descending character sequences">
&nbsp;&nbsp;&nbsp;Allow simple value &nbsp;&nbsp;&nbsp;Allow simple value
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-control checkbox"> <label class="wr-input-control checkbox">
<input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" /> <input id="passcode-policy-require-alphanumeric" type="checkbox" class="form-control operationDataKeys" data-key="passcodePolicyRequireAlphanumeric" checked="checked" />
<span class="helper" title="Require passcode to contain both letters and numbers"> <span class="helper" title="Require passcode to contain both letters and numbers">
&nbsp;&nbsp;&nbsp;Require alphanumeric value &nbsp;&nbsp;&nbsp;Require alphanumeric value
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label" for="passcode-policy-min-length"> <label class="wr-input-label" for="passcode-policy-min-length">
Minimum passcode length Minimum passcode length
<span class="helper" title="Minimum number of characters allowed in a passcode"> <span class="helper" title="Minimum number of characters allowed in a passcode">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0"> <select id="passcode-policy-min-length" class="form-control operationDataKeys" data-key="passcodePolicyMinLength" data-default="0">
<option value="" selected="selected"> <option value="" selected="selected">
None None
</option> </option>
<option value="4">04</option> <option value="4">04</option>
<option value="5">05</option> <option value="5">05</option>
<option value="6">06</option> <option value="6">06</option>
<option value="7">07</option> <option value="7">07</option>
<option value="8">08</option> <option value="8">08</option>
<option value="9">09</option> <option value="9">09</option>
<option value="10">10</option> <option value="10">10</option>
<option value="11">11</option> <option value="11">11</option>
<option value="12">12</option> <option value="12">12</option>
<option value="13">13</option> <option value="13">13</option>
<option value="14">14</option> <option value="14">14</option>
<option value="15">15</option> <option value="15">15</option>
<option value="16">16</option> <option value="16">16</option>
<option value="17">17</option> <option value="17">17</option>
<option value="18">18</option> <option value="18">18</option>
</select> </select>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label" for="passcode-policy-min-complex-chars"> <label class="wr-input-label" for="passcode-policy-min-complex-chars">
Minimum number of complex characters Minimum number of complex characters
<span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode"> <span class="helper" title="Minimum number of complex or non-alphanumeric characters allowed in a passcode">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0"> <select id="passcode-policy-min-complex-chars" class="form-control operationDataKeys" data-key="passcodePolicyMinComplexChars" data-default="0">
<option value="" selected="selected"> <option value="" selected="selected">
None None
</option> </option>
<option value="1">01</option> <option value="1">01</option>
<option value="2">02</option> <option value="2">02</option>
<option value="3">03</option> <option value="3">03</option>
<option value="4">04</option> <option value="4">04</option>
<option value="5">05</option> <option value="5">05</option>
</select> </select>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days"> <label class="wr-input-label" for="passcode-policy-max-passcode-age-in-days">
Maximum passcode age in days Maximum passcode age in days
<span class="helper" title="Number of days after which a passcode must be changed"> <span class="helper" title="Number of days after which a passcode must be changed">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
<br> <br>
( Should be in between 1-to-730 days or none ) ( Should be in between 1-to-730 days or none )
</label> </label>
<input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]"> <input id="passcode-policy-max-passcode-age-in-days" type="text" class="form-control operationDataKeys" data-key="passcodePolicyMaxPasscodeAgeInDays" maxlength="3" placeholder="[ Requires Number Input ]">
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label" for="passcode-policy-passcode-history"> <label class="wr-input-label" for="passcode-policy-passcode-history">
Passcode history Passcode history
<span class="helper" title="Number of consequent unique passcodes to be used before reuse"> <span class="helper" title="Number of consequent unique passcodes to be used before reuse">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
<br> <br>
( Should be in between 1-to-50 passcodes or none ) ( Should be in between 1-to-50 passcodes or none )
</label> </label>
<input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]"> <input id="passcode-policy-passcode-history" type="text" class="form-control operationDataKeys" data-key="passcodePolicyPasscodeHistory" maxlength="2" placeholder="[ Requires Number Input ]">
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">
<label class="wr-input-label" for="passcodePolicyMaxFailedAttempts"> <label class="wr-input-label" for="passcodePolicyMaxFailedAttempts">
Maximum number of failed attempts Maximum number of failed attempts
<span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased"> <span class="helper" title="Maximum number of passcode entry attempts allowed before all data on a device will be erased">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
<select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0"> <select id="passcode-policy-max-failed-attempts" class="form-control operationDataKeys" data-key="passcodePolicyMaxFailedAttempts" data-default="0">
<option value="" selected="selected"> <option value="" selected="selected">
None None
</option> </option>
<option value="3">03</option> <option value="3">03</option>
<option value="4">04</option> <option value="4">04</option>
<option value="5">05</option> <option value="5">05</option>
<option value="6">06</option> <option value="6">06</option>
<option value="7">07</option> <option value="7">07</option>
<option value="8">08</option> <option value="8">08</option>
<option value="9">09</option> <option value="9">09</option>
<option value="10">10</option> <option value="10">10</option>
</select> </select>
</div>
</div>
</div> </div>
</div> </div>
<!-- /passcode-policy --> </div>
</div>
<!-- /passcode-policy -->
<!-- camera --> <!-- camera -->
<div class="wr-hidden-operation" data-operation="camera"> <div class="wr-hidden-operation" data-operation="camera">
<div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA"> <div class="panel panel-default operation-data" data-operation="camera" data-operation-code="CAMERA">
<div id="camera-heading" class="panel-heading" role="tab"> <div id="camera-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title"> <h2 class="sub-title panel-title">
Restrictions on Camera Restrictions on Camera
<label class="wr-input-control switch" data-toggle="collapse" data-target="#camera-body"> <label class="wr-input-control switch" data-toggle="collapse" data-target="#camera-body">
<input type="checkbox" /> <input type="checkbox" />
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
</label> </label>
<hr> <hr>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera. This configuration can be used to restrict the usage of camera on an Windows device together with all the applications using the camera.
Once this configuration profile is installed on a device, corresponding users will not be able Once this configuration profile is installed on a device, corresponding users will not be able
to modify these settings on their devices. to modify these settings on their devices.
</div>
</h2>
</div> </div>
<div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body"> </h2>
<div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert"> </div>
<i class="icon fw fw-error"></i><span></span> <div id="camera-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="camera-body">
</div> <div id="camera-feature-error-msg" class="alert alert-danger hidden" role="alert">
Un-check following checkbox in case you need to disable camera. <i class="icon fw fw-error"></i><span></span>
<br> </div>
<br> Un-check following checkbox in case you need to disable camera.
<div class="wr-input-control"> <br>
<label class="wr-input-control checkbox"> <br>
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" /> <div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="camera-enabled" type="checkbox" class="operationDataKeys" data-key="cameraEnabled" checked="checked" />
<span class="helper" title="Having this checked would enable Usage of phone camera in the device."> <span class="helper" title="Having this checked would enable Usage of phone camera in the device.">
&nbsp;&nbsp;&nbsp;Allow use of camera &nbsp;&nbsp;&nbsp;Allow use of camera
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
</div>
<br>
</div>
</div> </div>
<br>
</div> </div>
<!-- /camera --> </div>
</div>
<!-- /camera -->
<!-- encrypt-storage --> <!-- encrypt-storage -->
<div class="wr-hidden-operation" data-operation="encrypt-storage"> <div class="wr-hidden-operation" data-operation="encrypt-storage">
<div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE"> <div class="panel panel-default operation-data" data-operation="encrypt-storage" data-operation-code="ENCRYPT_STORAGE">
<div id="encrypt-storage-heading" class="panel-heading" role="tab"> <div id="encrypt-storage-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title"> <h2 class="sub-title panel-title">
Encryption Settings Encryption Settings
<label class="wr-input-control switch" data-toggle="collapse" data-target="#encrypt-storage-body"> <label class="wr-input-control switch" data-toggle="collapse" data-target="#encrypt-storage-body">
<input type="checkbox" /> <input type="checkbox" />
<span class="helper"></span> <span class="helper"></span>
<span class="text"></span> <span class="text"></span>
</label> </label>
<hr> <hr>
<div class="panel-title-description"> <div class="panel-title-description">
This configuration can be used to encrypt data on an Windows device, when the device is locked and This configuration can be used to encrypt data on an Windows device, when the device is locked and
make it readable when the passcode is entered. Once this configuration profile is installed on a device, make it readable when the passcode is entered. Once this configuration profile is installed on a device,
corresponding users will not be able to modify these settings on their devices. corresponding users will not be able to modify these settings on their devices.
</div>
</h2>
</div> </div>
<div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body"> </h2>
<div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert"> </div>
<i class="icon fw fw-error"></i><span></span> <div id="encrypt-storage-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="encrypt-storage-body">
</div> <div id="encrypt-storage-feature-error-msg" class="alert alert-danger hidden" role="alert">
Un-check following checkbox in case you need to disable storage-encryption. <i class="icon fw fw-error"></i><span></span>
<br> </div>
<br> Un-check following checkbox in case you need to disable storage-encryption.
<div class="wr-input-control"> <br>
<label class="wr-input-control checkbox"> <br>
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" /> <div class="wr-input-control">
<label class="wr-input-control checkbox">
<input id="encrypt-storage-enabled" type="checkbox" class="operationDataKeys" data-key="encryptStorageEnabled" checked="checked" />
<span class="helper" title="Having this checked would enable Storage-encryption in the device"> <span class="helper" title="Having this checked would enable Storage-encryption in the device">
&nbsp;&nbsp;&nbsp;Enable storage-encryption &nbsp;&nbsp;&nbsp;Enable storage-encryption
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span> <span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span> </span>
</label> </label>
</div> </div>
<br>
</div>
</div>
</div>
<!-- /encrypt-storage -->
<!--app-restriction-->
<div class="wr-hidden-operation" data-operation="app-restriction">
<div class="panel panel-default operation-data" data-operation="app-restriction" data-operation-code="APP-RESTRICTION">
<div id="app-restriction-heading" class="panel-heading" role="tab">
<h2 class="sub-title panel-title">
Application Restriction Settings
<label class="wr-input-control switch" data-toggle="collapse" data-target="#app-restriction-body">
<input type="checkbox" />
<span class="helper"></span>
<span class="text"></span>
</label>
<hr>
<div class="panel-title-description">
This configuration can be used to create a black list or white list of applications.
</div>
</h2>
</div>
<div id="app-restriction-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="app-restriction-body">
<div id="app-restriction-feature-error-msg" class="alert alert-danger hidden" role="alert">
<i class="icon fw fw-error"></i><span></span>
</div>
<select id="app-restriction-type" class="form-control operationDataKeys" data-key="restrictionType">
<option value="" selected="selected">
None
</option>
<option value="black-list">Black List</option>
<option value="white-list">White List</option>
</select>
<div class="wr-input-control">
<label class="wr-input-label" for="restricted-applications">
Restricted Application List
<span class="helper" title="Add an application to restrict.">
<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>
</span>
<br> <br>
<a href="#restricted-applications-grid" class="grid-input-add" data-click-event="add-form">
<span class="icon fw-stack">
<i class="fw fw-add fw-stack-1x"></i>
<i class="fw fw-ring fw-stack-2x"></i>
</span>
&nbsp;
Add Application
</a>
</label>
<div id="restricted-applications" class="operationDataKeys grouped-array-input multi-column-key-value-pair-array" data-key="restrictedApplications" data-column-count="2">
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>No:</th>
<th>Application Name/Description</th>
<th>Package Name</th>
<th></th>
</tr>
</thead>
<tbody data-add-form-container="#restricted-applications-grid">
<tr data-help-text="add-form">
<td colspan="4">
No entries added yet .
</td>
</tr>
</tbody>
</table>
<table class="template hidden">
<tbody data-add-form="#restricted-applications-grid">
<tr data-add-form-element="clone">
<td data-title="No:">
<span class="index"></span>
</td>
<td data-title="App Name">
<input type="text" class="form-control grid-input-text" data-child-key="appName" maxlength="100" data-default="" placeholder="[ Application Name or Description ]" />
</td>
<td data-title="Package Name">
<input type="text" class="form-control grid-input-text" data-child-key="packageName" maxlength="100" data-default="" placeholder="[ Package Name of Application ]" />
</td>
<td>
<span class="list-group-item-actions">
<a href="#restricted-applications-grid" class="grid-input-remove" data-click-event="remove-form">
<span class="fw-stack helper" title="Remove Entry">
<i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-delete fw-stack-1x"></i>
</span>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
<!-- /encrypt-storage --> </div>
</div>
<!--/app-restriction-->
<!-- wi-fi -->
<!--<div class="wr-hidden-operation" data-operation="wifi">-->
<!--<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">-->
<!--<div id="wifi-heading" class="panel-heading" role="tab">-->
<!--<h2 class="sub-title panel-title">-->
<!--Wi-Fi Settings-->
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi-body">-->
<!--<input type="checkbox" />-->
<!--<span class="helper"></span>-->
<!--<span class="text"></span>-->
<!--</label>-->
<!--<hr>-->
<!--<div class="panel-title-description">-->
<!--This configurations can be used to configure Wi-Fi access on an Android device.-->
<!--Once this configuration profile is installed on a device, corresponding users will not be able-->
<!--to modify these settings on their devices.-->
<!--</div>-->
<!--</h2>-->
<!--</div>-->
<!--<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">-->
<!--&lt;!&ndash;<div class="cloneable">&ndash;&gt;-->
<!--&lt;!&ndash;<a href="#" class="multi-view add enabled">&ndash;&gt;-->
<!--&lt;!&ndash;<span class="icon fw-stack">&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-add fw-stack-1x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-ring fw-stack-2x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;</span>&ndash;&gt;-->
<!--&lt;!&ndash;</a>&ndash;&gt;-->
<!--&lt;!&ndash;<a href="#" class="multi-view remove disabled">&ndash;&gt;-->
<!--&lt;!&ndash;<span class="icon fw-stack">&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-minus fw-stack-1x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-ring fw-stack-2x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;</span>&ndash;&gt;-->
<!--&lt;!&ndash;</a>&ndash;&gt;-->
<!--&lt;!&ndash;Wi-Fi Setting :&ndash;&gt;-->
<!--&lt;!&ndash;<br>&ndash;&gt;-->
<!--&lt;!&ndash;<br>&ndash;&gt;-->
<!--Please note that * sign represents required fields of data.-->
<!--<br>-->
<!--<br>-->
<!--<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
<!--<i class="icon fw fw-error"></i><span></span>-->
<!--</div>-->
<!--<div class="wr-input-control">-->
<!--<label class="wr-input-label" for="wifi-ssid">-->
<!--Service Set Identifier (SSID) *-->
<!--<span class="helper" title="Identification of the wireless network to be configured.">-->
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
<!--</span>-->
<!--<br>-->
<!--( should be 1-to-30 characters long )-->
<!--</label>-->
<!--<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]"/>-->
<!--</div>-->
<!--<div class="wr-input-control">-->
<!--<label class="wr-input-label" for="wifi-password">-->
<!--Password-->
<!--<span class="helper" title="Password for the wireless network.">-->
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
<!--</span>-->
<!--</label>-->
<!--<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]"/>-->
<!--</div>-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- /wi-fi -->
<!-- install-applications --> <!-- wi-fi -->
<!--<div class="wr-hidden-operation" data-operation="install-apps">--> <!--<div class="wr-hidden-operation" data-operation="wifi">-->
<!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">--> <!--<div class="panel panel-default operation-data" data-operation="wifi" data-operation-code="WIFI">-->
<!--<div class="panel-heading" role="tab">--> <!--<div id="wifi-heading" class="panel-heading" role="tab">-->
<!--<h2 class="sub-title panel-title">--> <!--<h2 class="sub-title panel-title">-->
<!--<br>--> <!--Wi-Fi Settings-->
<!--&nbsp;&nbsp;&nbsp;App Installations--> <!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#wifi-body">-->
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">--> <!--<input type="checkbox" />-->
<!--<input type="checkbox" />--> <!--<span class="helper"></span>-->
<!--<span class="helper"></span>--> <!--<span class="text"></span>-->
<!--<span class="text"></span>--> <!--</label>-->
<!--</label>--> <!--<hr>-->
<!--<br>--> <!--<div class="panel-title-description">-->
<!--<br>--> <!--This configurations can be used to configure Wi-Fi access on an Android device.-->
<!--</h2>--> <!--Once this configuration profile is installed on a device, corresponding users will not be able-->
<!--</div>--> <!--to modify these settings on their devices.-->
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">--> <!--</div>-->
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">--> <!--</h2>-->
<!--<i class="icon fw fw-error"></i><span></span>--> <!--</div>-->
<!--</div>--> <!--<div id="wifi-body" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="wifi-body">-->
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>--> <!--&lt;!&ndash;<div class="cloneable">&ndash;&gt;-->
<!--&lt;!&ndash;<a href="#" class="multi-view add enabled">&ndash;&gt;-->
<!--&lt;!&ndash;<span class="icon fw-stack">&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-add fw-stack-1x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-ring fw-stack-2x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;</span>&ndash;&gt;-->
<!--&lt;!&ndash;</a>&ndash;&gt;-->
<!--&lt;!&ndash;<a href="#" class="multi-view remove disabled">&ndash;&gt;-->
<!--&lt;!&ndash;<span class="icon fw-stack">&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-minus fw-stack-1x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;<i class="fw fw-ring fw-stack-2x"></i>&ndash;&gt;-->
<!--&lt;!&ndash;</span>&ndash;&gt;-->
<!--&lt;!&ndash;</a>&ndash;&gt;-->
<!--&lt;!&ndash;Wi-Fi Setting :&ndash;&gt;-->
<!--&lt;!&ndash;<br>&ndash;&gt;-->
<!--&lt;!&ndash;<br>&ndash;&gt;-->
<!--Please note that * sign represents required fields of data.-->
<!--<br>-->
<!--<br>-->
<!--<div id="wifi-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
<!--<i class="icon fw fw-error"></i><span></span>-->
<!--</div>-->
<!--<div class="wr-input-control">-->
<!--<label class="wr-input-label" for="wifi-ssid">-->
<!--Service Set Identifier (SSID) *-->
<!--<span class="helper" title="Identification of the wireless network to be configured.">-->
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
<!--</span>-->
<!--<br>-->
<!--( should be 1-to-30 characters long )-->
<!--</label>-->
<!--<input id="wifi-ssid" type="text" class="form-control operationDataKeys" data-key="wifiSSID" maxlength="100" placeholder="[ Required field ]"/>-->
<!--</div>-->
<!--<div class="wr-input-control">-->
<!--<label class="wr-input-label" for="wifi-password">-->
<!--Password-->
<!--<span class="helper" title="Password for the wireless network.">-->
<!--<span class="wr-help-tip glyphicon glyphicon-question-sign"></span>-->
<!--</span>-->
<!--</label>-->
<!--<input id="wifi-password" type="text" class="form-control operationDataKeys" data-key="wifiPassword" maxlength="100" placeholder="[ Optional field ]"/>-->
<!--</div>-->
<!--&lt;!&ndash;</div>&ndash;&gt;-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- /wi-fi -->
<!--<div class="wr-input-control">--> <!-- install-applications -->
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>--> <!--<div class="wr-hidden-operation" data-operation="install-apps">-->
<!--</div>--> <!--<div class="panel panel-default operation-data" data-operation="INSTALL_APPLICATION">-->
<!--<div class="wr-input-control">--> <!--<div class="panel-heading" role="tab">-->
<!--<label class="wr-input-control dropdown">--> <!--<h2 class="sub-title panel-title">-->
<!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>--> <!--<br>-->
<!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">--> <!--&nbsp;&nbsp;&nbsp;App Installations-->
<!--<option>Public</option>--> <!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installApp">-->
<!--<option>Enterprise</option>--> <!--<input type="checkbox" />-->
<!--</select>--> <!--<span class="helper"></span>-->
<!--</label>--> <!--<span class="text"></span>-->
<!--</div>--> <!--</label>-->
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>--> <!--<br>-->
<!--<br>-->
<!--</h2>-->
<!--</div>-->
<!--<div id="installApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installApp">-->
<!--<div id="install-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
<!--<i class="icon fw fw-error"></i><span></span>-->
<!--</div>-->
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
<!--<div class="wr-input-control">--> <!--<div class="wr-input-control">-->
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>--> <!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--<div class="wr-input-control">-->
<!--</div>--> <!--<label class="wr-input-control dropdown">-->
<!--</div>--> <!--<span class="helper" title="App Type">App Type<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></span>-->
<!-- /install-applications --> <!--<select class="form-control col-sm-8 operationDataKeys appTypesInput" id="type" data-key="type">-->
<!--<option>Public</option>-->
<!--<option>Enterprise</option>-->
<!--</select>-->
<!--</label>-->
<!--</div>-->
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
<!-- /uninstall-applications --> <!--<div class="wr-input-control">-->
<!--<div class="wr-hidden-operation" data-operation="uninstall-apps">--> <!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
<!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">--> <!--</div>-->
<!--<div class="panel-heading" role="tab">--> <!--</div>-->
<!--<h2 class="sub-title panel-title">--> <!--</div>-->
<!--<br>--> <!--</div>-->
<!--&nbsp;&nbsp;&nbsp;App Uninstallations--> <!-- /install-applications -->
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
<!--<input type="checkbox" />-->
<!--<span class="helper"></span>-->
<!--<span class="text"></span>-->
<!--</label>-->
<!--<br>-->
<!--<br>-->
<!--</h2>-->
<!--</div>-->
<!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
<!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
<!--<i class="icon fw fw-error"></i><span></span>-->
<!--</div>-->
<!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
<!--<!--span>Identification of the wireless network to connect to</span-->
<!--<div class="wr-input-control">-->
<!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- /uninstall-applications -->
<!-- /web-clips --> <!-- /uninstall-applications -->
<!--<div class="wr-hidden-operation" data-operation="web-clips">--> <!--<div class="wr-hidden-operation" data-operation="uninstall-apps">-->
<!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">--> <!--<div class="panel panel-default operation-data" data-operation="UNINSTALL_APPLICATION">-->
<!--<div class="panel-heading" role="tab">--> <!--<div class="panel-heading" role="tab">-->
<!--<h2 class="sub-title panel-title">--> <!--<h2 class="sub-title panel-title">-->
<!--<br>--> <!--<br>-->
<!--&nbsp;&nbsp;&nbsp;Web clips--> <!--&nbsp;&nbsp;&nbsp;App Uninstallations-->
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">--> <!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#uninstallApp">-->
<!--<input type="checkbox" />--> <!--<input type="checkbox" />-->
<!--<span class="helper"></span>--> <!--<span class="helper"></span>-->
<!--<span class="text"></span>--> <!--<span class="text"></span>-->
<!--</label>--> <!--</label>-->
<!--<br>--> <!--<br>-->
<!--<br>--> <!--<br>-->
<!--</h2>--> <!--</h2>-->
<!--</div>--> <!--</div>-->
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">--> <!--<div id="uninstallApp" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="uninstallApp">-->
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">--> <!--<div id="uninstall-app-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
<!--<i class="icon fw fw-error"></i><span></span>--> <!--<i class="icon fw fw-error"></i><span></span>-->
<!--</div>--> <!--</div>-->
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>--> <!--<label class="wr-input-label" title="Application Identifier">App Identifier<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
<!--<div class="wr-input-control">--> <!--<!--span>Identification of the wireless network to connect to</span-->
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>--> <!--<div class="wr-input-control">-->
<!--</div>--> <!--<input type="text" class="form-control operationDataKeys" id="package-name" data-key="packageName" placeholder="Enter App Identifier"/>-->
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>--> <!--</div>-->
<!--<div class="wr-input-control">--> <!--</div>-->
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!-- /uninstall-applications -->
<!--</div>-->
<!--</div>--> <!-- /web-clips -->
<!-- /web-clips --> <!--<div class="wr-hidden-operation" data-operation="web-clips">-->
</div> <!--<div class="panel panel-default operation-data" data-operation="WEBCLIP">-->
<!--<div class="panel-heading" role="tab">-->
<!--<h2 class="sub-title panel-title">-->
<!--<br>-->
<!--&nbsp;&nbsp;&nbsp;Web clips-->
<!--<label class="wr-input-control switch" data-toggle="collapse" data-target="#installWebClip">-->
<!--<input type="checkbox" />-->
<!--<span class="helper"></span>-->
<!--<span class="text"></span>-->
<!--</label>-->
<!--<br>-->
<!--<br>-->
<!--</h2>-->
<!--</div>-->
<!--<div id="installWebClip" class="panel-collapse panel-body collapse" role="tabpanel" aria-labelledby="installWebClip">-->
<!--<div id="install-webclip-feature-error-msg" class="alert alert-danger hidden" role="alert">-->
<!--<i class="icon fw fw-error"></i><span></span>-->
<!--</div>-->
<!--<label class="wr-input-label" title="Title of the web clip">Title<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
<!--<div class="wr-input-control">-->
<!--<input type="text" class="form-control operationDataKeys" id="title" data-key="title" placeholder="Enter Title"/>-->
<!--</div>-->
<!--<label class="wr-input-label" title="URL">URL<span class="wr-help-tip glyphicon glyphicon-question-sign"></span></label>-->
<!--<div class="wr-input-control">-->
<!--<input type="text" class="form-control operationDataKeys" id="url" data-key="url" placeholder="Enter URL"/>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!-- /web-clips -->
</div>
</div> </div>
Loading…
Cancel
Save