示例#1
0
 /**
  * Displays a batch widget for moving or copying items.
  *
  * @param   string  $extension  The extension that owns the category.
  * @return  string  The necessary HTML for the widget.
  */
 public static function item($extension)
 {
     // Create the copy/move options.
     $options = array(Select::option('c', Lang::txt('JLIB_HTML_BATCH_COPY')), Select::option('m', Lang::txt('JLIB_HTML_BATCH_MOVE')));
     // Create the batch selector to change select the category by which to move or copy.
     $lines = array('<label id="batch-choose-action-lbl" for="batch-choose-action">', Lang::txt('JLIB_HTML_BATCH_MENU_LABEL'), '</label>', '<fieldset id="batch-choose-action" class="combo">', '<select name="batch[category_id]" class="inputbox" id="batch-category-id">', '<option value="">' . Lang::txt('JSELECT') . '</option>', Select::options(Category::options($extension)), '</select>', Select::radiolist($options, 'batch[move_copy]', '', 'value', 'text', 'm'), '</fieldset>');
     return implode("\n", $lines);
 }
示例#2
0
 /**
  * Fetch a calendar element
  *
  * @param   string  $name          Element name
  * @param   string  $value         Element value
  * @param   object  &$node         XMLElement node object containing the settings for the element
  * @param   string  $control_name  Control name
  * @return  string
  */
 public function fetchElement($name, $value, &$node, $control_name)
 {
     $options = array();
     foreach ($node->children() as $option) {
         $val = (string) $option['value'];
         $text = (string) $option;
         $options[] = Builder\Select::option($val, $text);
     }
     return Builder\Select::radiolist($options, '' . $control_name . '[' . $name . ']', 'class="option"', 'value', 'text', $value, $control_name . $name, true) . '</fieldset>';
 }