예제 #1
0
 // Ensure we have something to display.
 $val['title'] ? $title = $val['title'] : ($title = '<span class="fixme">Untitled</span>');
 // How big should the sort input fields be?
 if ($start_sort_order + $pages_per_view < 100) {
     $field_size = 4;
 } elseif ($start_sort_order + $pages_per_view < 1000) {
     $field_size = 5;
 } elseif ($start_sort_order + $pages_per_view < 10000) {
     $field_size = 6;
 } else {
     $field_size = 7;
 }
 // Build the sort_order field.
 $form->input_number('sort_order[' . $val['id'] . ']');
 $form->value(intval($val['sort_order']));
 $form->name('sort_order[' . $val['id'] . ']');
 $form->size($field_size);
 $order = $form->paint();
 // Build the selection checkbox.
 $select = '<input type="checkbox" name="sel[' . $val['id'] . ']" value="' . $val['id'] . '"/>' . "\n";
 // Keep track of the original order values so we can
 // compare against the artist’s entries. If they’re
 // different we know they want to rearrange comic pages.
 $form->input_hidden('orig_sort_order[' . $val['id'] . ']');
 $form->value(intval($val['sort_order']));
 $form->name('orig_sort_order[' . $val['id'] . ']');
 $orig_output .= $form->paint();
 // Got a marker? Oh boy.
 if ($val['marker_id'] && $val['marker_id'] > 0) {
     // Add the marker-removal link.
     $marker_link->query("delete_marker_id={$val['marker_id']}");
예제 #2
0
            $sl->setCurrent($item['value']);
            $sl->setValueID('id');
            $sl->setValueTitle('title');
            $date_options = $sl->buildSelect();
            $form_output .= '<div class="row form config"><div><label for="item-' . $item['id'] . '">' . $item['title'] . '</label></div><div>' . $date_options . '</div></div>';
        } elseif ($item['label'] != 'timezone') {
            $required = true;
            $value = $item['value'];
            if ($item['label'] == 'directory') {
                $required = false;
                if ($item['value'] == '/') {
                    $value = '';
                }
            }
            $form->input_text("item-{$item['id']}");
            $form->name('input[' . $item['label'] . ']');
            $form->label($item['title'] . $tooltip);
            $form->required($required);
            $form->value($value);
            $form->maxlength(255);
            $form_output .= $form->paint();
        } else {
            $form_output .= <<<EOL
<div class="row form config"><div><label for="item-6">Timezone</label></div><div>{$select_options}</div></div>
EOL;
        }
    }
    if ($ga_info) {
        $tooltip = '<span data-tooltip aria-haspopup="true" class="info has-tip" title="' . $ga_info['description'] . '"><i></i></span>';
        $form->input_text($ga_info['label'] . '[' . $ga_info['id'] . ']' . '[user_info]');
        $form->label($ga_info['title'] . '<br/>' . $ga_info['info_title'] . $tooltip);