|
| 1 | +{{if not .WorkflowDispatchConfig}} |
| 2 | + <div class="ui red info message tw-flex tw-justify-between tw-items-center"> |
| 3 | + <span class="ui text middle">{{ctx.Locale.Tr "actions.workflow.not_found" $.CurWorkflow}}</span> |
| 4 | + </div> |
| 5 | +{{else}} |
| 6 | + {{range $item := .WorkflowDispatchConfig.Inputs}} |
| 7 | + <div class="ui field {{if .Required}}required{{end}}"> |
| 8 | + {{if eq .Type "choice"}} |
| 9 | + <label>{{Iif .Description .Description .Name}}:</label> |
| 10 | + <select class="ui selection type dropdown" name="{{.Name}}"> |
| 11 | + {{range .Options}} |
| 12 | + <option value="{{.}}" {{if eq $item.Default .}}selected{{end}} >{{.}}</option> |
| 13 | + {{end}} |
| 14 | + </select> |
| 15 | + {{else if eq .Type "boolean"}} |
| 16 | + <div class="ui inline checkbox"> |
| 17 | + <label>{{Iif .Description .Description .Name}}</label> |
| 18 | + <input type="checkbox" name="{{.Name}}" {{if eq .Default "true"}}checked{{end}}> |
| 19 | + </div> |
| 20 | + {{else if eq .Type "number"}} |
| 21 | + <label>{{Iif .Description .Description .Name}}:</label> |
| 22 | + <input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}> |
| 23 | + {{else}} |
| 24 | + <label>{{Iif .Description .Description .Name}}:</label> |
| 25 | + <input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}> |
| 26 | + {{end}} |
| 27 | + </div> |
| 28 | + {{end}} |
| 29 | + <button class="ui tiny primary button" type="submit">Submit</button> |
| 30 | +{{end}} |
1 | 31 | {{range .workflows}} |
2 | 32 | {{if and .ErrMsg (eq .Entry.Name $.CurWorkflow)}} |
3 | 33 | <span data-tooltip-content="{{.ErrMsg}}"> |
4 | 34 | {{svg "octicon-alert" 16 "text red"}} |
5 | 35 | </span> |
6 | 36 | {{end}} |
7 | 37 | {{end}} |
8 | | -{{range $item := .WorkflowDispatchConfig.Inputs}} |
9 | | -<div class="ui field {{if .Required}}required{{end}}"> |
10 | | - {{if eq .Type "choice"}} |
11 | | - <label>{{Iif .Description .Description .Name}}:</label> |
12 | | - <select class="ui selection type dropdown" name="{{.Name}}"> |
13 | | - {{range .Options}} |
14 | | - <option value="{{.}}" {{if eq $item.Default .}}selected{{end}} >{{.}}</option> |
15 | | - {{end}} |
16 | | - </select> |
17 | | - {{else if eq .Type "boolean"}} |
18 | | - <div class="ui inline checkbox"> |
19 | | - <label>{{Iif .Description .Description .Name}}</label> |
20 | | - <input type="checkbox" name="{{.Name}}" {{if eq .Default "true"}}checked{{end}}> |
21 | | - </div> |
22 | | - {{else if eq .Type "number"}} |
23 | | - <label>{{Iif .Description .Description .Name}}:</label> |
24 | | - <input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}> |
25 | | - {{else}} |
26 | | - <label>{{Iif .Description .Description .Name}}:</label> |
27 | | - <input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}> |
28 | | - {{end}} |
29 | | -</div> |
30 | | -{{end}} |
|
0 commit comments