From 9d83eed4f37290bf78b0f9645417697ef5ad1099 Mon Sep 17 00:00:00 2001 From: Erika Harker Date: Thu, 18 Dec 2025 16:50:00 -0500 Subject: [PATCH] Color Picker to form --- template/components/form_color_opacity.go | 14 +++++++++++ template/components/form_color_opacity.html | 28 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 template/components/form_color_opacity.go create mode 100644 template/components/form_color_opacity.html diff --git a/template/components/form_color_opacity.go b/template/components/form_color_opacity.go new file mode 100644 index 0000000..1998386 --- /dev/null +++ b/template/components/form_color_opacity.go @@ -0,0 +1,14 @@ +package components + +type FormColorOpacity struct { + ColorID string + OpacityID string + Label string + ColorHexValue string + OpacityValue string + Hint string + Error string + IsDisabled bool + IsRequired bool + HasOpacity bool +} diff --git a/template/components/form_color_opacity.html b/template/components/form_color_opacity.html new file mode 100644 index 0000000..b429d55 --- /dev/null +++ b/template/components/form_color_opacity.html @@ -0,0 +1,28 @@ +{{ define "form_color_opacity"}} +
+ +
+ + {{if eq .HasOpacity true}} + opacity: + {{if ne .Hint ""}}{{.Hint}}{{end}} + {{if ne .Error ""}}
{{.Error}}
{{end}} + {{end}} +
+ +{{end}} + \ No newline at end of file