Support choose email when creating a commit via web UI (#33432)
Initial PR for #24469
This commit is contained in:
parent
ac2d97cb61
commit
256b94e9e9
19 changed files with 356 additions and 182 deletions
|
@ -66,6 +66,16 @@
|
|||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if and .CommitCandidateEmails (gt (len .CommitCandidateEmails) 1)}}
|
||||
<div class="field {{if .Err_CommitEmail}}error{{end}}">
|
||||
<label>{{ctx.Locale.Tr "repo.editor.commit_email"}}</label>
|
||||
<select class="ui selection dropdown" name="commit_email">
|
||||
{{- range $email := .CommitCandidateEmails -}}
|
||||
<option {{if eq $email $.CommitDefaultEmail}}selected{{end}} value="{{$email}}">{{$email}}</option>
|
||||
{{- end -}}
|
||||
</select>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<button id="commit-button" type="submit" class="ui primary button">
|
||||
{{if eq .commit_choice "commit-to-new-branch"}}{{ctx.Locale.Tr "repo.editor.propose_file_change"}}{{else}}{{ctx.Locale.Tr "repo.editor.commit_changes"}}{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue