This commit is contained in:
@@ -18,7 +18,8 @@ app.ravLicense = (function () {
|
||||
var stateMap = {},
|
||||
configModule,
|
||||
initModule,
|
||||
onGenerate;
|
||||
onGenerate,
|
||||
onRevoke;
|
||||
//----------------- END MODULE SCOPE VARIABLES ---------------
|
||||
|
||||
//------------------- BEGIN UTILITY METHODS ------------------
|
||||
@@ -84,7 +85,10 @@ app.ravLicense = (function () {
|
||||
$.gevent.publish("app-show-error", res.msg);
|
||||
} else {
|
||||
page(
|
||||
"#!/ravLicenses/" + stateMap.id + "/" + stateMap.context.params.cust_id
|
||||
"#!/ravLicenses/" +
|
||||
stateMap.id +
|
||||
"/" +
|
||||
stateMap.context.params.cust_id
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -93,6 +97,16 @@ app.ravLicense = (function () {
|
||||
return false; //prevent default
|
||||
};
|
||||
|
||||
onRevoke = function (event) {
|
||||
event.preventDefault();
|
||||
$("#registeredTo").val("REVOKED");
|
||||
$("#licenseExpires").prop("checked", true);
|
||||
var yesterday = moment().add(-1, "days").toISOString().substring(0, 10);
|
||||
$('input[type="date"]').val(yesterday);
|
||||
|
||||
return false; //prevent default
|
||||
};
|
||||
|
||||
// onSelectAllAddOns = function (event) {
|
||||
// event.preventDefault();
|
||||
// $('#wbi').prop('checked', true);
|
||||
@@ -192,6 +206,8 @@ app.ravLicense = (function () {
|
||||
|
||||
//var oneMonthFromNow = moment().add(1, 'months').toISOString().substring(0, 10);
|
||||
//$('#lockoutDate').val(oneMonthFromNow);
|
||||
// bind actions
|
||||
$("#btn-revoke").bind("click", onRevoke);
|
||||
};
|
||||
|
||||
// return public methods
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="app-frm-buttons">
|
||||
|
||||
<button id="btn-revoke" class="btn btn-warning">Revoke</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user