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

@@ -13,11 +13,6 @@ abstract class Model_Service_Plugin extends ORM_OSB {
// Reset any sorting that may be defined in our parent
protected $_sorting = array();
/**
* Form info for admins to update
*/
abstract public function admin_update();
/**
* Our service name as defined in the DB
*/
@@ -46,6 +41,14 @@ abstract class Model_Service_Plugin extends ORM_OSB {
abstract public function username_value();
abstract public function password_value();
/**
* Form info for admins to update
*/
public function admin_update() {
return View::factory(sprintf('service/admin/plugin/%s/edit',$this->plugin()))
->set('o',$this);
}
public function manage_button() {
if (! $this->service->status OR $this->service->expiring())
return FALSE;
@@ -76,6 +79,10 @@ function() { $("form[id=id_"+t[0]+"_"+t[1]+"]").submit(); });
return TRUE;
}
protected function plugin() {
return strtolower(preg_replace('/(.*)_([a-zA-Z]+)$/',"$2",get_class($this)));
}
/**
* Get specific service details for use in other modules
* For Example: Invoice