| | |
| | | <input type="hidden" name="content" value="<?=$this->dataType?>" /> |
| | | <div class="fields"> |
| | | <?php |
| | | if (!empty($this->statuses)) { |
| | | if (empty($this->sections) && !empty($this->statuses)) { |
| | | echo Form::render('post_status', '', $this->getStatusFieldConfig('edit-')); |
| | | } |
| | | |
| | |
| | | 'icon' => $config['icon'] |
| | | ]; |
| | | } |
| | | |
| | | $tabs[$slug] = array_merge([ |
| | | 'title' => $config['label'], |
| | | 'title' => $config['title'], |
| | | 'content' => '', |
| | | 'description' => $config['description']??'', |
| | | ], $section); |
| | |
| | | foreach ($first as $f) { |
| | | if (array_key_exists($f, $fields)) { |
| | | if ($tabs) { |
| | | $tabs['basic']['content'] .= Form::render($f, '', $fields[$f]); |
| | | $tabs['main']['content'] .= Form::render($f, '', $fields[$f]); |
| | | } else { |
| | | echo Form::render($f, '', $fields[$f]); |
| | | } |
| | |
| | | |
| | | $fields = $this->nonTimelineFields; |
| | | } |
| | | |
| | | foreach ($fields as $n => $config) { |
| | | if (in_array($config['type'], ['taxonomy', 'selector'])) { |
| | | $config = array_merge($config, $this->taxConfig($config['taxonomy'], $config['label'])); |
| | | } |
| | | if ($tabs) { |
| | | $section = (array_key_exists('section', $config)) ? $config['section'] : 'basic'; |
| | | $section = (array_key_exists('section', $config)) && !empty($config['section']) ? $config['section'] : 'main'; |
| | | $tabs[$section]['content'] .= Form::render($n, '', $config); |
| | | } else { |
| | | echo Form::render($n, '', $config); |