diff --git a/Controllers/RvlController.cs b/Controllers/RvlController.cs index 570bd35..b55a463 100644 --- a/Controllers/RvlController.cs +++ b/Controllers/RvlController.cs @@ -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; } diff --git a/wwwroot/js/app.api.js b/wwwroot/js/app.api.js index 83d128b..c40a029 100644 --- a/wwwroot/js/app.api.js +++ b/wwwroot/js/app.api.js @@ -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), diff --git a/wwwroot/js/app.ravLicense.js b/wwwroot/js/app.ravLicense.js index 8b201d2..82ebd75 100644 --- a/wwwroot/js/app.ravLicense.js +++ b/wwwroot/js/app.ravLicense.js @@ -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 = ''; + // var html = ''; - for (var i = 0, len = res.length; i < len; ++i) { - html += (''); - customerList[res[i]['id']] = res[i]['name']; - } - $('#customerId').append(html); - } - }); + // for (var i = 0, len = res.length; i < len; ++i) { + // html += (''); + // 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); }; diff --git a/wwwroot/js/templates/app.ravLicense.handlebars b/wwwroot/js/templates/app.ravLicense.handlebars index 598ecbb..4726880 100644 --- a/wwwroot/js/templates/app.ravLicense.handlebars +++ b/wwwroot/js/templates/app.ravLicense.handlebars @@ -2,32 +2,8 @@
+ -
-
- -
- -
- -
-
- -
-
-
-
- - -
-
@@ -35,147 +11,51 @@
-
- -
- - + +
+
+
+ + +
+
- - +
+
+ +
+
+ +
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
- -
-
- - -
-
- - - -
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
- -
-
- -