File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
templates/repo/settings/webhook Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ type Form struct {
4646 Type string `yaml:"type"`
4747 Required bool `yaml:"required"`
4848 Default string `yaml:"default"`
49+ Pattern string `yaml:"pattern"`
4950}
5051
5152// InputType returns the HTML input type of a Form.Type
Original file line number Diff line number Diff line change 1010 {{range .CustomHook.Form}}
1111 <div class="field {{if .Required}}required{{end}} {{if ne (index $ (printf "Err_%s" .ID)) nil}}error{{end}}">
1212 <label for="{{.ID}}">{{.Label}}</label>
13- <input id="{{.ID}}" name="{{.ID}}" type="{{.InputType}}" value="{{if eq .InputType "checkbox"}}true{{else}}{{index $ (printf "CustomHook_%s" .ID)}}{{end}}" {{if and (eq .InputType "checkbox") (eq (printf "%v" (index $ (printf "CustomHook_%s" .ID))) "true")}}checked{{end}} {{if .Default}}placeholder="{{.Default}}" {{end}} {{if .Required}}required{{end}}>
13+ <input
14+ id="{{.ID}}"
15+ name="{{.ID}}"
16+ type="{{.InputType}}"
17+ value="{{if eq .InputType "checkbox"}}true{{else}}{{index $ (printf "CustomHook_%s" .ID)}}{{end}}"
18+ {{if and (eq .InputType "checkbox") (eq (printf "%v" (index $ (printf "CustomHook_%s" .ID))) "true")}}checked{{end}}
19+ {{if .Default}}placeholder="{{.Default}}" {{end}}
20+ {{if .Pattern}}pattern="{{.Pattern}}"{{end}}
21+ {{if .Required}}required{{end}}
22+ >
1423 </div>
1524 {{end}}
1625 <div class="field {{if .Err_Secret}}error{{end}}">
You can’t perform that action at this time.
0 commit comments