Upload folder via GUI - templates

This commit is contained in:
Git Manager GUI
2026-04-13 18:52:50 +02:00
parent 9514db9454
commit 77c0b0200d
5 changed files with 459 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php if(!defined('ABSPATH')) exit; ?>
<div class="wrap wmf-admin-wrap">
<h1 class="wmf-page-title">Formulare <a href="<?php echo esc_url(admin_url('admin.php?page=wmf-new-form')); ?>" class="page-title-action">+ Neues Formular</a></h1>
<?php $forms=get_posts(array('post_type'=>'wmf-form','post_status'=>'publish','numberposts'=>-1,'orderby'=>'date','order'=>'DESC')); ?>
<?php if(empty($forms)): ?>
<div class="wmf-empty-state">
<span class="dashicons dashicons-feedback wmf-empty-icon"></span>
<h2>Noch keine Formulare vorhanden</h2>
<p>Erstellen Sie Ihr erstes Formular und binden Sie es per Shortcode auf jeder Seite ein.</p>
<a href="<?php echo esc_url(admin_url('admin.php?page=wmf-new-form')); ?>" class="button button-primary button-hero">Erstes Formular erstellen</a>
</div>
<?php else: ?>
<table class="wp-list-table widefat fixed striped wmf-forms-table">
<thead><tr>
<th>Titel</th><th>Shortcode</th><th>Felder</th><th>Einreichungen</th><th>Erstellt</th><th>Aktionen</th>
</tr></thead>
<tbody>
<?php foreach($forms as $form):
$meta=wmf_get_form_meta($form->ID);
$edit_url=add_query_arg(array('page'=>'wp-multi-formular','edit'=>$form->ID),admin_url('admin.php'));
$subs_url=add_query_arg(array('page'=>'wp-multi-formular','view_submissions'=>$form->ID),admin_url('admin.php'));
$sc=wmf_get_shortcode($form->ID);
?>
<tr>
<td><strong><a href="<?php echo esc_url($edit_url); ?>"><?php echo esc_html($form->post_title); ?></a></strong>
<?php if(!empty($meta['multi_step'])&&$meta['multi_step']==='1'): ?><span class="wmf-badge">Mehrstufig</span><?php endif; ?>
</td>
<td><code class="wmf-sc-copy" title="Klicken zum Kopieren"><?php echo esc_html($sc); ?></code></td>
<td><?php echo count($meta['fields']??array()); ?></td>
<td><a href="<?php echo esc_url($subs_url); ?>"><?php echo wmf_count_submissions($form->ID); ?></a></td>
<td><?php echo esc_html(date_i18n('d.m.Y',strtotime($form->post_date))); ?></td>
<td class="wmf-row-actions">
<a href="<?php echo esc_url($edit_url); ?>" class="button button-small">Bearbeiten</a>
<a href="<?php echo esc_url($subs_url); ?>" class="button button-small">Einreichungen</a>
<form method="post" style="display:inline;" onsubmit="return confirm(WMF.i18n.confirm_delete_form)">
<?php wp_nonce_field('wmf_delete_form_'.intval($form->ID)); ?>
<input type="hidden" name="wmf_admin_action" value="delete_form">
<input type="hidden" name="form_id" value="<?php echo intval($form->ID); ?>">
<button type="submit" class="button button-small wmf-btn-delete">Löschen</button>
</form>
</td>
</tr>
<?php endforeach; ?>
</tbody></table>
<?php endif; ?>
</div>