DustyP 9 months ago
parent 2bea28ab2d
commit eb96d27204

@ -95,7 +95,7 @@ templ RegisterForm(groups []models.Group, isAdmin bool) {
<script> <script>
function validateForm() { function validateForm() {
const carNumberInput = document.getElementById('car-number'); const carNumberInput = document.getElementById('car-number');
const errorDiv = carNumberInput.nextElementSibling; const errorDiv = document.getElementById('car-number-validation-error');
if (errorDiv.textContent.trim() !== '') { if (errorDiv.textContent.trim() !== '') {
// Show error message more prominently // Show error message more prominently

@ -140,7 +140,7 @@ func RegisterForm(groups []models.Group, isAdmin bool) templ.Component {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
} }
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</div></form><script>\r\n function validateForm() {\r\n const carNumberInput = document.getElementById('car-number');\r\n const errorDiv = carNumberInput.nextElementSibling;\r\n \r\n if (errorDiv.textContent.trim() !== '') {\r\n // Show error message more prominently\r\n errorDiv.classList.add('d-block');\r\n carNumberInput.classList.add('is-invalid');\r\n return false;\r\n } else {\r\n errorDiv.classList.remove('d-block');\r\n carNumberInput.classList.remove('is-invalid');\r\n }\r\n \r\n return true;\r\n }\r\n </script></div></div>") templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</div></form><script>\r\n function validateForm() {\r\n const carNumberInput = document.getElementById('car-number');\r\n const errorDiv = document.getElementById('car-number-validation-error');\r\n \r\n if (errorDiv.textContent.trim() !== '') {\r\n // Show error message more prominently\r\n errorDiv.classList.add('d-block');\r\n carNumberInput.classList.add('is-invalid');\r\n return false;\r\n } else {\r\n errorDiv.classList.remove('d-block');\r\n carNumberInput.classList.remove('is-invalid');\r\n }\r\n \r\n return true;\r\n }\r\n </script></div></div>")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }

Loading…
Cancel
Save