alecpl
2010-09-15 f8e8af7e7c9f43f63a75db5dfb33479866bd7c48
- Settings block (fieldset) can have any content (not only a table with hardcoded structure)


2 files modified
11 ■■■■ changed files
program/steps/settings/edit_prefs.inc 5 ●●●● patch | view | raw | blame | history
program/steps/settings/func.inc 6 ●●●●● patch | view | raw | blame | history
program/steps/settings/edit_prefs.inc
@@ -41,7 +41,7 @@
  $out = $form_start;
  foreach ($SECTIONS[$CURR_SECTION]['blocks'] as $idx => $block) {
    if ($block['options']) {
    if (!empty($block['options'])) {
      $table = new html_table(array('cols' => 2));
      foreach ($block['options'] as $option) {
@@ -54,6 +54,9 @@
    
      $out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $table->show($attrib));
      }
    else if (!empty($block['content'])) {
      $out .= html::tag('fieldset', null, html::tag('legend', null, $block['name']) . $block['content']);
    }
    }
  return $out . $form_end;
program/steps/settings/func.inc
@@ -685,11 +685,9 @@
    
    // create output
    foreach ($data['blocks'] as $block) {
      if ($block['options']) {
        foreach ($block['options'] as $option) {
      if (!empty($block['content']) || !empty($block['options'])) {
          $found = true;
      break 2;
    }
        break;
      }
    }