diff --git a/form.json b/form.json index c14094f..f069af7 100644 --- a/form.json +++ b/form.json @@ -1 +1 @@ -{"Elements":[{"Name":"theemail","Label":"Email Address","LabelClasses":"","InputClasses":"","Type":"text","Hint":"","Required":false,"Classes":"","Validator":"email","FailMessage":"Must be a valid email address","Value":"","Autocomplete":"off","Order":1,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"theoldpassword","Label":"Old Password","LabelClasses":"","InputClasses":"","Type":"password","Hint":"","Required":false,"Classes":"","Validator":"","FailMessage":"Passsword Incorrect","Value":"","Autocomplete":"new-password","Order":2,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"newpassword","Label":"New Password","LabelClasses":"","InputClasses":"","Type":"password","Hint":"","Required":false,"Classes":"","Validator":"minlength=8;haslowercase;hasuppercase;hasdigit","FailMessage":"Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter and one digit","Value":"","Autocomplete":"new-password","Order":3,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"confirmpassword","Label":"Confirm Password","LabelClasses":"","InputClasses":"","Type":"password","Hint":"","Required":false,"Classes":"","Validator":"mustmatch=newpassword","FailMessage":"Passwords do not match","Value":"","Autocomplete":"new-password","Order":4,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"","Label":"Change Password","LabelClasses":"","InputClasses":"flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","Type":"submit","Hint":"","Required":false,"Classes":"","Validator":"","FailMessage":"","Value":"","Autocomplete":"off","Order":5,"OnClick":"","Choices":null,"TogglePassword":false}],"Route":"/chpass/changepassword","Classes":" py-2 text-indigo-300 md:px-10 lg:col-start-2 lg:row-start-1 lg:mx-auto lg:w-full lg:max-w-lg lg:bg-transparent lg:px-0 ","LabelClasses":"block text-sm font-medium text-gray-700","InputClasses":" w-full mr-12 pr-12 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm","ErrorClasses":"text-red-800 font-bold","ContainerClasses":"relative mx-auto gap-x-16 bg-slate-100 w-full lg-w-1/2 lg:px-8 lg:pt-16","Autocomplete":"off","Editable":true} \ No newline at end of file +{"Elements":[{"Name":"theemail","Label":"Email Address","LabelClasses":"","InputClasses":"","Type":"text","Hint":"","Required":false,"Classes":"","Validator":"email","FailMessage":"Must be a valid email address","Value":"","Autocomplete":"one-time-code","Order":1,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"theoldpassword","Label":"Old Password","LabelClasses":"","InputClasses":"","Type":"password","Hint":"","Required":false,"Classes":"","Validator":"","FailMessage":"Passsword Incorrect","Value":"","Autocomplete":"one-time-code","Order":2,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"newpassword","Label":"New Password","LabelClasses":"","InputClasses":"","Type":"password","Hint":"","Required":false,"Classes":"","Validator":"minlength=8;haslowercase;hasuppercase;hasdigit","FailMessage":"Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter and one digit","Value":"","Autocomplete":"one-time-code","Order":3,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"confirmpassword","Label":"Confirm Password","LabelClasses":"","InputClasses":"","Type":"password","Hint":"","Required":false,"Classes":"","Validator":"mustmatch=newpassword","FailMessage":"Passwords do not match","Value":"","Autocomplete":"one-time-code","Order":4,"OnClick":"","Choices":null,"TogglePassword":false},{"Name":"","Label":"Change Password","LabelClasses":"","InputClasses":"flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600","Type":"submit","Hint":"","Required":false,"Classes":"","Validator":"","FailMessage":"","Value":"","Autocomplete":"","Order":5,"OnClick":"","Choices":null,"TogglePassword":false}],"Route":"/chpass/changepassword","Classes":" py-2 text-indigo-300 md:px-10 lg:col-start-2 lg:row-start-1 lg:mx-auto lg:w-full lg:max-w-lg lg:bg-transparent lg:px-0 ","LabelClasses":"block text-sm font-medium text-gray-700","InputClasses":" w-full mr-12 pr-12 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm","ErrorClasses":"text-red-800 font-bold","ContainerClasses":"relative mx-auto gap-x-16 bg-slate-100 w-full lg-w-1/2 lg:px-8 lg:pt-16","Autocomplete":"off","Editable":true} \ No newline at end of file diff --git a/go.mod b/go.mod index ce2c289..328fba3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module git.teamworkapps.com/shortcut/docker-mailserver-passwords go 1.22.2 require ( - git.teamworkapps.com/shortcut/forms v0.0.0-20241008233303-19a42096fe0a + git.teamworkapps.com/shortcut/forms v0.0.0-20241008234234-c0266dc333f1 github.com/gorilla/mux v1.8.1 github.com/knadh/go-pop3 v1.0.0 ) diff --git a/go.sum b/go.sum index cb91dab..3eaaa4d 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ git.teamworkapps.com/shortcut/forms v0.0.0-20241008225541-c7da7f39222e h1:b/PUw1 git.teamworkapps.com/shortcut/forms v0.0.0-20241008225541-c7da7f39222e/go.mod h1:1ElXS6rlK/NaNDQoqfCALVVKnwaSYAg2pNF8Ksvoc3Y= git.teamworkapps.com/shortcut/forms v0.0.0-20241008233303-19a42096fe0a h1:iVyMquMvcwoDzHRa9IZdyggYYHpz5M/r0DUaUp4CSa0= git.teamworkapps.com/shortcut/forms v0.0.0-20241008233303-19a42096fe0a/go.mod h1:1ElXS6rlK/NaNDQoqfCALVVKnwaSYAg2pNF8Ksvoc3Y= +git.teamworkapps.com/shortcut/forms v0.0.0-20241008234234-c0266dc333f1 h1:79yEI04FhvgQU2yQQo0pTQKTcyq40Qs0pNaF/+dvpGI= +git.teamworkapps.com/shortcut/forms v0.0.0-20241008234234-c0266dc333f1/go.mod h1:1ElXS6rlK/NaNDQoqfCALVVKnwaSYAg2pNF8Ksvoc3Y= github.com/emersion/go-message v0.15.0 h1:urgKGqt2JAc9NFJcgncQcohHdiYb803YTH9OQwHBHIY= github.com/emersion/go-message v0.15.0/go.mod h1:wQUEfE+38+7EW8p8aZ96ptg6bAb1iwdgej19uXASlE4= github.com/emersion/go-textwrapper v0.0.0-20200911093747-65d896831594 h1:IbFBtwoTQyw0fIM5xv1HF+Y+3ZijDR839WMulgxCcUY= diff --git a/main.go b/main.go index e1fe128..9a2939f 100644 --- a/main.go +++ b/main.go @@ -54,7 +54,6 @@ func main() { e.Label = "Old Password" e.Type = "password" e.Validator = "" - e.Autocomplete = "new-password" e.FailMessage = "Passsword Incorrect" e.Name = "theoldpassword" f.Add(e) @@ -65,7 +64,6 @@ func main() { e.FailMessage = "Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter and one digit" e.Validator = "minlength=8;haslowercase;hasuppercase;hasdigit" e.Name = "newpassword" - e.Autocomplete = "new-password" f.Add(e) e = forms.NewElement() @@ -74,7 +72,6 @@ func main() { e.FailMessage = "Passwords do not match" e.Validator = "mustmatch=newpassword" e.Name = "confirmpassword" - e.Autocomplete = "new-password" f.Add(e) e = forms.NewElement() diff --git a/style.css b/style.css index e816f67..a17c634 100644 --- a/style.css +++ b/style.css @@ -710,18 +710,10 @@ select { --tw-backdrop-sepia: ; } -.absolute { - position: absolute; -} - .relative { position: relative; } -.right-3 { - right: 0.75rem; -} - .mx-auto { margin-left: auto; margin-right: auto; @@ -735,18 +727,10 @@ select { display: block; } -.inline { - display: inline; -} - .flex { display: flex; } -.hidden { - display: none; -} - .h-full { height: 100%; } diff --git a/test.html b/test.html index 32bbd86..7784d13 100644 --- a/test.html +++ b/test.html @@ -5,22 +5,22 @@
- -
+ +
Must be a valid email address
- -
+ +
Passsword Incorrect
- -
+ +
Password must be at least 8 characters long and contain at least one uppercase letter, one lowercase letter and one digit
- -
+ +
Passwords do not match
- +
Invalid entry.