Compare commits
3 Commits
7c6eaa895d
...
v0.06
| Author | SHA1 | Date | |
|---|---|---|---|
| ffaa624f65 | |||
| 6e1bc4ac1b | |||
| ad1a535795 |
@@ -233,6 +233,7 @@ function go_form_handle_submission()
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
add_action('admin_post_go_form_handle_submission', 'go_form_handle_submission');
|
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 ==========
|
// ========== Shortcode ==========
|
||||||
function go_form_shortcode($atts)
|
function go_form_shortcode($atts)
|
||||||
|
|||||||
@@ -54,6 +54,15 @@
|
|||||||
grid-template-columns: auto auto;
|
grid-template-columns: auto auto;
|
||||||
column-gap: 16px;
|
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>
|
</style>
|
||||||
|
|
||||||
<div id="form">
|
<div id="form">
|
||||||
@@ -62,7 +71,8 @@
|
|||||||
<input type="hidden" name="action" value="go_form_handle_submission">
|
<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="form_id" value="<?php echo esc_attr($form_id); ?>">
|
||||||
<input type="hidden" name="rating" id="rating" value="-1000">
|
<input type="hidden" name="rating" id="rating" value="-1000">
|
||||||
<div class="go-form-grid">
|
|
||||||
|
<div class="go-form-user-grid">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<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>
|
||||||
@@ -72,10 +82,13 @@
|
|||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="egd-search">
|
||||||
<button type="button" id="egd-search" class="button">Search EGD</button>
|
<button type="button" id="egd-search" class="button">Search EGD</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="go-form-grid">
|
||||||
<div>
|
<div>
|
||||||
<label for="rank">Rank*:</label>
|
<label for="rank">Rank*:</label>
|
||||||
<select name="rank" id="rank">
|
<select name="rank" id="rank">
|
||||||
@@ -92,7 +105,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -197,10 +210,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$entries = go_form_get_entries($form_id);
|
$entries = go_form_get_entries($form_id);
|
||||||
$entries_count = count($entries);
|
|
||||||
$custom_fields = go_form_get_custom_fields($form_id);
|
$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); ?>
|
<?php go_form_render_entries_table($entries, false, $custom_fields, $form_id); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -214,11 +225,11 @@
|
|||||||
const lastName = document.getElementById('last_name').value.trim();
|
const lastName = document.getElementById('last_name').value.trim();
|
||||||
|
|
||||||
if (firstName.length < 2) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (lastName.length < 2) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<th>N</th>
|
<th>N</th>
|
||||||
<th>First Name</th>
|
<th>First Name</th>
|
||||||
<th>Last Name</th>
|
<th>Last Name</th>
|
||||||
|
<th>Rank</th>
|
||||||
<th>Country</th>
|
<th>Country</th>
|
||||||
<th>Club</th>
|
<th>Club</th>
|
||||||
<th>Rank</th>
|
|
||||||
<th>EGD Number</th>
|
<th>EGD Number</th>
|
||||||
<th>Date Added</th>
|
<th>Date Added</th>
|
||||||
<?php
|
<?php
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
<td> <?= $i + 1 ?> </td>
|
<td> <?= $i + 1 ?> </td>
|
||||||
<td> <?= esc_html($e->first_name) ?> </td>
|
<td> <?= esc_html($e->first_name) ?> </td>
|
||||||
<td> <?= esc_html($e->last_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->country) ?> </td>
|
||||||
<td> <?= esc_html($e->club) ?> </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><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>
|
<td> <?= esc_html($e->created_at) ?> </td>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user