This commit is contained in:
2022-08-24 21:33:22 +00:00
parent fbca9f167d
commit 60f8b3ef5a
6 changed files with 86 additions and 60 deletions

View File

@@ -20,7 +20,9 @@ app.ravLicense = (function () {
initModule,
onGenerate,
onRevoke,
onPerpetualChanged;
onPerpetualChanged,
onLicenseExpiresSetOneMonth,
onLicenseExpiresSetOneYear;
//----------------- END MODULE SCOPE VARIABLES ---------------
//------------------- BEGIN UTILITY METHODS ------------------
@@ -128,9 +130,27 @@ app.ravLicense = (function () {
$("#perpettechcountblock").toggleClass("d-none");
$("#subusercountblock").toggleClass("d-none");
$("#subcustcountblock").toggleClass("d-none");
$('#licenseExpires').prop('checked', !$('#perpetual').prop('checked'));
return false; //prevent default
};
onLicenseExpiresSetOneMonth = function (event) {
event.preventDefault();
$('#licenseExpirationDate').val( moment().add(1, 'months').toISOString().substring(0, 10));
return false; //prevent default
};
onLicenseExpiresSetOneYear = function (event) {
event.preventDefault();
$('#licenseExpirationDate').val( moment().add(1, 'years').toISOString().substring(0, 10));
return false; //prevent default
};
// onSelectAllAddOns = function (event) {
// event.preventDefault();
// $('#wbi').prop('checked', true);
@@ -239,6 +259,10 @@ app.ravLicense = (function () {
// bind actions
$("#btn-revoke").bind("click", onRevoke);
$("#perpetual").bind("change", onPerpetualChanged);
$("#btn-license-expires-plus-one-month").bind("click", onLicenseExpiresSetOneMonth);
$("#btn-license-expires-plus-one-year").bind("click", onLicenseExpiresSetOneYear);
};
// return public methods