X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgoto%2Fadmin%2Fsystems%2Fgoto%2FConfig%2Fclass_TemplateWidget.inc;h=d686439c19832711746d834c7640ec277db9fbcc;hb=b8fc08ad32f329a5d7b7d8432485f1dbd5555191;hp=d946c3cc15074c1245b2167577c73a2a0db9f736;hpb=c22e37423301ec8c33e5b3ff34db723968f0f572;p=gosa.git diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc index d946c3cc1..d686439c1 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc @@ -2,28 +2,48 @@ class TemplateWidget { - private $name = "unnamed"; - private $value = ""; + protected $name = "unnamed"; + protected $value = ""; - function __construct(&$config, $name, $value) + protected $description = ""; + protected $required = ""; + protected $type = ""; + protected $display = ""; + + function __construct(&$config, $name, $value, $description,$required,$type,$display) { + $this->config = &$config; $this->name = $name; $this->value = $value; - $this->config = &$config; + $this->description = $description; + $this->required = $required; + $this->type = $type; + $this->display = $display; + $class = get_class(); + $this->postName = "{$class}_{$this->name}"; + } + + function getDisplayName() + { + return($this->display); } function render() { - return("name}\" value=\"".set_post($this->value)."\">"); + return(""); } function save_object() { + if(isset($_POST[$this->postName])){ + $this->value = get_post($this->postName); + } } function getValue() { + return($this->value); } function getName() @@ -31,8 +51,9 @@ class TemplateWidget return($this->name); } - function setValue() + function setValue($value) { + $this->value = $value; } }