package capture import ( "gitea.henriburau.de/haw-lan/cod4watcher/views/layouts" "gitea.henriburau.de/haw-lan/cod4watcher/views/components" ) type CaptureFormValues struct { Host string Port string Name string Active bool ValidateServer bool } templ CaptureForm(formValues CaptureFormValues, errors map[string]string) { @layouts.Base() { @components.Form(components.FormProps{ Title: "Create new capture", Action: "/new/capture", Method: "post", SubmitText: "Create capture", }) {
@components.Input(components.InputProps{ Name: "name", Value: formValues.Name, Error: errors["name"], Placeholder: "Name for the capture", })
@components.Input(components.InputProps{ Name: "host", Value: formValues.Host, Error: errors["host"], Placeholder: "Host-Address of the capture", })
@components.Input(components.InputProps{ Name: "port", Value: formValues.Port, Error: errors["port"], Placeholder: "Port for the capture", })
} } }