Merge pull request #389 from inoshperera/master

fixing EMM-1788 calDAV policy validation issue
revert-dabc3590
Milan Perera 8 years ago committed by GitHub
commit d368cffa99

@ -1843,28 +1843,23 @@ validateStep["policy-profile"] = function () {
if (continueToCheckNextInputs) { if (continueToCheckNextInputs) {
var calendarAccountPort = $("input#calendar-account-port").val(); var calendarAccountPort = $("input#calendar-account-port").val();
if (!calendarAccountPort) { if (calendarAccountPort) {
validationStatus = { if (!$.isNumeric(calendarAccountPort)) {
"error": true, validationStatus = {
"subErrorMsg": "Account Port is empty. You cannot proceed.", "error": true,
"erroneousFeature": operation "subErrorMsg": "Account Port requires a number input.",
}; "erroneousFeature": operation
continueToCheckNextInputs = false; };
} else if (!$.isNumeric(calendarAccountPort)) { continueToCheckNextInputs = false;
validationStatus = { } else if (!inputIsValidAgainstRange(calendarAccountPort, 0, 65535)) {
"error": true, validationStatus = {
"subErrorMsg": "Account Port requires a number input.", "error": true,
"erroneousFeature": operation "subErrorMsg": "Account Port is not within the range " +
};
continueToCheckNextInputs = false;
} else if (!inputIsValidAgainstRange(calendarAccountPort, 0, 65535)) {
validationStatus = {
"error": true,
"subErrorMsg": "Account Port is not within the range " +
"of valid port numbers.", "of valid port numbers.",
"erroneousFeature": operation "erroneousFeature": operation
}; };
continueToCheckNextInputs = false; continueToCheckNextInputs = false;
}
} }
} }

@ -3236,7 +3236,7 @@
</label> </label>
<input id="calendar-account-port" type="text" class="form-control operationDataKeys" <input id="calendar-account-port" type="text" class="form-control operationDataKeys"
data-key="calendarAccountPort" maxlength="5" data-default="" data-key="calendarAccountPort" maxlength="5" data-default=""
placeholder="[ Required field which requires Number Input ]"/> placeholder="[ Optional field which requires Number Input ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">

@ -1601,28 +1601,23 @@ validateStep["policy-profile"] = function () {
if (continueToCheckNextInputs) { if (continueToCheckNextInputs) {
var calendarAccountPort = $("input#calendar-account-port").val(); var calendarAccountPort = $("input#calendar-account-port").val();
if (!calendarAccountPort) { if (calendarAccountPort) {
validationStatus = { if (!$.isNumeric(calendarAccountPort)) {
"error": true, validationStatus = {
"subErrorMsg": "Account Port is empty. You cannot proceed.", "error": true,
"erroneousFeature": operation "subErrorMsg": "Account Port requires a number input.",
}; "erroneousFeature": operation
continueToCheckNextInputs = false; };
} else if (!$.isNumeric(calendarAccountPort)) { continueToCheckNextInputs = false;
validationStatus = { } else if (!inputIsValidAgainstRange(calendarAccountPort, 0, 65535)) {
"error": true, validationStatus = {
"subErrorMsg": "Account Port requires a number input.", "error": true,
"erroneousFeature": operation "subErrorMsg": "Account Port is not within the range " +
}; "of valid port numbers.",
continueToCheckNextInputs = false; "erroneousFeature": operation
} else if (!inputIsValidAgainstRange(calendarAccountPort, 0, 65535)) { };
validationStatus = { continueToCheckNextInputs = false;
"error": true, }
"subErrorMsg": "Account Port is not within the range " +
"of valid port numbers.",
"erroneousFeature": operation
};
continueToCheckNextInputs = false;
} }
} }

@ -3339,7 +3339,7 @@
</label> </label>
<input id="calendar-account-port" type="text" class="form-control operationDataKeys" <input id="calendar-account-port" type="text" class="form-control operationDataKeys"
data-key="calendarAccountPort" maxlength="5" data-default="" data-key="calendarAccountPort" maxlength="5" data-default=""
placeholder="[ Required field which requires Number Input ]"/> placeholder="[ Optional field which requires Number Input ]"/>
</div> </div>
<div class="wr-input-control"> <div class="wr-input-control">

Loading…
Cancel
Save