Skip to content

Commit

Permalink
调整 WorkflowDispatch输入框显示字段
Browse files Browse the repository at this point in the history
  • Loading branch information
TKaxv-7S committed Dec 18, 2023
1 parent 188ad05 commit 8fafdf6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions templates/repo/actions/workflow_dispatch.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,23 @@
{{ $item := $val.Value }}
<div class="ui field {{if $item.Required}}required{{end}}">
{{if eq $item.Type "choice"}}
<label>{{$key}} :</label>
<label title="Input: {{$key}}">{{$item.Description}} :</label>
<select class="ui fluid dropdown" name="{{$key}}">
{{range $item.Options}}
<option value="{{.}}" {{if eq $item.Default .}}selected{{end}} >{{.}}</option>
{{end}}
</select>
<span class="help">{{$item.Description}}</span>
{{else if eq $item.Type "boolean"}}
<div class="ui inline toggle checkbox">
<label>{{$key}}</label>
<label title="Input: {{$key}}">{{$item.Description}}</label>
<input type="checkbox" name="{{$key}}" {{if eq $item.Default "true"}}checked{{end}}>
<span class="help">{{$item.Description}}</span>
</div>
{{else if eq $item.Type "number"}}
<label>{{$key}} :</label>
<label title="Input: {{$key}}">{{$item.Description}} :</label>
<input name="{{$key}}" value="{{$item.Default}}" {{if $item.Required}}required{{end}}>
<span class="help">{{$item.Description}}</span>
{{else}}
<label>{{$key}} :</label>
<label title="Input: {{$key}}">{{$item.Description}} :</label>
<input name="{{$key}}" value="{{$item.Default}}" {{if $item.Required}}required{{end}}>
<span class="help">{{$item.Description}}</span>
{{end}}
</div>
{{end}}
Expand Down

0 comments on commit 8fafdf6

Please sign in to comment.