Fix abstract passwords in host/domain manage planel logins

This commit is contained in:
Deon George
2012-06-22 15:12:59 +10:00
parent 0eecfe8abd
commit df82268405
12 changed files with 93 additions and 42 deletions

View File

@@ -57,16 +57,26 @@ class Model_Service_Plugin_Domain extends Model_Service_Plugin {
->set('so',$this);
}
public function username_value() {
return $this->registrar_username;
}
public function password_value() {
return $this->registrar_password;
}
/**
* This provides us with a manage button to jump to the registrar
* to manage the domain.
*/
public function manage_button() {
return ($this->registrar_username AND $this->registrar_password) ? $this->domain_registrar->manage_button($this->registrar_username,$this->registrar_password,$this->name()) : _('Please contact us');
public function manage_button($t='') {
parent::manage_button($t);
return ($this->username_value() AND $this->password_value()) ? $this->domain_registrar->manage_button($this,$t) : _('Please contact us');
}
public function manage_dns_button() {
return $this->service_plugin_host->manage_button();
return $this->service_plugin_host->manage_button('service_plugin_host');
}
}
?>