78 lines
2.2 KiB
Go
78 lines
2.2 KiB
Go
// Code generated by templ@v0.2.316 DO NOT EDIT.
|
|
|
|
package templates
|
|
|
|
//lint:file-ignore SA4006 This context is only used if a nested component is present.
|
|
|
|
import "github.com/a-h/templ"
|
|
import "context"
|
|
import "io"
|
|
import "bytes"
|
|
|
|
func GetStatus(statusOne string, statusTwo string) templ.Component {
|
|
return templ.ComponentFunc(func(ctx context.Context, w io.Writer) (err error) {
|
|
templBuffer, templIsBuffer := w.(*bytes.Buffer)
|
|
if !templIsBuffer {
|
|
templBuffer = templ.GetBuffer()
|
|
defer templ.ReleaseBuffer(templBuffer)
|
|
}
|
|
ctx = templ.InitializeContext(ctx)
|
|
var_1 := templ.GetChildren(ctx)
|
|
if var_1 == nil {
|
|
var_1 = templ.NopComponent
|
|
}
|
|
ctx = templ.ClearChildren(ctx)
|
|
_, err = templBuffer.WriteString("<html><head><script src=\"https://cdn.tailwindcss.com\">")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
var_2 := ``
|
|
_, err = templBuffer.WriteString(var_2)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = templBuffer.WriteString("</script><script src=\"https://unpkg.com/htmx.org@1.9.5\" integrity=\"sha384-xcuj3WpfgjlKF+FXhSQFQ0ZNr39ln+hwjN3npfM9VBnUskLolQAcN80McRIVOPuO\" crossorigin=\"anonymous\">")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
var_3 := ``
|
|
_, err = templBuffer.WriteString(var_3)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = templBuffer.WriteString("</script></head><form id=\"form\" hx-post=\"/changestatus\" hx-select=\"#form\" hx-swap=\"outerHTML\"><input id=\"statusH\" name=\"statush\" type=\"text\" placeholder=\"Enter status H\" value=\"")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = templBuffer.WriteString(templ.EscapeString(statusOne))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = templBuffer.WriteString("\"><input id=\"statusA\" name=\"statusa\" type=\"text\" placeholder=\"Enter status, A\" value=\"")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = templBuffer.WriteString(templ.EscapeString(statusTwo))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = templBuffer.WriteString("\"><button type=\"submit\" class=\"button is-primary\">")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
var_4 := `Update`
|
|
_, err = templBuffer.WriteString(var_4)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
_, err = templBuffer.WriteString("</button></form></html>")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if !templIsBuffer {
|
|
_, err = io.Copy(w, templBuffer)
|
|
}
|
|
return err
|
|
})
|
|
}
|