| | |
| | | class="decrease" |
| | | title="<?= array_key_exists('remove', $field) ? $field['remove'] : 'Decrease amount' ?>" |
| | | aria-label="Decrease <?= esc_attr($field['label']); ?>"> |
| | | <?= jvbIcon('minus')?> |
| | | <?= jvbIcon('minus-square')?> |
| | | </button> |
| | | |
| | | <input type="number" |
| | |
| | | class="increase" |
| | | title="<?= array_key_exists('add', $field) ? $field['add'] : 'Increase amount' ?>" |
| | | aria-label="Increase <?= esc_attr($field['label']); ?>"> |
| | | <?= jvbIcon('add')?> |
| | | <?= jvbIcon('plus-square')?> |
| | | </button> |
| | | </div> |
| | | <?php $this->renderDescription($description, $name); ?> |
| | |
| | | <div class="repeater-row" data-index="<?= esc_attr($index); ?>"> |
| | | <details <?= (is_string($index)) ? 'open' : ''; ?>> |
| | | <summary class="repeater-row-header row btw"> |
| | | <span class="drag-handle"><?= jvbIcon('grab'); ?></span> |
| | | <span class="drag-handle"><?= jvbIcon('dots-six-vertical'); ?></span> |
| | | <span class="row-number">#<?= esc_html($display_number); ?></span> |
| | | <span class="row-title"><?= esc_html($this->getRowTitle($fields, $values, $rowTitle)); ?></span> |
| | | <button type="button" class="remove-row" title="Remove"> |
| | | <?= jvbIcon('delete', ['title'=>'Remove']); ?> |
| | | <?= jvbIcon('trash', ['title'=>'Remove']); ?> |
| | | </button> |
| | | </summary> |
| | | <div class="repeater-row-content"> |
| | |
| | | <button title="Add <?= esc_attr(ucfirst($field['post_type'])) ?>" |
| | | class="add-item-btn" |
| | | type="button"> |
| | | <?= jvbIcon('add', ['title' => "Add " . ucfirst($field['post_type'])]) ?> |
| | | <?= jvbIcon('plus-square', ['title' => "Add " . ucfirst($field['post_type'])]) ?> |
| | | </button> |
| | | </div> |
| | | |
| | |
| | | <?php endif; ?> |
| | | |
| | | <button type="button" class="search-button"> |
| | | <?= jvbIcon('search', ['title' => 'Search']); ?> |
| | | <?= jvbIcon('magnifying-glass', ['title' => 'Search']); ?> |
| | | </button> |
| | | </div> |
| | | </div> |
| | |
| | | <span class="item-title"><?= esc_html($item_title); ?></span> |
| | | <span class="item-type"><?= esc_html(ucfirst($item_object)); ?></span> |
| | | <button type="button" class="remove-item row"> |
| | | <?= jvbIcon('close', ['title' => 'Remove']); ?> |
| | | <?= jvbIcon('x', ['title' => 'Remove']); ?> |
| | | </button> |
| | | </li> |
| | | <?php |
| | |
| | | const removeBtn = document.createElement('button'); |
| | | removeBtn.type = 'button'; |
| | | removeBtn.className = 'remove-item'; |
| | | removeBtn.innerHTML = '<?= jvbIcon('close', ['title' => 'Remove']); ?>'; |
| | | removeBtn.innerHTML = '<?= jvbIcon('x', ['title' => 'Remove']); ?>'; |
| | | removeBtn.addEventListener('click', function() { |
| | | removeItem(id, clone); |
| | | }); |
| | |
| | | |
| | | <div class="selection-actions row btw" hidden> |
| | | <button type="button" data-action="add-to-group"> |
| | | <?= jvbIcon('add') ?> |
| | | <?= jvbIcon('plus-square') ?> |
| | | Group |
| | | </button> |
| | | <button type="button" data-action="delete-upload"> |
| | | <?= jvbIcon('delete') ?> |
| | | <?= jvbIcon('trash') ?> |
| | | Delete |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | <button type="button" data-action="upload" class="submit-uploads"> |
| | | <?= jvbIcon('upload') ?> Upload <?= esc_html($plural ?? 'Content'); ?> |
| | | <?= jvbIcon('cloud-arrow-up') ?> Upload <?= esc_html($plural ?? 'Content'); ?> |
| | | </button> |
| | | </div> |
| | | <?php endif; ?> |
| | |
| | | </div> |
| | | |
| | | <?php if ($destination === 'post_group') : ?> |
| | | <p class="hint"><?= jvbIcon('elbow-left-up') ?> These will become individual <?= $plural ?> <?= jvbIcon('elbow-right-up')?></p> |
| | | <p class="hint"><?= jvbIcon('arrow-elbow-left-up') ?> These will become individual <?= $plural ?> <?= jvbIcon('arrow-elbow-right-up')?></p> |
| | | </div> |
| | | <div class="sidebar flex col"> |
| | | <div class="header"> |
| | |
| | | <p>Drag here to create a new <?= $singular ?>!</p> |
| | | </div> |
| | | </div> |
| | | <p class="hint"><?= jvbIcon('elbow-left-up') ?> Each group will become its own <?= $singular ?> <?= jvbIcon('elbow-right-up')?></p> |
| | | <p class="hint"><?= jvbIcon('arrow-elbow-left-up') ?> Each group will become its own <?= $singular ?> <?= jvbIcon('arrow-elbow-right-up')?></p> |
| | | </div> |
| | | </div> |
| | | <?php endif; ?> |
| | |
| | | <!-- Selection actions (hidden by default) --> |
| | | <div class="selection-actions" hidden> |
| | | <button type="button" class="create-from-selection"> |
| | | <?= jvbIcon('add') ?> |
| | | <?= jvbIcon('plus-square') ?> |
| | | Create New <?= $singular ?> |
| | | </button> |
| | | <button type="button" class="remove-selection"> |
| | | <?= jvbIcon('delete') ?> |
| | | <?= jvbIcon('trash') ?> |
| | | Remove |
| | | </button> |
| | | </div> |
| | | </div> |
| | | |
| | | <button type="button" class="submit-uploads"> |
| | | <?= jvbIcon('upload') ?> Upload <?= esc_html($plural ?? 'Content'); ?> |
| | | <?= jvbIcon('cloud-arrow-up') ?> Upload <?= esc_html($plural ?? 'Content'); ?> |
| | | </button> |
| | | </div> |
| | | <?php endif; ?> |
| | |
| | | </div> |
| | | |
| | | <?php if ($groupable) : ?> |
| | | <p class="hint"><?= jvbIcon('elbow-left-up') ?> These will become individual <?= $plural ?> <?= jvbIcon('elbow-right-up')?></p> |
| | | <p class="hint"><?= jvbIcon('arrow-elbow-left-up') ?> These will become individual <?= $plural ?> <?= jvbIcon('arrow-elbow-right-up')?></p> |
| | | </div> |
| | | <div class="sidebar"> |
| | | <div class="header"> |
| | |
| | | <p class="hint">Select multiple images and click "Add to <?= $singular?>" or create new <?= $plural ?>.</p> |
| | | </div> |
| | | <button type="button" class="create-group-from-selection"> |
| | | <?= jvbIcon('add') ?> |
| | | <?= jvbIcon('plus-square') ?> |
| | | Create New <?= $singular ?> |
| | | </button> |
| | | <div class="item-grid groups"> |
| | |
| | | <p>Drag here to create a new <?= $singular ?>!</p> |
| | | </div> |
| | | </div> |
| | | <p class="hint"><?= jvbIcon('elbow-left-up') ?> Each group will become its own <?= $singular ?> <?= jvbIcon('elbow-right-up')?></p> |
| | | <p class="hint"><?= jvbIcon('arrow-elbow-left-up') ?> Each group will become its own <?= $singular ?> <?= jvbIcon('arrow-elbow-right-up')?></p> |
| | | </div> |
| | | </div> |
| | | <?php endif; ?> |
| | |
| | | <?= !empty($field['required']) ? 'required' : ''; ?> |
| | | data-format="<?= esc_attr($format); ?>" |
| | | > |
| | | <?= jvbIcon('event') ?> |
| | | <?= jvbIcon('calendar') ?> |
| | | </div> |
| | | <?php if (array_key_exists('hint', $field)) { $this->renderHint($field['hint']); } ?> |
| | | <?php if (array_key_exists('description', $field)) { $this->renderDescription($field['description'], $name); } ?> |
| | |
| | | <?= !empty($field['max']) ? 'max="' . esc_attr($field['max']) . '"' : ''; ?> |
| | | <?= !empty($field['step']) ? 'step="' . esc_attr($field['step']) . '"' : ''; ?> |
| | | > |
| | | <?= jvbIcon('event') ?> |
| | | <?= jvbIcon('calendar') ?> |
| | | </div> |
| | | <?php if (array_key_exists('hint', $field)) { $this->renderHint($field['hint']); } ?> |
| | | <?php if (array_key_exists('description', $field)) { $this->renderDescription($field['description'], $name); } ?> |
| | |
| | | { |
| | | $id = $name.'-help'; |
| | | $out = '<div class="has-tooltip"> |
| | | <span class="tt-toggle">'.jvbIcon('help').'</span> |
| | | <span class="tt-toggle">'.jvbIcon('question').'</span> |
| | | <div role="tooltip" id="'.$id.'"><p>'.$description.'</p></div> |
| | | </div>'; |
| | | echo $out; |