diff --git a/src/web/admin/admin_extension_list.html b/src/web/admin/admin_extension_list.html index c2a3b65..0b1db3b 100644 --- a/src/web/admin/admin_extension_list.html +++ b/src/web/admin/admin_extension_list.html @@ -92,7 +92,7 @@ + " " + " " + " " - + " " + + " " // + " " + " " // + " " @@ -107,7 +107,7 @@ + " " + " " + " " - + " " + + " " // + " " + " " // + " " @@ -141,6 +141,7 @@ var maestroExtensionID; var maestroID; var maestroName; + var availableDate; var registeredAccountType; for (var i=0; i < children.length; i++) { // console.log(children); @@ -156,20 +157,41 @@ } else if (children[i].className == "maestro_name col-sm text-success") { maestroName = children[i].value; continue; + } else if (children[i].className == "availableDate col-sm text-right") { + availableDate = children[i].value; + continue; } else if (children[i].className == "registered_account_type col-sm text-right") { registeredAccountType = accountTypeValue(children[i].value); continue; } } - console.log(maestroExtensionID); - console.log(maestroID); - console.log(maestroName); - console.log(registeredAccountType); - return; + var availableDateArray = availableDate.split("-"); + // console.log("year : " + availableDateArray[0]); + // console.log("month : " + availableDateArray[1]); + // console.log("day : " + availableDateArray[2]); + var endDate = new Date(availableDateArray[0], availableDateArray[1] - 1, availableDateArray[2]); + // console.log("endDate : " + endDate); + var newDate = new Date(endDate.setFullYear(endDate.getFullYear() + 1)); + // console.log("newDate : " + newDate); + var newAvailableDate = newDate.toISOString().substring(0, 10); + // console.log("newAvailableDate : " + newAvailableDate); + + // console.log(maestroExtensionID); + // console.log(maestroID); + // console.log(maestroName); + // // console.log(availableDate); + // console.log(newAvailableDate); + // console.log(registeredAccountType); + // return; sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode); "./../server/admin/extension_maestro.php", - "maestro_extension_id=" + maestroExtensionID + "&maestro_id=" + maestroID + + "&maestro_name=" + maestroName + "®istered_account_type=" + registeredAccountType, + // $maestro_name, $new_available_date, $maestro_email + "maestro_extension_id=" + maestroExtensionID + + "&maestro_id=" + maestroID + + "&maestro_name=" + maestroName + + "&new_available_date=" + newAvailableDate + + "®istered_account_type=" + registeredAccountType, function(jsonData) { loadMaestroExtensionList(""); diff --git a/src/web/module/maestro_extension.html b/src/web/module/maestro_extension.html index 509ebe3..0b07b90 100644 --- a/src/web/module/maestro_extension.html +++ b/src/web/module/maestro_extension.html @@ -1,6 +1,8 @@