| @@ 241-243 (lines=3) @@ | ||
| 238 | if (is_array($sections) && !empty($sections)) { |
|
| 239 | array_unshift($options, array('label' => __('Sections'), 'data-label' => 'sections', 'options' => array())); |
|
| 240 | ||
| 241 | foreach ($sections as $s) { |
|
| 242 | $options[0]['options'][] = array($s->get('id'), ($fields['source'] === $s->get('id')), General::sanitize($s->get('name'))); |
|
| 243 | } |
|
| 244 | } |
|
| 245 | ||
| 246 | $div->appendChild(Widget::Select('source', $options, array('id' => 'ds-context'))); |
|
| @@ 147-149 (lines=3) @@ | ||
| 144 | if (is_array($sections) && !empty($sections)) { |
|
| 145 | $section_options = array('label' => __('Sections'), 'options' => array()); |
|
| 146 | ||
| 147 | foreach ($sections as $s) { |
|
| 148 | $section_options['options'][] = array($s->get('id'), $source === $s->get('id'), General::sanitize($s->get('name'))); |
|
| 149 | } |
|
| 150 | } |
|
| 151 | ||
| 152 | $options[] = $section_options; |
|