This commit is contained in:
2020-06-17 20:32:10 +00:00
parent 0aa00e7f8d
commit ce035b1072
4 changed files with 78 additions and 190 deletions

View File

@@ -33,6 +33,8 @@ namespace rockfishCore.Controllers
[Required]
public Guid DbId { get; set; }
[Required]
public bool LicenseExpires {get;set;}
[Required]
public long LicenseExpiration { get; set; }
[Required]
public long MaintenanceExpiration { get; set; }

View File

@@ -282,7 +282,7 @@ app.api = (function () {
$.ajax({
method: "post",
dataType: "text",
url: app.shell.stateMap.apiUrl + "license/generate",
url: app.shell.stateMap.apiUrl + "rvl",
headers: getAuthHeaderObject(),
contentType: "application/json; charset=utf-8",
data: JSON.stringify(objData),

View File

@@ -18,7 +18,7 @@ app.ravLicense = (function () {
var
stateMap = {},
configModule, initModule, onGenerate, onSelectAllAddOns;
configModule, initModule, onGenerate;
//----------------- END MODULE SCOPE VARIABLES ---------------
//------------------- BEGIN UTILITY METHODS ------------------
@@ -31,6 +31,7 @@ app.ravLicense = (function () {
[Required]
public Guid DbId { get; set; }
[Required]
public bool licenseExipres (rental type)
public long LicenseExpiration { get; set; }
[Required]
public long MaintenanceExpiration { get; set; }
@@ -65,37 +66,41 @@ app.ravLicense = (function () {
var submitData = app.utilB.objectifyFormDataArray(formData);
app.api.createRavLicense(submitData, function (res) {
if (res.error) {
$.gevent.publish('app-show-error', res.msg);
} else {
$('#key').val(res);
return false;
}
});
//clean up the data before submit
//submit
alert("STUB submit");
// app.api.createRavLicense(submitData, function (res) {
// if (res.error) {
// $.gevent.publish('app-show-error', res.msg);
// } else {
// $('#key').val(res);
// return false;
// }
// });
return false; //prevent default
};
onSelectAllAddOns = function (event) {
event.preventDefault();
$('#wbi').prop('checked', true);
$('#mbi').prop('checked', true);
$('#ri').prop('checked', true);
$('#qbi').prop('checked', true);
$('#qboi').prop('checked', true);
$('#pti').prop('checked', true);
$('#quickNotification').prop('checked', true);
$('#exportToXls').prop('checked', true);
$('#outlookSchedule').prop('checked', true);
$('#oli').prop('checked', true);
$('#importExportCSVDuplicate').prop('checked', true);
// onSelectAllAddOns = function (event) {
// event.preventDefault();
// $('#wbi').prop('checked', true);
// $('#mbi').prop('checked', true);
// $('#ri').prop('checked', true);
// $('#qbi').prop('checked', true);
// $('#qboi').prop('checked', true);
// $('#pti').prop('checked', true);
// $('#quickNotification').prop('checked', true);
// $('#exportToXls').prop('checked', true);
// $('#outlookSchedule').prop('checked', true);
// $('#oli').prop('checked', true);
// $('#importExportCSVDuplicate').prop('checked', true);
return false; //prevent default
};
// return false; //prevent default
// };
// onTemplates = function(event) {
// event.preventDefault();
@@ -129,24 +134,24 @@ app.ravLicense = (function () {
//case 3233 customer list
//Fill customer list combo
var customerList = {};
// var customerList = {};
//get customers
app.api.get('customer/list', function (res) {
if (res.error) {
$.gevent.publish('app-show-error', res.msg);
} else {
// //get customers
// app.api.get('customer/list', function (res) {
// if (res.error) {
// $.gevent.publish('app-show-error', res.msg);
// } else {
var html = '<option value="0">&lt;TRIAL&gt;</option>';
// var html = '<option value="0">&lt;TRIAL&gt;</option>';
for (var i = 0, len = res.length; i < len; ++i) {
html += ('<option value="' + res[i]['id'] + '">' + res[i]['name'] + '</option>');
customerList[res[i]['id']] = res[i]['name'];
}
$('#customerId').append(html);
}
});
// for (var i = 0, len = res.length; i < len; ++i) {
// html += ('<option value="' + res[i]['id'] + '">' + res[i]['name'] + '</option>');
// customerList[res[i]['id']] = res[i]['name'];
// }
// $('#customerId').append(html);
// }
// });
//Context menu
@@ -159,19 +164,20 @@ app.ravLicense = (function () {
//Context menu
app.nav.contextClear();
app.nav.contextAddButton('btn-generate', 'Make', 'key', onGenerate);
app.nav.contextAddButton('btn-select-all-addons', 'All', 'check-all', onSelectAllAddOns);
app.nav.contextAddButton('btn-generate', 'Generate and Send', 'key', onGenerate);
// app.nav.contextAddButton('btn-select-all-addons', 'All', 'check-all', onSelectAllAddOns);
// app.nav.contextAddLink("licenseRequests/", "Requests", "voice");
app.nav.contextAddLink("licenseTemplates/", "", "layers");
// app.nav.contextAddLink("licenseTemplates/", "", "layers");
//case 3233
app.nav.contextAddLink("licenses/", "List", "");
//set all date inputs to today plus one year
var oneYearFromNow = moment().add(1, 'years').toISOString().substring(0, 10);
var oneMonthFromNow = moment().add(1, 'months').toISOString().substring(0, 10);
$('input[type="date"]').val(oneYearFromNow);
$('#lockoutDate').val(oneMonthFromNow);
//var oneMonthFromNow = moment().add(1, 'months').toISOString().substring(0, 10);
//$('#lockoutDate').val(oneMonthFromNow);
};

View File

@@ -2,32 +2,8 @@
<form id="frm" method="post" action="index.html">
<div class="row">
<input id="siteId" name="siteId" type="hidden" value="">
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="keyWillLockout">
<input class="form-check-input" type="checkbox" name="keyWillLockout" id="keyWillLockout"> Expiring test key</label>
</div>
<input class="form-control" type="date" id="lockoutDate" name="lockoutDate" value="">
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="isLite">
<input class="form-check-input" type="checkbox" name="isLite" id="isLite"> AyaNova LITE</label>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="licenseType">License type</label>
<select class="form-control" name="licenseType">
<option value="new">New</option>
<option value="addon">Renewal / Add-on</option>
<option value="licensedTrial">Licensed trial</option>
<option value="webRequestedTrial">Web requested trial</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="registeredTo">Registered to</label>
@@ -35,147 +11,51 @@
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="customerId">Customer</label>
<select class="form-control" id="customerId" name="customerId" />
<label for="dbId">dbId</label>
<input class="form-control" type="text" id="dbId" name="dbId" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="emailAddress">Email address</label>
<input class="form-control" type="text" id="emailAddress" name="emailAddress" value="">
<label for="maintenanceExpiration">Support expires</label>
<input class="form-control" type="date" id="maintenanceExpiration" name="maintenanceExpiration"
value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="licenseExpires">
<input class="form-check-input" type="checkbox" name="licenseExpires" id="licenseExpires">
Temporary key / expires
</label>
<input class="form-control" type="date" id="licenseExpiration" name="licenseExpiration" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="users">Users</label>
<select class="form-control" name="users">
<option value="1">1</option>
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
<option value="50">50</option>
<option value="999">999</option>
<label for="registeredTo">Scheduleable users</label>
<input class="form-control" type="number" id="techcount" name="techcount" value="1">
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="options">Additional features</label>
<select class="form-control" name="options" multiple>
<option value="ServiceMode">Rental Key</option>
<option value="Accounting">Accounting</option>
</select>
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label for="supportExpiresDate">Support expires</label>
<input class="form-control" type="date" id="supportExpiresDate" name="supportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="wbi">
<input class="form-check-input" type="checkbox" name="wbi" id="wbi"> WBI
</label>
<input class="form-control" type="date" id="wbiSupportExpiresDate" name="wbiSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="mbi">
<input class="form-check-input" type="checkbox" name="mbi" id="mbi"> MBI
</label>
<input class="form-control" type="date" id="mbiSupportExpiresDate" name="mbiSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="ri">
<input class="form-check-input" type="checkbox" name="ri" id="ri"> RI
</label>
<input class="form-control" type="date" id="riSupportExpiresDate" name="riSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="qbi">
<input class="form-check-input" type="checkbox" name="qbi" id="qbi"> QBI
</label>
<input class="form-control" type="date" id="qbiSupportExpiresDate" name="qbiSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="qboi">
<input class="form-check-input" type="checkbox" name="qboi" id="qboi"> QBOI
</label>
<input class="form-control" type="date" id="qboiSupportExpiresDate" name="qboiSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="pti">
<input class="form-check-input" type="checkbox" name="pti" id="pti"> PTI
</label>
<input class="form-control" type="date" id="ptiSupportExpiresDate" name="ptiSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="quickNotification">
<input class="form-check-input" type="checkbox" name="quickNotification" id="quickNotification"> Quick notification</label>
<input class="form-control" type="date" id="quickNotificationSupportExpiresDate" name="quickNotificationSupportExpiresDate"
value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="exportToXls">
<input class="form-check-input" type="checkbox" name="exportToXls" id="exportToXls"> Export to XLS</label>
<input class="form-control" type="date" id="exportToXlsSupportExpiresDate" name="exportToXlsSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="outlookSchedule">
<input class="form-check-input" type="checkbox" name="outlookSchedule" id="outlookSchedule"> Outlook Schedule</label>
<input class="form-control" type="date" id="outlookScheduleSupportExpiresDate" name="outlookScheduleSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="oli">
<input class="form-check-input" type="checkbox" name="oli" id="oli"> OLI
</label>
<input class="form-control" type="date" id="oliSupportExpiresDate" name="oliSupportExpiresDate" value="">
</div>
</div>
<div class="col-sm-6">
<div class="form-check">
<label class="form-check-label" for="importExportCSVDuplicate">
<input class="form-check-input" type="checkbox" name="importExportCSVDuplicate" id="importExportCSVDuplicate"> Import / export CSV duplicate</label>
<input class="form-control" type="date" id="importExportCSVDuplicateSupportExpiresDate" name="importExportCSVDuplicateSupportExpiresDate"
value="">
</div>
</div>
<div class="col-sm-12">
<div class="form-group">
<label for="key">Key</label>
<textarea class="form-control" id="key" name="key" rows="10" />
</div>
</div>
</div>
<div class="app-frm-buttons">
</div>