Compare commits

5 Commits

Author SHA1 Message Date
ffaa624f65 Version bump 2026-06-01 17:44:09 +02:00
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
7c6eaa895d Fix xml format 2026-05-13 22:39:00 +02:00
f5a48a62db fix copy 2026-05-13 22:09:52 +02:00
6 changed files with 29 additions and 17 deletions

View File

@@ -1992,10 +1992,6 @@ $mcmahonfirst = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Country typeversion="1"> <Country typeversion="1">
<InternetCode>si</InternetCode> <InternetCode>si</InternetCode>
<Name>Slovenia</Name> <Name>Slovenia</Name>
<Club typeversion="1">
<Name>Ljub</Name>
<EGDName>Ljub</EGDName>
</Club>
</Country> </Country>
<Country typeversion="1"> <Country typeversion="1">
<InternetCode>sj</InternetCode> <InternetCode>sj</InternetCode>
@@ -2213,4 +2209,5 @@ $mcmahonlast = '<TournamentRound typeversion="2">
<TournamentRound typeversion="2"> <TournamentRound typeversion="2">
<RoundNumber>5</RoundNumber> <RoundNumber>5</RoundNumber>
<LastUpdated>2026-05-13 21:29:04</LastUpdated> <LastUpdated>2026-05-13 21:29:04</LastUpdated>
</TournamentRound>'; </TournamentRound>
</Tournament>';

View File

@@ -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)

View File

@@ -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;
} }

View File

@@ -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

View File

@@ -2,7 +2,7 @@
/** /**
* Plugin Name: Go Form Plugin * Plugin Name: Go Form Plugin
* Description: Form plugin for Go players * Description: Form plugin for Go players
* Version: 0.05 * Version: 0.06
* Author: Nikola Petrov * Author: Nikola Petrov
*/ */

View File

@@ -1,2 +1,5 @@
sudo rm -rf html/wp-content/plugins/go-form-plugin cd ..
sudo cp -r go-form-plugin html/wp-content/plugins/ sudo rm -rf scripts/html/wp-content/plugins/go-form-plugin
sudo mkdir scripts/html/wp-content/plugins/go-form-plugin
sudo cp main.php scripts/html/wp-content/plugins/go-form-plugin/
sudo cp -r go-form-plugin scripts/html/wp-content/plugins/go-form-plugin/go-form-plugin/