|
1 | 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> |
| 2 | + <div class="ui red message"> |
| 3 | + {{/* TODO: Technically this error is also shown if no workflow_dispatch is defined. However we need to know if the workflow exist like in #33098 (comment) to render a different error text. |
| 4 | + A: does the newly added "CurWorkflowExists" help? */}} |
| 5 | + {{ctx.Locale.Tr "actions.workflow.not_found" $.CurWorkflow}} |
4 | 6 | </div> |
5 | 7 | {{else}} |
6 | 8 | {{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> |
| 9 | + <div class="ui field {{if .Required}}required{{end}}"> |
| 10 | + {{if eq .Type "choice"}} |
| 11 | + <label>{{or .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>{{or .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>{{or .Description .Name}}:</label> |
| 24 | + <input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}> |
| 25 | + {{else}} |
| 26 | + <label>{{or .Description .Name}}:</label> |
| 27 | + <input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}> |
| 28 | + {{end}} |
| 29 | + </div> |
28 | 30 | {{end}} |
29 | | - <button class="ui tiny primary button" type="submit">Submit</button> |
| 31 | + <div class="ui field"> |
| 32 | + <button class="ui tiny primary button" type="submit">Submit</button> |
| 33 | + </div> |
30 | 34 | {{end}} |
31 | 35 | {{range .workflows}} |
32 | 36 | {{if and .ErrMsg (eq .Entry.Name $.CurWorkflow)}} |
33 | | - <span data-tooltip-content="{{.ErrMsg}}"> |
34 | | - {{svg "octicon-alert" 16 "text red"}} |
35 | | - </span> |
| 37 | + <div class="ui field"> |
| 38 | + <div>{{svg "octicon-alert" 16 "text red"}} {{.ErrMsg}}</div> |
| 39 | + </div> |
36 | 40 | {{end}} |
37 | 41 | {{end}} |
0 commit comments