function formatButton($name, $attributes = '', $prefix = '', $suffix = '') { $button = $this->getButton($name); if (!$button['status']) { return ''; } return sprintf('%s<input type="submit" name="%s" value="%s" tabindex="%s"%s />%s', $prefix, $name, $button['label'], rex_a22_nextTabindex(), $attributes, $suffix); }
function getButtons() { $s = ''; $id = $this->getId(); foreach ($this->buttons as $button) { foreach ($button as $attr_name => $attr_value) { $button[$attr_name] = str_replace('%id%', $id, $attr_value); } $s .= sprintf(' <td class="inpicon"><a href="%s" tabindex="%s"><img src="pics/%s" width="16" height="16" alt="%s" title="%s" /></a></td>' . "\n", $button['href'], rex_a22_nextTabindex(), $button['image'], $button['title'], $button['title']); } return $s; }
/** * Gibt den HTML Content zurück */ function get() { $s = ''; $name = $this->getName(); $id = $this->getId(); $value = $this->getValue(); $attributes = $this->getAttributes(); $i = 0; foreach ($this->getBoxes() as $box) { $boxid = $id . $i; $checked = ''; if (in_array($box[1], $value)) { $checked = ' checked="checked"'; } $s .= sprintf('<input type="checkbox" name="%s[]" value="%s" id="%s" tabindex="%s"%s%s /><label for="%s">%s</label>', $name, $box[1], $boxid, rex_a22_nextTabindex(), $checked, $attributes, $boxid, $box[0]); $i++; } return $s; }
/** * Gibt den HTML Content zurück */ function get() { $options = ''; $name = $this->getName(); $value = $this->getValue(); foreach ($this->getOptions() as $opt) { $selected = ''; if (in_array($opt[1], $value)) { $selected = ' selected="selected"'; } $options .= sprintf('<option value="%s"%s>%s</option>', $opt[1], $selected, $opt[0]); } if ($this->multiple) { $name .= '[]'; $this->addAttribute('multiple', 'multiple'); $this->addAttribute('size', '5', false); } else { $this->addAttribute('size', '3', false); } return sprintf('<select name="%s" id="%s" tabindex="%s"%s>%s</select>', $name, $this->getId(), rex_a22_nextTabindex(), $this->getAttributes(), $options); }
function get() { return sprintf('<textarea name="%s" id="%s" tabindex="%s"%s>%s</textarea>', $this->getName(), $this->getId(), rex_a22_nextTabindex(), $this->getAttributes(), $this->getValue()); }
function get() { return sprintf('<input type="password" name="%s" value="%s" id="%s" tabindex="%s"%s />', $this->getName(), $this->getValue(), $this->getId(), rex_a22_nextTabindex(), $this->getAttributes()); }