1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43:
<?php
defined("ICMS_ROOT_PATH") or die("ImpressCMS root path not defined");
class icms_ipf_form_elements_Urllink extends icms_form_elements_Tray {
public function __construct($object, $key) {
parent::__construct($object->vars[$key]['form_caption'], " ");
$urllinkObj = $object->getUrlLinkObj($key);
$module_handler = icms::handler("icms_module");
$module = $module_handler->getByDirname($object->handler->_moduleName);
$this->addElement(new icms_form_elements_Label("", _CO_ICMS_URLLINK_URL));
$this->addElement(new icms_ipf_form_elements_Text($urllinkObj, "url_" . $key));
$this->addElement(new icms_form_elements_Label("", "<br/>" . _CO_ICMS_CAPTION));
$this->addElement(new icms_ipf_form_elements_Text($urllinkObj, "caption_" . $key));
$this->addElement(new icms_form_elements_Label("", "<br/>" . _CO_ICMS_DESC));
$this->addElement(new icms_ipf_form_elements_Text($urllinkObj, "desc_" . $key));
$this->addElement(new icms_form_elements_Label("", "<br/>" . _CO_ICMS_URLLINK_TARGET));
$this->addElement(new icms_form_elements_Hidden("mid_" . $key, $module->getVar("mid")));
$targ_val = $urllinkObj->getVar("target");
$targetRadio = new icms_form_elements_Radio("", "target_" . $key, $targ_val != "" ? $targ_val : "_blank");
$control = $urllinkObj->getControl("target");
$targetRadio->addOptionArray($control["options"]);
$this->addElement($targetRadio);
}
}