mirror of
https://github.com/acaloiaro/frm
synced 2026-07-21 18:29:12 +00:00
feat: add subject_id
This commit is contained in:
parent
da68ab121a
commit
49b40c0cc5
10 changed files with 282 additions and 188 deletions
|
|
@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS form_submissions (
|
|||
id BIGINT PRIMARY KEY DEFAULT nextval('submission_ids'),
|
||||
form_id BIGINT REFERENCES forms(id) ON DELETE CASCADE,
|
||||
workspace_id TEXT NOT NULL,
|
||||
subject_id TEXT,
|
||||
subject_id TEXT DEFAULT NULL,
|
||||
fields jsonb default '{}' NOT NULL,
|
||||
status submission_status default 'partial' NOT NULL,
|
||||
created_at timestamptz not null default timezone('utc', now()),
|
||||
|
|
|
|||
|
|
@ -78,15 +78,21 @@ SET updated_at = timezone('utc', now()),
|
|||
|
||||
-- name: SaveSubmission :one
|
||||
|
||||
INSERT INTO form_submissions (id, form_id, workspace_id, fields, status)
|
||||
VALUES (coalesce(nullif(@id, 0), nextval('submission_ids'))::bigint, @form_id, @workspace_id, @fields, @status) ON conflict(id) DO
|
||||
INSERT INTO form_submissions (id, form_id, workspace_id, subject_id, fields, status)
|
||||
VALUES (coalesce(nullif(@id, 0), nextval('submission_ids'))::bigint, @form_id, @workspace_id, @subject_id, @fields, @status) ON conflict(id) DO
|
||||
UPDATE
|
||||
SET updated_at = timezone('utc', now()),
|
||||
fields = @fields,
|
||||
status = @status RETURNING *;
|
||||
|
||||
-- name: GetShortCode :one
|
||||
SELECT * FROM short_codes WHERE short_code = @short_code;
|
||||
|
||||
SELECT *
|
||||
FROM short_codes
|
||||
WHERE workspace_id = @workspace_id
|
||||
AND short_code = @short_code ;
|
||||
|
||||
-- name: SaveShortCode :one
|
||||
INSERT INTO short_codes (workspace_id, form_id, subject_id, short_code) VALUES (@workspace_id, @form_id, @subject_id, @short_code) RETURNING *;
|
||||
|
||||
INSERT INTO short_codes (workspace_id, form_id, subject_id, short_code)
|
||||
VALUES (@workspace_id, @form_id, @subject_id, @short_code) RETURNING *;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"log/slog"
|
||||
"maps"
|
||||
"net/http"
|
||||
|
|
@ -12,6 +13,7 @@ import (
|
|||
"github.com/acaloiaro/frm/types"
|
||||
"github.com/acaloiaro/frm/ui"
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
|
||||
// View renders the form viewer for the collector
|
||||
|
|
@ -116,6 +118,23 @@ func Collect(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
sc := submission.Get("short_code")
|
||||
submission.Del("short_code")
|
||||
arg := internal.GetShortCodeParams{
|
||||
WorkspaceID: i.WorkspaceID,
|
||||
ShortCode: sc,
|
||||
}
|
||||
// Submissions without short codes are anonymous, and valid
|
||||
shortCode, err := internal.Q(ctx, i.DBArgs).GetShortCode(ctx, arg)
|
||||
if err != nil && !errors.Is(err, pgx.ErrNoRows) {
|
||||
slog.Info("[collector] unable to find provided short code for workspace", "errors", err, "params", arg)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
} else if errors.Is(err, pgx.ErrNoRows) {
|
||||
slog.Info("[collector] short code not found", "params", arg)
|
||||
}
|
||||
|
||||
// TODO: Keep track of the submission id
|
||||
// submissionID := r.Form.Get("id")
|
||||
|
||||
// Validation renders whether there are errors or not errors, so that non-erroneous fields can be cleared of error messages
|
||||
// as the user corrects validation errors
|
||||
|
|
@ -123,10 +142,13 @@ func Collect(w http.ResponseWriter, r *http.Request) {
|
|||
err = ui.Validation(allFields, errs).Render(ctx, w)
|
||||
if err != nil {
|
||||
slog.Error("[collector] error while reporting validation error", "error", err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
// submitted forms only have a submission id when they've been previously submitted and the subject has re-submitted
|
||||
if submission.Has("submission_id") {
|
||||
// TODO do something with the submission id
|
||||
submission.Del("submission_id")
|
||||
}
|
||||
formFieldValues := types.FormFieldValues{}
|
||||
for fieldID, fieldValue := range submission {
|
||||
formFieldValues[fieldID] = types.FormFieldSubmission{
|
||||
|
|
@ -141,16 +163,19 @@ func Collect(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
_, err = internal.Q(ctx, i.DBArgs).SaveSubmission(ctx, internal.SaveSubmissionParams{
|
||||
// ID: submissionID, TODO save submission id
|
||||
FormID: formID,
|
||||
WorkspaceID: i.WorkspaceID,
|
||||
SubjectID: &shortCode.SubjectID,
|
||||
Status: internal.SubmissionStatusPartial,
|
||||
Fields: formFieldValues,
|
||||
})
|
||||
if err != nil {
|
||||
slog.Error("[collector] unable to save submission")
|
||||
slog.Error("[collector] unable to save submission", "error", err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// validate validates forms
|
||||
|
|
|
|||
|
|
@ -18,12 +18,6 @@ import (
|
|||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
|
||||
type contextKey string
|
||||
|
||||
var FormIDContextKey contextKey = "frm_form_id"
|
||||
var FieldIDContextKey contextKey = "frm_field_id"
|
||||
var ShortCodeContextKey contextKey = "frm_short_code"
|
||||
|
||||
var ErrFormIDNotFound = errors.New("a form ID was not found in the request context")
|
||||
var ErrFieldIDNotFound = errors.New("a field ID was not found in the request context")
|
||||
|
||||
|
|
@ -685,10 +679,13 @@ func DeleteForm(w http.ResponseWriter, r *http.Request) {
|
|||
// formID gets the form ID from the request context
|
||||
func formID(ctx context.Context, f *frm.Frm) (formID *int64, err error) {
|
||||
var ok bool
|
||||
formID, ok = ctx.Value(FormIDContextKey).(*int64)
|
||||
formID, ok = ctx.Value(internal.FormIDContextKey).(*int64)
|
||||
if !ok {
|
||||
if shortCode, ok := ctx.Value(ShortCodeContextKey).(*string); ok {
|
||||
s, err := internal.Q(ctx, f.DBArgs).GetShortCode(ctx, *shortCode)
|
||||
if shortCode, ok := ctx.Value(internal.ShortCodeContextKey).(*string); ok {
|
||||
s, err := internal.Q(ctx, f.DBArgs).GetShortCode(ctx, internal.GetShortCodeParams{
|
||||
WorkspaceID: f.WorkspaceID,
|
||||
ShortCode: *shortCode,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -702,7 +699,7 @@ func formID(ctx context.Context, f *frm.Frm) (formID *int64, err error) {
|
|||
// fieldID gets the field id from the request context
|
||||
func fieldID(ctx context.Context) (fieldID *uuid.UUID, err error) {
|
||||
var ok bool
|
||||
fieldID, ok = ctx.Value(FieldIDContextKey).(*uuid.UUID)
|
||||
fieldID, ok = ctx.Value(internal.FieldIDContextKey).(*uuid.UUID)
|
||||
if !ok {
|
||||
return nil, ErrFieldIDNotFound
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,11 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
pool *pgxpool.Pool
|
||||
shortcodeCharset = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
|
||||
FormIDContextKey contextKey = "frm_form_id"
|
||||
FieldIDContextKey contextKey = "frm_field_id"
|
||||
ShortCodeContextKey contextKey = "frm_short_code"
|
||||
pool *pgxpool.Pool
|
||||
shortcodeCharset = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
|
||||
)
|
||||
|
||||
type Forms []Form
|
||||
|
|
|
|||
|
|
@ -108,14 +108,26 @@ func (q *Queries) GetForm(ctx context.Context, arg GetFormParams) (Form, error)
|
|||
}
|
||||
|
||||
const getShortCode = `-- name: GetShortCode :one
|
||||
SELECT id, workspace_id, form_id, short_code, subject_id, created_at, updated_at FROM short_codes WHERE short_code = $1
|
||||
|
||||
SELECT id, workspace_id, form_id, short_code, subject_id, created_at, updated_at
|
||||
FROM short_codes
|
||||
WHERE workspace_id = $1
|
||||
AND short_code = $2
|
||||
`
|
||||
|
||||
type GetShortCodeParams struct {
|
||||
WorkspaceID string `json:"workspace_id"`
|
||||
ShortCode string `json:"short_code"`
|
||||
}
|
||||
|
||||
// GetShortCode
|
||||
//
|
||||
// SELECT id, workspace_id, form_id, short_code, subject_id, created_at, updated_at FROM short_codes WHERE short_code = $1
|
||||
func (q *Queries) GetShortCode(ctx context.Context, shortCode string) (ShortCode, error) {
|
||||
row := q.db.QueryRow(ctx, getShortCode, shortCode)
|
||||
// SELECT id, workspace_id, form_id, short_code, subject_id, created_at, updated_at
|
||||
// FROM short_codes
|
||||
// WHERE workspace_id = $1
|
||||
// AND short_code = $2
|
||||
func (q *Queries) GetShortCode(ctx context.Context, arg GetShortCodeParams) (ShortCode, error) {
|
||||
row := q.db.QueryRow(ctx, getShortCode, arg.WorkspaceID, arg.ShortCode)
|
||||
var i ShortCode
|
||||
err := row.Scan(
|
||||
&i.ID,
|
||||
|
|
@ -357,7 +369,9 @@ func (q *Queries) SaveDraft(ctx context.Context, arg SaveDraftParams) (Form, err
|
|||
}
|
||||
|
||||
const saveShortCode = `-- name: SaveShortCode :one
|
||||
INSERT INTO short_codes (workspace_id, form_id, subject_id, short_code) VALUES ($1, $2, $3, $4) RETURNING id, workspace_id, form_id, short_code, subject_id, created_at, updated_at
|
||||
|
||||
INSERT INTO short_codes (workspace_id, form_id, subject_id, short_code)
|
||||
VALUES ($1, $2, $3, $4) RETURNING id, workspace_id, form_id, short_code, subject_id, created_at, updated_at
|
||||
`
|
||||
|
||||
type SaveShortCodeParams struct {
|
||||
|
|
@ -369,7 +383,8 @@ type SaveShortCodeParams struct {
|
|||
|
||||
// SaveShortCode
|
||||
//
|
||||
// INSERT INTO short_codes (workspace_id, form_id, subject_id, short_code) VALUES ($1, $2, $3, $4) RETURNING id, workspace_id, form_id, short_code, subject_id, created_at, updated_at
|
||||
// INSERT INTO short_codes (workspace_id, form_id, subject_id, short_code)
|
||||
// VALUES ($1, $2, $3, $4) RETURNING id, workspace_id, form_id, short_code, subject_id, created_at, updated_at
|
||||
func (q *Queries) SaveShortCode(ctx context.Context, arg SaveShortCodeParams) (ShortCode, error) {
|
||||
row := q.db.QueryRow(ctx, saveShortCode,
|
||||
arg.WorkspaceID,
|
||||
|
|
@ -392,35 +407,37 @@ func (q *Queries) SaveShortCode(ctx context.Context, arg SaveShortCodeParams) (S
|
|||
|
||||
const saveSubmission = `-- name: SaveSubmission :one
|
||||
|
||||
INSERT INTO form_submissions (id, form_id, workspace_id, fields, status)
|
||||
VALUES (coalesce(nullif($1, 0), nextval('submission_ids'))::bigint, $2, $3, $4, $5) ON conflict(id) DO
|
||||
INSERT INTO form_submissions (id, form_id, workspace_id, subject_id, fields, status)
|
||||
VALUES (coalesce(nullif($1, 0), nextval('submission_ids'))::bigint, $2, $3, $4, $5, $6) ON conflict(id) DO
|
||||
UPDATE
|
||||
SET updated_at = timezone('utc', now()),
|
||||
fields = $4,
|
||||
status = $5 RETURNING id, form_id, workspace_id, subject_id, fields, status, created_at, updated_at
|
||||
fields = $5,
|
||||
status = $6 RETURNING id, form_id, workspace_id, subject_id, fields, status, created_at, updated_at
|
||||
`
|
||||
|
||||
type SaveSubmissionParams struct {
|
||||
ID interface{} `json:"id"`
|
||||
FormID *int64 `json:"form_id"`
|
||||
WorkspaceID string `json:"workspace_id"`
|
||||
SubjectID *string `json:"subject_id"`
|
||||
Fields types.FormFieldValues `json:"fields"`
|
||||
Status SubmissionStatus `json:"status"`
|
||||
}
|
||||
|
||||
// SaveSubmission
|
||||
//
|
||||
// INSERT INTO form_submissions (id, form_id, workspace_id, fields, status)
|
||||
// VALUES (coalesce(nullif($1, 0), nextval('submission_ids'))::bigint, $2, $3, $4, $5) ON conflict(id) DO
|
||||
// INSERT INTO form_submissions (id, form_id, workspace_id, subject_id, fields, status)
|
||||
// VALUES (coalesce(nullif($1, 0), nextval('submission_ids'))::bigint, $2, $3, $4, $5, $6) ON conflict(id) DO
|
||||
// UPDATE
|
||||
// SET updated_at = timezone('utc', now()),
|
||||
// fields = $4,
|
||||
// status = $5 RETURNING id, form_id, workspace_id, subject_id, fields, status, created_at, updated_at
|
||||
// fields = $5,
|
||||
// status = $6 RETURNING id, form_id, workspace_id, subject_id, fields, status, created_at, updated_at
|
||||
func (q *Queries) SaveSubmission(ctx context.Context, arg SaveSubmissionParams) (FormSubmission, error) {
|
||||
row := q.db.QueryRow(ctx, saveSubmission,
|
||||
arg.ID,
|
||||
arg.FormID,
|
||||
arg.WorkspaceID,
|
||||
arg.SubjectID,
|
||||
arg.Fields,
|
||||
arg.Status,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -128,21 +128,21 @@ func addRequestContext(h http.Handler) http.Handler {
|
|||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
ctx = context.WithValue(ctx, handlers.FormIDContextKey, &formID)
|
||||
ctx = context.WithValue(ctx, internal.FormIDContextKey, &formID)
|
||||
case string(UrlParamFieldID):
|
||||
fieldID, err := uuid.Parse(chi.URLParam(r, string(UrlParamFieldID)))
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
ctx = context.WithValue(ctx, handlers.FieldIDContextKey, &fieldID)
|
||||
ctx = context.WithValue(ctx, internal.FieldIDContextKey, &fieldID)
|
||||
case string(UrlParamShortCode):
|
||||
shortCode := chi.URLParam(r, string(UrlParamShortCode))
|
||||
if shortCode == "" {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
ctx = context.WithValue(ctx, handlers.ShortCodeContextKey, &shortCode)
|
||||
ctx = context.WithValue(ctx, internal.ShortCodeContextKey, &shortCode)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import (
|
|||
"strings"
|
||||
"context"
|
||||
"github.com/acaloiaro/frm"
|
||||
"github.com/acaloiaro/frm/internal"
|
||||
"github.com/acaloiaro/frm/ui/selector"
|
||||
"sort"
|
||||
"github.com/acaloiaro/frm/types"
|
||||
|
|
@ -825,6 +826,16 @@ func (v ViewerMetadata) JSON() string {
|
|||
return string(b)
|
||||
}
|
||||
|
||||
// shortCode gets the short code from the request context, if present
|
||||
func shortCode(ctx context.Context) (shortCode *string) {
|
||||
var ok bool
|
||||
shortCode, ok = ctx.Value(internal.ShortCodeContextKey).(*string)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// FormView is a view of Forms
|
||||
templ FormView(form frm.Form, isPreview bool) {
|
||||
<div id="form-viewer" class="flex flex-col w-1/2 mx-auto justify-top pt-12" data-hx-swap-oob="true">
|
||||
|
|
@ -838,7 +849,10 @@ templ FormView(form frm.Form, isPreview bool) {
|
|||
<form
|
||||
_="on field_change(field_id, value) formValueChanged(field_id, value)"
|
||||
>
|
||||
<input name="subject_id" type="hidden"/>
|
||||
<input name="submission_id" type="hidden" value="changeme!"/>
|
||||
if sc := shortCode(ctx); sc != nil {
|
||||
<input name="short_code" type="hidden" value={ *sc }/>
|
||||
}
|
||||
for _, field := range sortFields(form.Fields) {
|
||||
<div
|
||||
id={ fmt.Sprintf("field-container-%s", field.ID.String()) }
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/acaloiaro/frm"
|
||||
"github.com/acaloiaro/frm/internal"
|
||||
"github.com/acaloiaro/frm/types"
|
||||
"github.com/acaloiaro/frm/ui/selector"
|
||||
"github.com/google/uuid"
|
||||
|
|
@ -89,7 +90,7 @@ func HeroIcon(style string, name string) templ.Component {
|
|||
var templ_7745c5c3_Var2 string
|
||||
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("https://unpkg.com/heroicons/20/%s/%s.svg", style, name))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 57, Col: 85}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 58, Col: 85}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -167,7 +168,7 @@ func button(args buttonArgs, attrs templ.Attributes) templ.Component {
|
|||
var templ_7745c5c3_Var6 string
|
||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(args.Label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 69, Col: 14}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 70, Col: 14}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -239,7 +240,7 @@ func mutedButton(args buttonArgs, attrs templ.Attributes) templ.Component {
|
|||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(args.Label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 76, Col: 14}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 77, Col: 14}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -282,7 +283,7 @@ func FormBuilderNavTitle(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(form.Name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 84, Col: 14}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 85, Col: 14}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -353,7 +354,7 @@ func FormBuilderNav(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(formUrl[string](ctx, form, "/publish"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 115, Col: 57}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 116, Col: 57}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -401,7 +402,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(ApplicationName)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 135, Col: 26}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 136, Col: 26}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -414,7 +415,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(pageTitle)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 135, Col: 43}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 136, Col: 43}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -443,7 +444,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(frm.CollectorPath(ctx, "/static/css/styles.css"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 139, Col: 64}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 140, Col: 64}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -456,7 +457,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(frm.CollectorPath(ctx, "/static/css/choices.min.css"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 140, Col: 86}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 141, Col: 86}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -469,7 +470,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var21 string
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 140, Col: 116}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 141, Col: 116}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -482,7 +483,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(frm.CollectorPath(ctx, "/static/js/htmx.js"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 141, Col: 84}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 142, Col: 84}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -495,7 +496,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 141, Col: 114}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 142, Col: 114}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -508,7 +509,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var24 string
|
||||
templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs(frm.CollectorPath(ctx, "/static/js/htmx-response-targets.js"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 142, Col: 101}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 143, Col: 101}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -521,7 +522,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var25 string
|
||||
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 142, Col: 131}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 143, Col: 131}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -534,7 +535,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(frm.CollectorPath(ctx, "/static/js/hyperscript.js"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 143, Col: 91}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 144, Col: 91}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -547,7 +548,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 143, Col: 121}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 144, Col: 121}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -560,7 +561,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var28 string
|
||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(frm.CollectorPath(ctx, "/static/js/choices.min.js"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 144, Col: 91}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 145, Col: 91}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -573,7 +574,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var29 string
|
||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 144, Col: 121}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 145, Col: 121}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -586,7 +587,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 145, Col: 130}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 146, Col: 130}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -599,7 +600,7 @@ func head(pageTitle string) templ.Component {
|
|||
var templ_7745c5c3_Var31 string
|
||||
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(templ.GetNonce(ctx))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 146, Col: 119}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 147, Col: 119}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -867,7 +868,7 @@ func FormSettings(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var39 string
|
||||
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(formUrl[string](ctx, form, "/settings"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 285, Col: 56}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 286, Col: 56}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -880,7 +881,7 @@ func FormSettings(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var40 string
|
||||
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(FormSettingsUpdateEvent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 286, Col: 44}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 287, Col: 44}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -901,7 +902,7 @@ func FormSettings(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var41 string
|
||||
templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(form.Name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 300, Col: 21}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 301, Col: 21}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -914,7 +915,7 @@ func FormSettings(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var42 string
|
||||
templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 600ms trigger '%s'", FormSettingsUpdateEvent))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 303, Col: 88}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 304, Col: 88}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1150,7 +1151,7 @@ func FormFieldsForm(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var49 string
|
||||
templ_7745c5c3_Var49, templ_7745c5c3_Err = templ.JoinStringErrs(formUrl[string](ctx, form, "/fields/order"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 361, Col: 60}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 362, Col: 60}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var49))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1168,7 +1169,7 @@ func FormFieldsForm(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var50 string
|
||||
templ_7745c5c3_Var50, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 370, Col: 65}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 371, Col: 65}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var50))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1181,7 +1182,7 @@ func FormFieldsForm(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var51 string
|
||||
templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on click add .hidden to .active-configurator then take .active-configurator from .active-configurator for #configure-%s then remove .hidden from #configure-%s", field.ID.String(), field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 376, Col: 223}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 377, Col: 223}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1194,7 +1195,7 @@ func FormFieldsForm(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var52 string
|
||||
templ_7745c5c3_Var52, templ_7745c5c3_Err = templ.JoinStringErrs(field.Label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 380, Col: 65}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 381, Col: 65}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var52))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1326,7 +1327,7 @@ func builderColumnRight(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var55 string
|
||||
templ_7745c5c3_Var55, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(i))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 448, Col: 32}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 449, Col: 32}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var55))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1339,7 +1340,7 @@ func builderColumnRight(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var56 string
|
||||
templ_7745c5c3_Var56, templ_7745c5c3_Err = templ.JoinStringErrs(formUrl[string](ctx, form, "/fields"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 451, Col: 60}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 452, Col: 60}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var56))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1352,7 +1353,7 @@ func builderColumnRight(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var57 string
|
||||
templ_7745c5c3_Var57, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf(`{"field_type": "%s"}`, fieldType))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 453, Col: 69}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 454, Col: 69}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var57))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1429,7 +1430,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var59 string
|
||||
templ_7745c5c3_Var59, templ_7745c5c3_Err = templ.JoinStringErrs(formUrl[string](ctx, form, "/fields"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 484, Col: 53}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 485, Col: 53}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var59))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1442,7 +1443,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var60 string
|
||||
templ_7745c5c3_Var60, templ_7745c5c3_Err = templ.JoinStringErrs(FieldsFormUpdateEvent)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 485, Col: 41}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 486, Col: 41}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var60))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1460,7 +1461,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var61 string
|
||||
templ_7745c5c3_Var61, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("configure-%s", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 490, Col: 59}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 491, Col: 59}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var61))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1481,7 +1482,7 @@ func FormFieldConfigurator(form frm.Form) templ.Component {
|
|||
var templ_7745c5c3_Var62 string
|
||||
templ_7745c5c3_Var62, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("configurator-tabs-%s", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 494, Col: 68}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 495, Col: 68}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var62))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1564,7 +1565,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var64 string
|
||||
templ_7745c5c3_Var64, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("field-%s-settings", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 518, Col: 62}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 519, Col: 62}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var64))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1577,7 +1578,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var65 string
|
||||
templ_7745c5c3_Var65, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "required"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 519, Col: 48}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 520, Col: 48}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var65))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1590,7 +1591,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var66 string
|
||||
templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(field.Required))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 519, Col: 99}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 520, Col: 99}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1603,7 +1604,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var67 string
|
||||
templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "hidden"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 520, Col: 46}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 521, Col: 46}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1616,7 +1617,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var68 string
|
||||
templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(field.Hidden))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 520, Col: 95}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 521, Col: 95}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1629,7 +1630,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var69 string
|
||||
templ_7745c5c3_Var69, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "field_type"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 521, Col: 50}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 522, Col: 50}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var69))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1642,7 +1643,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var70 string
|
||||
templ_7745c5c3_Var70, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprint(field.Type))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 521, Col: 97}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 522, Col: 97}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var70))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1655,7 +1656,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var71 string
|
||||
templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "label"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 523, Col: 45}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 524, Col: 45}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1676,7 +1677,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var72 string
|
||||
templ_7745c5c3_Var72, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "label"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 529, Col: 37}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 530, Col: 37}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var72))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1689,7 +1690,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var73 string
|
||||
templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "label"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 530, Col: 39}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 531, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1702,7 +1703,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var74 string
|
||||
templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(field.Label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 533, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 534, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1715,7 +1716,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var75 string
|
||||
templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 600ms trigger '%s'", FieldsFormUpdateEvent))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 535, Col: 85}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 536, Col: 85}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1728,7 +1729,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var76 string
|
||||
templ_7745c5c3_Var76, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "placeholder"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 538, Col: 51}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 539, Col: 51}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var76))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1741,7 +1742,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var77 string
|
||||
templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "placeholder"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 543, Col: 43}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 544, Col: 43}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var77))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1754,7 +1755,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var78 string
|
||||
templ_7745c5c3_Var78, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "placeholder"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 544, Col: 45}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 545, Col: 45}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var78))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1767,7 +1768,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var79 string
|
||||
templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(field.Placeholder)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 547, Col: 28}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 548, Col: 28}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1780,7 +1781,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var80 string
|
||||
templ_7745c5c3_Var80, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 600ms trigger '%s'", FieldsFormUpdateEvent))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 549, Col: 85}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 550, Col: 85}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var80))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1798,7 +1799,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var81 string
|
||||
templ_7745c5c3_Var81, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "options"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 553, Col: 48}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 554, Col: 48}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var81))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1828,7 +1829,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var82 string
|
||||
templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "required"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 568, Col: 48}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 569, Col: 48}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1841,7 +1842,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var83 string
|
||||
templ_7745c5c3_Var83, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "required"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 573, Col: 40}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 574, Col: 40}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var83))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1854,7 +1855,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var84 string
|
||||
templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "required"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 574, Col: 42}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 575, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1883,7 +1884,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
then trigger '%s'`,
|
||||
fieldName(field, "", "hidden"), FieldsFormUpdateEvent))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 586, Col: 59}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 587, Col: 59}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var85))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1896,7 +1897,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var86 string
|
||||
templ_7745c5c3_Var86, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "hidden"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 589, Col: 46}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 590, Col: 46}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var86))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1909,7 +1910,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var87 string
|
||||
templ_7745c5c3_Var87, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "hidden"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 594, Col: 38}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 595, Col: 38}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var87))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1922,7 +1923,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
var templ_7745c5c3_Var88 string
|
||||
templ_7745c5c3_Var88, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, "", "hidden"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 595, Col: 40}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 596, Col: 40}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var88))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -1951,7 +1952,7 @@ func fieldSettingsConfiguration(form frm.Form, field types.FormField) templ.Comp
|
|||
then trigger '%s'`,
|
||||
fieldName(field, "", "required"), FieldsFormUpdateEvent))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 607, Col: 61}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 608, Col: 61}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var89))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2005,7 +2006,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var91 string
|
||||
templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("field-%s-logic", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 623, Col: 59}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 624, Col: 59}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var91))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2018,7 +2019,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var92 string
|
||||
templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.JoinStringErrs(frm.BuilderPathFormField(ctx, form.ID, field.ID.String(), "/logic/choices"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 626, Col: 93}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 627, Col: 93}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var92))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2031,7 +2032,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var93 string
|
||||
templ_7745c5c3_Var93, templ_7745c5c3_Err = templ.JoinStringErrs(LogicConfiguratorTargetFieldSelected)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 627, Col: 58}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 628, Col: 58}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var93))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2044,7 +2045,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var94 string
|
||||
templ_7745c5c3_Var94, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("#logic-field-value-chooser-%s", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 629, Col: 84}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 630, Col: 84}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var94))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2087,7 +2088,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var95 string
|
||||
templ_7745c5c3_Var95, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("logic-field-value-chooser-%s", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 654, Col: 71}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 655, Col: 71}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var95))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2110,7 +2111,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var96 string
|
||||
templ_7745c5c3_Var96, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%s-logic-action", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 664, Col: 58}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 665, Col: 58}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var96))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2123,7 +2124,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var97 string
|
||||
templ_7745c5c3_Var97, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, FieldGroupLogic, types.FieldLogicTriggerShow.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 667, Col: 82}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 668, Col: 82}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var97))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2149,7 +2150,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
trigger '%s'`,
|
||||
FieldsFormUpdateEvent))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 674, Col: 28}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 675, Col: 28}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var98))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2162,7 +2163,7 @@ func fieldLogicConfiguration(form frm.Form, field types.FormField) templ.Compone
|
|||
var templ_7745c5c3_Var99 string
|
||||
templ_7745c5c3_Var99, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%s-logic-action", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 676, Col: 65}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 677, Col: 65}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var99))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2243,7 +2244,7 @@ func LogicConfiguratorStepThree(form frm.Form, field types.FormField, targetFiel
|
|||
var templ_7745c5c3_Var101 string
|
||||
templ_7745c5c3_Var101, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%s-logic-chosen-field-value", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 719, Col: 70}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 720, Col: 70}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var101))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2256,7 +2257,7 @@ func LogicConfiguratorStepThree(form frm.Form, field types.FormField, targetFiel
|
|||
var templ_7745c5c3_Var102 string
|
||||
templ_7745c5c3_Var102, templ_7745c5c3_Err = templ.JoinStringErrs(fieldName(field, FieldGroupLogic, FieldLogicTargetFieldValue))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 720, Col: 72}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 721, Col: 72}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var102))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2274,7 +2275,7 @@ func LogicConfiguratorStepThree(form frm.Form, field types.FormField, targetFiel
|
|||
var templ_7745c5c3_Var103 string
|
||||
templ_7745c5c3_Var103, templ_7745c5c3_Err = templ.JoinStringErrs(field.Logic.TriggerValues[0])
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 725, Col: 41}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 726, Col: 41}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var103))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2292,7 +2293,7 @@ func LogicConfiguratorStepThree(form frm.Form, field types.FormField, targetFiel
|
|||
var templ_7745c5c3_Var104 string
|
||||
templ_7745c5c3_Var104, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 600ms trigger '%s'", FieldsFormUpdateEvent))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 727, Col: 86}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 728, Col: 86}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var104))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2454,7 +2455,7 @@ func fieldLabel(field types.FormField) templ.Component {
|
|||
var templ_7745c5c3_Var107 string
|
||||
templ_7745c5c3_Var107, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 806, Col: 31}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 807, Col: 31}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var107))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2467,7 +2468,7 @@ func fieldLabel(field types.FormField) templ.Component {
|
|||
var templ_7745c5c3_Var108 string
|
||||
templ_7745c5c3_Var108, templ_7745c5c3_Err = templ.JoinStringErrs(field.Label)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 807, Col: 15}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 808, Col: 15}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var108))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2505,6 +2506,16 @@ func (v ViewerMetadata) JSON() string {
|
|||
return string(b)
|
||||
}
|
||||
|
||||
// shortCode gets the short code from the request context, if present
|
||||
func shortCode(ctx context.Context) (shortCode *string) {
|
||||
var ok bool
|
||||
shortCode, ok = ctx.Value(internal.ShortCodeContextKey).(*string)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// FormView is a view of Forms
|
||||
func FormView(form frm.Form, isPreview bool) templ.Component {
|
||||
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
|
||||
|
|
@ -2534,7 +2545,7 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
var templ_7745c5c3_Var110 string
|
||||
templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(ViewerMetadata{Form: form}.JSON())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 833, Col: 48}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 844, Col: 48}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2547,7 +2558,7 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
var templ_7745c5c3_Var111 string
|
||||
templ_7745c5c3_Var111, templ_7745c5c3_Err = templ.JoinStringErrs(form.Name)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 836, Col: 14}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 847, Col: 14}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var111))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2557,15 +2568,15 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
for _, field := range sortFields(form.Fields) {
|
||||
if sc := shortCode(ctx); sc != nil {
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 163)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var112 string
|
||||
templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("field-container-%s", field.ID.String()))
|
||||
templ_7745c5c3_Var112, templ_7745c5c3_Err = templ.JoinStringErrs(*sc)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 844, Col: 62}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 854, Col: 54}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var112))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2575,31 +2586,50 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if field.Hidden {
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 165)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 166)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 167)
|
||||
}
|
||||
for _, field := range sortFields(form.Fields) {
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 165)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var113 string
|
||||
templ_7745c5c3_Var113, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("errors-%s", field.ID.String()))
|
||||
templ_7745c5c3_Var113, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("field-container-%s", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 852, Col: 54}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 858, Col: 62}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var113))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 168)
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 166)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
if field.Hidden {
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 167)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
} else {
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 168)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 169)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var114 string
|
||||
templ_7745c5c3_Var114, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("errors-%s", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 866, Col: 54}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var114))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 170)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
@ -2609,55 +2639,29 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 169)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var114 string
|
||||
templ_7745c5c3_Var114, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 859, Col: 30}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var114))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 170)
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 171)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var115 string
|
||||
templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 860, Col: 32}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 873, Col: 30}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 171)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var116 string
|
||||
templ_7745c5c3_Var116, templ_7745c5c3_Err = templ.JoinStringErrs(field.Placeholder)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 861, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var116))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 172)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var117 string
|
||||
templ_7745c5c3_Var117, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 250ms trigger field_change(field_id: '%s', value: my.value)", field.ID.String()))
|
||||
var templ_7745c5c3_Var116 string
|
||||
templ_7745c5c3_Var116, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 864, Col: 127}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 874, Col: 32}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var117))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var116))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
@ -2665,8 +2669,12 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
case types.FormFieldTypeTextMultiple:
|
||||
templ_7745c5c3_Err = fieldLabel(field).Render(ctx, templ_7745c5c3_Buffer)
|
||||
var templ_7745c5c3_Var117 string
|
||||
templ_7745c5c3_Var117, templ_7745c5c3_Err = templ.JoinStringErrs(field.Placeholder)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 875, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var117))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
@ -2675,9 +2683,9 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var118 string
|
||||
templ_7745c5c3_Var118, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
templ_7745c5c3_Var118, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 250ms trigger field_change(field_id: '%s', value: my.value)", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 870, Col: 30}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 878, Col: 127}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var118))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
|
@ -2687,12 +2695,8 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var119 string
|
||||
templ_7745c5c3_Var119, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 871, Col: 32}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var119))
|
||||
case types.FormFieldTypeTextMultiple:
|
||||
templ_7745c5c3_Err = fieldLabel(field).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
@ -2700,12 +2704,12 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var120 string
|
||||
templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.JoinStringErrs(field.Placeholder)
|
||||
var templ_7745c5c3_Var119 string
|
||||
templ_7745c5c3_Var119, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 873, Col: 39}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 884, Col: 30}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var120))
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var119))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
@ -2713,16 +2717,42 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var121 string
|
||||
templ_7745c5c3_Var121, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 250ms trigger field_change(field_id: '%s', value: my.value)", field.ID.String()))
|
||||
var templ_7745c5c3_Var120 string
|
||||
templ_7745c5c3_Var120, templ_7745c5c3_Err = templ.JoinStringErrs(field.ID.String())
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 875, Col: 127}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 885, Col: 32}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var120))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 178)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var121 string
|
||||
templ_7745c5c3_Var121, templ_7745c5c3_Err = templ.JoinStringErrs(field.Placeholder)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 887, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var121))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 178)
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 179)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
var templ_7745c5c3_Var122 string
|
||||
templ_7745c5c3_Var122, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("on keyup debounced at 250ms trigger field_change(field_id: '%s', value: my.value)", field.ID.String()))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `ui/common.templ`, Line: 889, Col: 127}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var122))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 180)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
@ -2744,12 +2774,12 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 179)
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 181)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 180)
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 182)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
@ -2769,7 +2799,7 @@ func FormView(form frm.Form, isPreview bool) templ.Component {
|
|||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 181)
|
||||
templ_7745c5c3_Err = templ.WriteWatchModeString(templ_7745c5c3_Buffer, 183)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -159,7 +159,9 @@ Multi select
|
|||
</label>
|
||||
<div id=\"form-viewer\" class=\"flex flex-col w-1/2 mx-auto justify-top pt-12\" data-hx-swap-oob=\"true\"><div id=\"form-metadata\" data-data=\"
|
||||
\"></div><h1 class=\"rounded relative mb-2 font-black text-slate-700 text-5xl\">
|
||||
</h1><form _=\"on field_change(field_id, value) formValueChanged(field_id, value)\"><input name=\"subject_id\" type=\"hidden\">
|
||||
</h1><form _=\"on field_change(field_id, value) formValueChanged(field_id, value)\"><input name=\"submission_id\" type=\"hidden\" value=\"changeme!\">
|
||||
<input name=\"short_code\" type=\"hidden\" value=\"
|
||||
\">
|
||||
<div id=\"
|
||||
\"
|
||||
class=\"flex flex-col py-3 hidden\"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Loading…
Reference in a new issue