Compare commits

..

2 Commits

Author SHA1 Message Date
6e1bc4ac1b Fix make signup work for guests 2026-06-01 17:42:43 +02:00
ad1a535795 Smal changes for Go-zveza 2026-05-31 19:03:54 +02:00
3 changed files with 21 additions and 9 deletions

View File

@@ -233,6 +233,7 @@ function go_form_handle_submission()
exit;
}
add_action('admin_post_go_form_handle_submission', 'go_form_handle_submission');
Pleadd_action('admin_post_nopriv_go_form_handle_submission', 'go_form_handle_submission');
// ========== Shortcode ==========
function go_form_shortcode($atts)

View File

@@ -54,6 +54,15 @@
grid-template-columns: auto auto;
column-gap: 16px;
}
.go-form-user-grid {
display: grid;
grid-template-columns: auto auto min-content;
column-gap: 16px;
}
.egd-search {
display: flex;
align-items: center;
}
</style>
<div id="form">
@@ -62,7 +71,8 @@
<input type="hidden" name="action" value="go_form_handle_submission">
<input type="hidden" name="form_id" value="<?php echo esc_attr($form_id); ?>">
<input type="hidden" name="rating" id="rating" value="-1000">
<div class="go-form-grid">
<div class="go-form-user-grid">
<div>
<label for="first_name">First Name*:</label><input type="text" name="first_name" id="first_name" required>
@@ -72,10 +82,13 @@
<label for="last_name">Last Name*:</label><input type="text" name="last_name" id="last_name" required>
</div>
<div>
<div class="egd-search">
<button type="button" id="egd-search" class="button">Search EGD</button>
</div>
</div>
<div class="go-form-grid">
<div>
<label for="rank">Rank*:</label>
<select name="rank" id="rank">
@@ -92,7 +105,7 @@
</div>
<div>
<label for="club">Club*:</label><input type="text" name="club" id="club" required>
<label for="club">Club:</label><input type="text" name="club" id="club">
</div>
<div>
@@ -197,10 +210,8 @@
</div>
<?php
$entries = go_form_get_entries($form_id);
$entries_count = count($entries);
$custom_fields = go_form_get_custom_fields($form_id);
?>
<h2>Sign-up players: <?= esc_html($entries_count); ?></h2>
<?php go_form_render_entries_table($entries, false, $custom_fields, $form_id); ?>
</div>
@@ -214,11 +225,11 @@
const lastName = document.getElementById('last_name').value.trim();
if (firstName.length < 2) {
alert('Please enter at least 2 characters in first or last name');
alert('Please enter at least 2 characters in first and last name');
return;
}
if (lastName.length < 2) {
alert('Please enter at least 2 characters in first or last name');
alert('Please enter at least 2 characters in first and last name');
return;
}

View File

@@ -4,9 +4,9 @@
<th>N</th>
<th>First Name</th>
<th>Last Name</th>
<th>Rank</th>
<th>Country</th>
<th>Club</th>
<th>Rank</th>
<th>EGD Number</th>
<th>Date Added</th>
<?php
@@ -31,9 +31,9 @@
<td> <?= $i + 1 ?> </td>
<td> <?= esc_html($e->first_name) ?> </td>
<td> <?= esc_html($e->last_name) ?> </td>
<td> <?= esc_html($ranks[$e->rank]) ?> </td>
<td> <?= esc_html($e->country) ?> </td>
<td> <?= esc_html($e->club) ?> </td>
<td> <?= esc_html($ranks[$e->rank]) ?> </td>
<td><a href="https://europeangodatabase.eu/EGD/Player_Card.php?&key=<?= esc_html($e->egd_number) ?>"><?= esc_html($e->egd_number) ?> </a> </td>
<td> <?= esc_html($e->created_at) ?> </td>
<?php