@@ -43,16 +43,17 @@ templ RuleFormCreate(props RuleFormCreateProps) {
43
43
})
44
44
</label >
45
45
</div >
46
- <div class =" form-control" >
47
- <label class =" label" >
48
- <span class =" label-text" >Endpoints</span >
49
- </label >
50
- <select name =" endpoints" class =" select select-bordered" multiple >
51
- for i , end := range props.Endpoints {
52
- <option value ={ strconv.FormatInt (end.ID , 10 ) } selected ?={ props.EndpointsSelections [i] }>{ end.Name }</option >
53
- }
54
- </select >
55
- </div >
46
+ <fieldset >
47
+ <legend >Endpoints</legend >
48
+ for i , end := range props.Endpoints {
49
+ <div class =" form-control" >
50
+ <label class =" cursor-pointer label" >
51
+ <span class =" label-text" >{ end.Name }</span >
52
+ <input type =" checkbox" class =" toggle" name =" endpoints" value ={ strconv.FormatInt (end.ID , 10 ) } checked ?={ props.EndpointsSelections [i] } />
53
+ </label >
54
+ </div >
55
+ }
56
+ </fieldset >
56
57
<button type =" submit" class =" btn btn-primary btn-block" >Create Rule</button >
57
58
if props.Flash != nil {
58
59
{! props.Flash }
@@ -95,16 +96,17 @@ templ RuleFormUpdate(props RuleFormUpdateProps) {
95
96
@ RuleExpressionCheckLabel (RuleExpressionLabelProps{Error: props.ExpressionError })
96
97
</label >
97
98
</div >
98
- <div class =" form-control" >
99
- <label class =" label" >
100
- <span class =" label-text" >Endpoints</span >
101
- </label >
102
- <select disabled ?={ props.Rule .Internal } name =" endpoints" class =" select select-bordered" multiple >
99
+ <fieldset >
100
+ <legend class =" label-text" >Endpoints</legend >
103
101
for i , end := range props.Endpoints {
104
- <option value ={ strconv.FormatInt (end.ID , 10 ) } selected ?={ props.EndpointsSelections [i] }>{ end.Name }</option >
102
+ <div class =" form-control" >
103
+ <label class =" cursor-pointer label" >
104
+ <span class =" label-text" >{ end.Name }</span >
105
+ <input disabled ?={ props.Rule .Internal } type =" checkbox" class =" toggle" name =" endpoints" value ={ strconv.FormatInt (end.ID , 10 ) } checked ?={ props.EndpointsSelections [i] } />
106
+ </label >
107
+ </div >
105
108
}
106
- </select >
107
- </div >
109
+ </fieldset >
108
110
<button disabled ?={ props.Rule .Internal } type =" submit" class =" btn btn-primary btn-block" >Update Rule</button >
109
111
if props.Flash != nil {
110
112
{! props.Flash }
0 commit comments