Enable commit button only if something has changed

This commit is contained in:
bytedream committed 2025-05-08 12:28:18 +02:00
1 parent 9811c28627
commit 3ad1e7e215
2 files changed
+25 -24

No files matched your search

+1 -1
View File
@@ -77,7 +77,7 @@
</div>
{{end}}
</div>
<button id="commit-button" type="submit" class="ui primary button">
<button id="commit-button" type="submit" class="ui primary button" {{if .PageIsEdit}}disabled{{end}}>
{{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}}
</button>
<a class="ui button red" href="{{if .ReturnURI}}{{.ReturnURI}}{{else}}{{$.BranchLink}}/{{PathEscapeSegments .TreePath}}{{end}}">{{ctx.Locale.Tr "repo.editor.cancel"}}</a>