snapshot of https://github.com/go-gitea/gitea.git (main, 2026-09-15; blobs > 131072B omitted)
Some checks failed
cache-seeder / prune (push) Has been skipped
cache-seeder / frontend (push) Failing after 3s
cache-seeder / python (push) Failing after 3s
cache-seeder / gobuild (push) Failing after 4s
cache-seeder / lint (bindata, lint-backend) (push) Failing after 3s
giteabot backport / giteabot (push) Has been skipped
giteabot / giteabot (push) Has been skipped
cache-prune / prune (push) Has been skipped
release-nightly-snapcraft / build-and-publish (ubuntu-24.04) (push) Has been cancelled
release-nightly-snapcraft / build-and-publish (ubuntu-24.04-arm) (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-renovate / cron-renovate (push) Has been skipped
Some checks failed
cache-seeder / prune (push) Has been skipped
cache-seeder / frontend (push) Failing after 3s
cache-seeder / python (push) Failing after 3s
cache-seeder / gobuild (push) Failing after 4s
cache-seeder / lint (bindata, lint-backend) (push) Failing after 3s
giteabot backport / giteabot (push) Has been skipped
giteabot / giteabot (push) Has been skipped
cache-prune / prune (push) Has been skipped
release-nightly-snapcraft / build-and-publish (ubuntu-24.04) (push) Has been cancelled
release-nightly-snapcraft / build-and-publish (ubuntu-24.04-arm) (push) Has been cancelled
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-container (push) Has been cancelled
cron-renovate / cron-renovate (push) Has been skipped
This commit is contained in:
46
templates/repo/actions/workflow_dispatch_inputs.tmpl
Normal file
46
templates/repo/actions/workflow_dispatch_inputs.tmpl
Normal file
@@ -0,0 +1,46 @@
|
||||
<div id="runWorkflowDispatchModalInputs">
|
||||
{{if not .WorkflowDispatchConfig}}
|
||||
<div class="ui error message tw-block">{{/* using "ui message" in "ui form" needs to force to display */}}
|
||||
{{if not .CurWorkflowExists}}
|
||||
{{ctx.Locale.Tr "actions.workflow.not_found" $.CurWorkflow}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "actions.workflow.has_no_workflow_dispatch" $.CurWorkflow}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{range $item := .WorkflowDispatchConfig.Inputs}}
|
||||
<div class="ui field {{if .Required}}required{{end}}">
|
||||
{{if eq .Type "choice"}}
|
||||
<label>{{or .Description .Name}}:</label>
|
||||
<select class="ui search selection dropdown" name="{{.Name}}">
|
||||
{{range .Options}}
|
||||
<option value="{{.}}" {{if eq $item.Default .}}selected{{end}}>{{.}}</option>
|
||||
{{end}}
|
||||
</select>
|
||||
{{else if eq .Type "boolean"}}
|
||||
<label class="tw-flex flex-text-inline">
|
||||
<input type="checkbox" name="{{.Name}}" {{if .IsDefaultTrue}}checked{{end}}>
|
||||
{{or .Description .Name}}
|
||||
</label>
|
||||
{{else if eq .Type "number"}}
|
||||
<label>{{or .Description .Name}}:</label>
|
||||
<input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}>
|
||||
{{else}}
|
||||
<label>{{or .Description .Name}}:</label>
|
||||
<input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="ui field">
|
||||
{{/* use autofocus here to prevent the "branch selection" dropdown from getting focus, otherwise it will auto popup */}}
|
||||
<button class="ui tiny primary button" autofocus type="submit">{{ctx.Locale.Tr "actions.workflow.run"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
{{range .workflows}}
|
||||
{{if and .ErrMsg (eq .EntryName $.CurWorkflow)}}
|
||||
<div class="ui field">
|
||||
<div>{{svg "octicon-alert" 16 "tw-text-red"}} {{.ErrMsg}}</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user