Esempio n. 1
0
 public static function mkGUI($type, $title, $question, $info = FALSE, $except = FALSE, $list = FALSE, $name = NULL)
 {
     $DW =& $GLOBALS['DW'];
     $list = self::getAuthors();
     if ($info) {
         self::$opt = $DW->getDWOpt($GLOBALS['widget_id'], 'single-author');
         if (count($list) > DW_LIST_LIMIT) {
             $select_style = DW_LIST_STYLE;
         }
         if (count($list) > 0) {
             $DW->dumpOpt(self::$opt);
             echo '<br />';
             _e(self::$except, DW_L10N_DOMAIN);
             echo '<br />';
             echo '<div id="single-author-select" class="condition-select" ' . (isset($select_style) ? $select_style : '') . ' />';
             foreach ($list as $key => $value) {
                 $extra = 'onclick="ci(\'single_author_act_' . $key . '\')"';
                 echo '<input type="checkbox" id="single_author_act_' . $key . '" name="single_author_act[]" value="' . $key . '" ' . (self::$opt->count > 0 && in_array($key, self::$opt->act) ? 'checked="checked"' : '') . $extra . ' /> <label for="single_author_act_' . $key . '">' . $value . '</label><br />' . "\n";
             }
             echo '</div>' . "\n";
         }
     } else {
         parent::mkGUI(self::$type, self::$option[self::$name], self::$question, FALSE, self::$except, $list);
     }
 }