/** * Shows the administration interface for Picture. * * @param string $subclass_admin_interface HTML code to be added after the * administration interface * * @return string HTML code for the administration interface */ public function getAdminUI($subclass_admin_interface = null, $title = null) { // Init values $html = ''; $width = $this->getWidth(); $height = $this->getHeight(); $hyperlink_url = htmlspecialchars($this->getHyperlinkUrl(), ENT_QUOTES); $html .= "<ul class='admin_element_list'>\n"; if ($this->configEnableHyperlink) { $html .= "<li class='admin_element_item_container'>\n"; $html .= "<div class='admin_element_data'>\n"; $html .= "<div class='admin_element_label'>" . _("Hyperlink URL (leave empty if you don't need it)") . " : </div>\n"; $html .= "<input type='text' name='pictures_{$this->getId()}_hyperlink_url' value='{$hyperlink_url}'>"; $html .= "</div>\n"; $html .= "</li>\n"; } if ($this->configEnableEditWidthHeight) { $html .= "<li class='admin_element_item_container'>\n"; $html .= "<div class='admin_element_data'>\n"; $html .= "<div class='admin_element_label'>" . _("Width (leave empty if you want to keep original width)") . " : </div>\n"; $html .= "<input type='text' name='pictures_{$this->getId()}_width' value='{$width}'>"; $html .= "</div>\n"; $html .= "</li>\n"; $html .= "<li class='admin_element_item_container'>\n"; $html .= "<div class='admin_element_data'>\n"; $html .= "<div class='admin_element_label'>" . _("Height (leave empty if you want to keep original height)") . " : </div>\n"; $html .= "<input type='text' name='pictures_{$this->getId()}_height' value='{$height}'>"; $html .= "</div>\n"; $html .= "</li>\n"; } // Show File admin UI + display the picture $html .= "<li class='admin_element_item_container'>\n"; $html .= _("Preview") . ":"; $html .= $this->getUserUI(); $html .= "</li>\n"; $html .= "</ul>\n"; $html .= $subclass_admin_interface; return parent::getAdminUI($html, $title); }