make popup style

This commit is contained in:
2026-05-05 09:32:28 +02:00
parent 0252abad14
commit 62f3f95782

View File

@@ -22,6 +22,50 @@ function go_form_get_rank_dropdown($selected = 0) {
}
?>
<style>
#egd-popup-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 1000;
justify-content: center;
align-items: center;
}
#egd-results {
background: white;
max-height: 70vh;
overflow-y: auto;
border: 1px solid #ddd;
padding: 15px;
border-radius: 5px;
max-width: 500px;
width: 90%;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
position: relative;
}
#egd-popup-close {
position: absolute;
top: 5px;
right: 10px;
background: none;
border: none;
font-size: 20px;
cursor: pointer;
}
#egd-results h3 {
margin-top: 0;
}
.egd-result-item {
padding: 8px 0;
border-bottom: 1px solid #eee;
cursor: pointer;
}
</style>
<div class="go-form-container" id="form">
<h2>Add New Player</h2>
<form method="post" action="<?php echo admin_url('admin-post.php'); ?>">
@@ -38,10 +82,10 @@ function go_form_get_rank_dropdown($selected = 0) {
<tr><td><label for="email">Email:</label></td><td><input type="email" name="email" id="email"></td></tr>
<tr><td><label for="egd_number">EGD Number:</label></td><td><input type="text" name="egd_number" id="egd_number"></td></tr>
</table>
<div id="egd-popup-overlay" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center;">
<div id="egd-results" style="background: white; max-height: 70vh; overflow-y: auto; border: 1px solid #ddd; padding: 15px; border-radius: 5px; max-width: 500px; width: 90%; box-shadow: 0 2px 10px rgba(0,0,0,0.2); position: relative;">
<button id="egd-popup-close" style="position: absolute; top: 5px; right: 10px; background: none; border: none; font-size: 20px; cursor: pointer;" aria-label="Close">&times;</button>
<h3 style="margin-top: 0;">EGD Search Results</h3>
<div id="egd-popup-overlay">
<div id="egd-results">
<button id="egd-popup-close" aria-label="Close">&times;</button>
<h3>EGD Search Results</h3>
<div id="egd-results-content"></div>
</div>
</div>
@@ -101,9 +145,7 @@ document.addEventListener('DOMContentLoaded', function() {
contentDiv.innerHTML = '';
players.forEach(player => {
const item = document.createElement('div');
item.style.padding = '8px 0';
item.style.borderBottom = '1px solid #eee';
item.style.cursor = 'pointer';
item.className = 'egd-result-item';
item.innerHTML = `<strong>${player.Name} ${player.Last_Name}</strong> - ${player.Club}, ${player.Country_Code}, ${player.Grade} (${player.Grade_n})`;
item.addEventListener('click', () => selectPlayer(player));
contentDiv.appendChild(item);