|
|
|
@ -9,7 +9,6 @@ import "github.com/a-h/templ"
|
|
|
|
import templruntime "github.com/a-h/templ/runtime"
|
|
|
|
import templruntime "github.com/a-h/templ/runtime"
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"strconv"
|
|
|
|
"strconv"
|
|
|
|
"track-gopher/models"
|
|
|
|
"track-gopher/models"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -35,43 +34,33 @@ func Register(groups []models.Group) templ.Component {
|
|
|
|
templ_7745c5c3_Var1 = templ.NopComponent
|
|
|
|
templ_7745c5c3_Var1 = templ.NopComponent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<!doctype html><html lang=\"en\"><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><title>Racer Registration</title><!-- Bootstrap CSS --><link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css\" rel=\"stylesheet\"><script src=\"/static/js/htmx.min.js\"></script><!-- Bootstrap JS Bundle with Popper --><script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js\"></script></head><body class=\"bg-light\"><div class=\"container py-4\"><header class=\"mb-4\"><h1 class=\"text-center\">Racer Registration</h1><div class=\"d-flex justify-content-center mt-3\"><a href=\"/\" class=\"btn btn-outline-primary me-2\">Race Timer</a> <a href=\"/admin\" class=\"btn btn-outline-secondary\">Admin</a></div></header><div class=\"row justify-content-center\"><div class=\"col-md-8 col-lg-6\"><div class=\"card\"><div class=\"card-header\"><h5 class=\"mb-0\">Register New Racer</h5></div><div class=\"card-body\"><form id=\"registerForm\" hx-post=\"/api/racers\" hx-swap=\"none\"><div class=\"row\"><div class=\"col-md-6 mb-3\"><label for=\"firstName\" class=\"form-label\">First Name</label> <input type=\"text\" class=\"form-control\" id=\"firstName\" name=\"first_name\" required></div><div class=\"col-md-6 mb-3\"><label for=\"lastName\" class=\"form-label\">Last Name</label> <input type=\"text\" class=\"form-control\" id=\"lastName\" name=\"last_name\" required></div></div><div class=\"row\"><div class=\"col-md-6 mb-3\"><label for=\"carNumber\" class=\"form-label\">Car Number</label> <input type=\"text\" class=\"form-control\" id=\"carNumber\" name=\"car_number\" required></div><div class=\"col-md-6 mb-3\"><label for=\"carWeight\" class=\"form-label\">Car Weight (oz)</label> <input type=\"number\" step=\"0.1\" class=\"form-control\" id=\"carWeight\" name=\"car_weight\" required></div></div><div class=\"mb-3\"><label for=\"groupID\" class=\"form-label\">Group</label> <select class=\"form-select\" id=\"groupID\" name=\"group_id\" required><option value=\"\" selected disabled>Select a group</option> ")
|
|
|
|
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
|
|
|
|
}
|
|
|
|
if !templ_7745c5c3_IsBuffer {
|
|
|
|
for _, group := range groups {
|
|
|
|
defer func() {
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "<option value=\"")
|
|
|
|
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err == nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
templ_7745c5c3_Err = templ_7745c5c3_BufErr
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var templ_7745c5c3_Var2 string
|
|
|
|
}()
|
|
|
|
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(group.ID))
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/register.templ`, Line: 65, Col: 47}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container py-4\"><h1 class=\"mb-4\">Register for Derby Race</h1><div class=\"row\"><div class=\"col-md-8 mx-auto\"><div id=\"registration-container\">")
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\">")
|
|
|
|
templ_7745c5c3_Err = RegisterForm(groups, false).Render(ctx, templ_7745c5c3_Buffer)
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var templ_7745c5c3_Var3 string
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</div></div></div></div>")
|
|
|
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(group.Name)
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/register.templ`, Line: 65, Col: 62}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</option>")
|
|
|
|
return nil
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
})
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
templ_7745c5c3_Err = Layout("Register Racer").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</select></div><div class=\"d-grid\"><button type=\"submit\" class=\"btn btn-primary\">Register Racer</button></div></form></div></div><div id=\"successAlert\" class=\"alert alert-success mt-3 d-none\"><h4 class=\"alert-heading\">Registration Successful!</h4><p>The racer has been registered successfully.</p><hr><div class=\"d-flex justify-content-between\"><button class=\"btn btn-outline-success\" onclick=\"resetForm()\">Register Another Racer</button> <a href=\"/admin\" class=\"btn btn-outline-primary\">View All Racers</a></div></div><div id=\"errorAlert\" class=\"alert alert-danger mt-3 d-none\"><h4 class=\"alert-heading\">Registration Failed</h4><p id=\"errorMessage\">There was an error registering the racer.</p><hr><button class=\"btn btn-outline-danger\" onclick=\"dismissError()\">Dismiss</button></div></div></div></div><script>\r\n\t\t\tdocument.getElementById('registerForm').addEventListener('htmx:afterRequest', function(event) {\r\n\t\t\t\tconst response = event.detail.xhr;\r\n\t\t\t\t\r\n\t\t\t\tif (response.status === 200 || response.status === 201) {\r\n\t\t\t\t\t// Show success message\r\n\t\t\t\t\tdocument.getElementById('successAlert').classList.remove('d-none');\r\n\t\t\t\t\tdocument.getElementById('errorAlert').classList.add('d-none');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Show error message\r\n\t\t\t\t\tdocument.getElementById('errorAlert').classList.remove('d-none');\r\n\t\t\t\t\tdocument.getElementById('successAlert').classList.add('d-none');\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tconst error = JSON.parse(response.responseText);\r\n\t\t\t\t\t\tdocument.getElementById('errorMessage').textContent = error.message || 'There was an error registering the racer.';\r\n\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\tdocument.getElementById('errorMessage').textContent = 'There was an error registering the racer.';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tfunction resetForm() {\r\n\t\t\t\tdocument.getElementById('registerForm').reset();\r\n\t\t\t\tdocument.getElementById('successAlert').classList.add('d-none');\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfunction dismissError() {\r\n\t\t\t\tdocument.getElementById('errorAlert').classList.add('d-none');\r\n\t\t\t}\r\n\t\t</script></body></html>")
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -79,7 +68,7 @@ func Register(groups []models.Group) templ.Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func RegisterForm(groups []models.Group) templ.Component {
|
|
|
|
func RegisterForm(groups []models.Group, isAdmin bool) templ.Component {
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
|
|
|
|
@ -95,48 +84,63 @@ func RegisterForm(groups []models.Group) templ.Component {
|
|
|
|
}()
|
|
|
|
}()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
templ_7745c5c3_Var4 := templ.GetChildren(ctx)
|
|
|
|
templ_7745c5c3_Var3 := templ.GetChildren(ctx)
|
|
|
|
if templ_7745c5c3_Var4 == nil {
|
|
|
|
if templ_7745c5c3_Var3 == nil {
|
|
|
|
templ_7745c5c3_Var4 = templ.NopComponent
|
|
|
|
templ_7745c5c3_Var3 = templ.NopComponent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<div class=\"card\"><div class=\"card-header\"><h3 class=\"h6 mb-0\">Add New Racer</h3></div><div class=\"card-body\"><div id=\"racer-form-message\"></div><form id=\"racer-form\" hx-post=\"/api/racers\" hx-target=\"#racer-form-message\" hx-swap=\"innerHTML\" hx-on::after-request=\"if(event.detail.successful) { \r\n\t\t\t\t\tdocument.getElementById('racer-form').reset(); \r\n\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\tdocument.getElementById('racer-form-message').innerHTML = '';\r\n\t\t\t\t\t\tloadRacersList();\r\n\t\t\t\t\t}, 3000);\r\n\t\t\t\t}\"><!-- Form fields for racer registration --><div class=\"mb-3\"><label for=\"first-name\" class=\"form-label\">First Name</label> <input type=\"text\" class=\"form-control\" id=\"first-name\" name=\"first_name\" required></div><div class=\"mb-3\"><label for=\"last-name\" class=\"form-label\">Last Name</label> <input type=\"text\" class=\"form-control\" id=\"last-name\" name=\"last_name\" required></div><div class=\"mb-3\"><label for=\"car-number\" class=\"form-label\">Car Number</label> <input type=\"text\" class=\"form-control\" id=\"car-number\" name=\"car_number\" required></div><div class=\"mb-3\"><label for=\"car-weight\" class=\"form-label\">Car Weight (oz)</label> <input type=\"number\" step=\"0.01\" class=\"form-control\" id=\"car-weight\" name=\"car_weight\" required></div><div class=\"mb-3\"><label for=\"group-id\" class=\"form-label\">Group</label> <select class=\"form-select\" id=\"group-id\" name=\"group_id\" required><option value=\"\">Select a group</option> ")
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<div class=\"card\"><div class=\"card-header\"><h3 class=\"h6 mb-0\">Racer Registration</h3></div><div class=\"card-body\"><div id=\"racer-form-message\"></div><form id=\"racer-form\" hx-post=\"/api/racers\" hx-target=\"#racer-form-message\" hx-swap=\"innerHTML\" hx-on::after-request=\"if(event.detail.successful) { \r\n\t\t\t\t\tdocument.getElementById('racer-form').reset(); \r\n\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\tdocument.getElementById('racer-form-message').innerHTML = '';\r\n\t\t\t\t\t\t// Check if we're on the admin page by looking for the racers-list element\r\n\t\t\t\t\t\tif (document.getElementById('racers-list')) {\r\n\t\t\t\t\t\t\thtmx.ajax('GET', '/admin/racers/list', {target: '#racers-list'});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, 3000);\r\n\t\t\t\t}\"><!-- Form fields for racer registration --><div class=\"mb-3\"><label for=\"first-name\" class=\"form-label\">First Name</label> <input type=\"text\" class=\"form-control\" id=\"first-name\" name=\"first_name\" required></div><div class=\"mb-3\"><label for=\"last-name\" class=\"form-label\">Last Name</label> <input type=\"text\" class=\"form-control\" id=\"last-name\" name=\"last_name\" required></div><div class=\"mb-3\"><label for=\"car-number\" class=\"form-label\">Car Number</label> <input type=\"text\" class=\"form-control\" id=\"car-number\" name=\"car_number\" required></div><div class=\"mb-3\"><label for=\"car-weight\" class=\"form-label\">Car Weight (oz)</label> <input type=\"number\" step=\"0.01\" class=\"form-control\" id=\"car-weight\" name=\"car_weight\" required></div><div class=\"mb-3\"><label for=\"group-id\" class=\"form-label\">Group</label> <select class=\"form-select\" id=\"group-id\" name=\"group_id\" required><option value=\"\">Select a group</option> ")
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for _, group := range groups {
|
|
|
|
for _, group := range groups {
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<option value=\"")
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "<option value=\"")
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var templ_7745c5c3_Var5 string
|
|
|
|
var templ_7745c5c3_Var4 string
|
|
|
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatInt(group.ID, 10))
|
|
|
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.FormatInt(group.ID, 10))
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/register.templ`, Line: 173, Col: 54}
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/register.templ`, Line: 69, Col: 54}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "\">")
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\">")
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var templ_7745c5c3_Var5 string
|
|
|
|
|
|
|
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(group.Name)
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/register.templ`, Line: 69, Col: 69}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var templ_7745c5c3_Var6 string
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</option>")
|
|
|
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(group.Name)
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/register.templ`, Line: 173, Col: 69}
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
|
|
|
}
|
|
|
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</select></div><div class=\"d-flex justify-content-end\">")
|
|
|
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if isAdmin {
|
|
|
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<button type=\"button\" class=\"btn btn-secondary me-2\" onclick=\"document.getElementById('racer-form-container').style.display = 'none';\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\">Save Racer</button>")
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</option>")
|
|
|
|
} else {
|
|
|
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<button type=\"submit\" class=\"btn btn-primary\">Register</button>")
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</select></div><div class=\"d-flex justify-content-end\"><button type=\"button\" class=\"btn btn-secondary me-2\" onclick=\"document.getElementById('racer-form-container').style.display = 'none';\">Cancel</button> <button type=\"submit\" class=\"btn btn-primary\">Save Racer</button></div></form></div></div><script>\r\n\t\tfunction loadRacersList() {\r\n\t\t\thtmx.ajax('GET', '/admin/racers/list', {target: '#racers-list'});\r\n\t\t}\r\n\t</script>")
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</div></form></div></div>")
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|