| | |
| | | ?> |
| | | <template class="contentTable"> |
| | | <form class="table" |
| | | data-save="content" |
| | | <!-- data-save="content"--> |
| | | data-content="<?= esc_attr($this->dataType) ?>" |
| | | data-form-id="content-table-<?= esc_attr($this->dataType) ?>" |
| | | <?= $permissions?>> |
| | |
| | | ?> |
| | | <template class="contentTable"> |
| | | <form class="table" |
| | | data-save="content" |
| | | <!-- data-save="content"--> |
| | | data-content="<?= esc_attr($this->dataType) ?>" |
| | | data-form-id="content-table-<?= esc_attr($this->dataType) ?>"> |
| | | <?= jvbFormStatus() ?> |
| | |
| | | { |
| | | ob_start(); |
| | | ?> |
| | | <form class="edit-form" data-save="content" data-form-id="edit-<?=$this->dataType?>" data-autosave<?= ($this->isTimeline) ? ' data-timeline' : ''?>> |
| | | <!-- <form class="edit-form" data-save="content" data-form-id="edit---><?php //=$this->dataType?><!--" data-autosave--><?php //= ($this->isTimeline) ? ' data-timeline' : ''?><!-->--> |
| | | <form class="edit-form" data-form-id="edit-<?=$this->dataType?>" data-autosave<?= ($this->isTimeline) ? ' data-timeline' : ''?>> |
| | | <?= jvbFormStatus() ?> |
| | | <input type="hidden" name="form-id" value="<?=uniqid('new-')?>" /> |
| | | <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); |
| | |
| | | if (empty($this->bulkActions)) return; |
| | | ob_start(); |
| | | ?> |
| | | <form class="bulk-edit-form" data-save="content" data-form-id="bulk-edit-<?=$this->dataType?>"> |
| | | <!-- <form class="bulk-edit-form" data-save="content" data-form-id="bulk-edit---><?php //=$this->dataType?><!--">--> |
| | | <form class="bulk-edit-form" data-form-id="bulk-edit-<?=$this->dataType?>"> |
| | | <?= jvbFormStatus() ?> |
| | | <div class="selected"></div> |
| | | <p class="description">You can unselect items by clicking the image here.</p> |