示例#1
0
 /**
  * Display a batch widget for the user selector.
  *
  * @param   boolean  $noUser  Choose to display a "no user" option
  * @return  string   The necessary HTML for the widget.
  */
 public static function user($noUser = true)
 {
     $optionNo = '';
     if ($noUser) {
         $optionNo = '<option value="0">' . Lang::txt('JLIB_HTML_BATCH_USER_NOUSER') . '</option>';
     }
     // Create the batch selector to select a user on a selection list.
     $lines = array('<label id="batch-user-lbl" for="batch-user" class="hasTip" title="' . Lang::txt('JLIB_HTML_BATCH_USER_LABEL') . '::' . Lang::txt('JLIB_HTML_BATCH_USER_LABEL_DESC') . '">', Lang::txt('JLIB_HTML_BATCH_USER_LABEL'), '</label>', '<select name="batch[user_id]" class="inputbox" id="batch-user-id">', '<option value="">' . Lang::txt('JLIB_HTML_BATCH_USER_NOCHANGE') . '</option>', $optionNo, Select::options(\JHtml::_('user.userlist'), 'value', 'text'), '</select>');
     return implode("\n", $lines);
 }