change to table

This commit is contained in:
2026-05-06 13:19:02 +02:00
parent 210e5a34aa
commit dc9fd1d14b

View File

@@ -48,33 +48,71 @@
.egd-result-item:hover { .egd-result-item:hover {
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.go-form-table tr {
background-color: #ffffff !important;
border: none;
}
</style> </style>
<div id="form"> <div id="form">
<h2>Add New Player</h2>
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>"> <form method="post" action="<?php echo admin_url('admin-post.php'); ?>">
<?php echo wp_nonce_field('go_form_action', 'go_form_nonce', true, false); ?> <?php echo wp_nonce_field('go_form_action', 'go_form_nonce', true, false); ?>
<input type="hidden" name="action" value="go_form_submit"> <input type="hidden" name="action" value="go_form_submit">
<input type="hidden" name="form_id" value="<?php echo esc_attr($form_id); ?>"> <input type="hidden" name="form_id" value="<?php echo esc_attr($form_id); ?>">
<table class="go-form-table">
<tbody>
<tr>
<td>
<label for="first_name">First Name*:</label><input type="text" name="first_name" id="first_name" required> <label for="first_name">First Name*:</label><input type="text" name="first_name" id="first_name" required>
</td>
<td>
<label for="last_name">Last Name*:</label><input type="text" name="last_name" id="last_name" required> <label for="last_name">Last Name*:</label><input type="text" name="last_name" id="last_name" required>
</td>
</tr>
<tr>
<td>
<button type="button" id="egd-search" class="button">Search EGD</button> <button type="button" id="egd-search" class="button">Search EGD</button>
<label for="country">Country:</label><input type="text" name="country" id="country"> </td>
<label for="club">Club:</label><input type="text" name="club" id="club"> <td>
<label for="rank">Rank:</label> <label for="rank">Rank:</label>
<select name="rank" id="rank"> <select name="rank" id="rank">
<?php <?php
foreach ($ranks as $value => $label) { foreach ($ranks as $value => $label) {
echo "<option value='" . esc_attr($value) . "'>" . esc_html($label) . "</option>\n"; echo "<option value='" . esc_attr($value) . "'>" . esc_html($label) . "</option>\n";
} }
?> ?>
</select> </select>
</td>
<label for="email">Email:</label><input type="email" name="email" id="email"> </tr>
<tr>
<td>
<label for="country">Country:</label><input type="text" name="country" id="country">
</td>
<td>
<label for="club">Club:</label><input type="text" name="club" id="club">
</td>
</tr>
<tr>
<td>
<label for="egd_number">EGD Number:</label><input type="text" name="egd_number" id="egd_number"> <label for="egd_number">EGD Number:</label><input type="text" name="egd_number" id="egd_number">
</td>
<td>
<label for="email">Email:</label><input type="email" name="email" id="email">
</td>
</tr>
</tbody>
</table>
<label for="comment">Comment</label> <label for="comment">Comment</label>
<textarea name="comment" id="comment" rows="3"></textarea> <textarea name="comment" id="comment" rows="3"></textarea>
<p>* Required fields</p>
<input type="submit" name="go_form_submit" value="Submit">
</form>
<div id="egd-popup-overlay"> <div id="egd-popup-overlay">
<div id="egd-results"> <div id="egd-results">
<button id="egd-popup-close" type="button" aria-label="Close">&times;</button> <button id="egd-popup-close" type="button" aria-label="Close">&times;</button>
@@ -82,9 +120,6 @@
<div id="egd-results-content"></div> <div id="egd-results-content"></div>
</div> </div>
</div> </div>
<p>* Required fields</p>
<input type="submit" name="go_form_submit" value="Submit">
</form>
<h2>Players</h2> <h2>Players</h2>
<?php go_form_render_entries_table(go_form_get_entries($form_id)); ?> <?php go_form_render_entries_table(go_form_get_entries($form_id)); ?>
</div> </div>