change to table

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

View File

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