Admin service updates for ssl, adsl

This commit is contained in:
Deon George
2013-11-09 15:51:08 +11:00
parent 2d9d7f383c
commit 158a4f9e47
13 changed files with 235 additions and 170 deletions

View File

@@ -32,15 +32,6 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
);
// Required abstract functions
public function admin_update() {
return View::factory('service/admin/adsl/update')
->set('mediapath',Route::get('default/media'))
->set('so',$this);
}
/**
* When does this service expire
*/
public function expire() {
// @todo This should work out if the invoices are currently due, then the expire is the invoice date, otherwise the next invoice date.
return NULL;
@@ -50,6 +41,33 @@ class Model_Service_Plugin_Adsl extends Model_Service_Plugin {
return $this->service_number;
}
public function admin_update() {
Script::factory()
->type('stdin')
->data('
$(document).ready(function() {
$("#service_connect_date_label").datepicker({
autoclose : true,
startDate : now,
format : "dd-M-yyyy",
todayBtn : true,
}).on("hide",function(ev) {
$("input[id=service_connect_date]").val(ev.date.valueOf()/1000);
});
$("#service_contract_date_label").datepicker({
autoclose : true,
startDate : now,
format : "dd-M-yyyy",
todayBtn : true,
}).on("hide",function(ev) {
$("input[id=service_contract_date]").val(ev.date.valueOf()/1000);
});
});
');
return parent::admin_update();
}
public function product() {
if ($this->provided_adsl_plan_id)
return $this->adsl_plan;