diff options
author | Lauris BH <lauris@nix.lv> | 2017-05-02 03:49:55 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-02 08:49:55 +0800 |
commit | 0144817971012bed2b00784064c37b1e7e5acff3 (patch) | |
tree | c1a6a95b1a1958901367c50031dcee5e85589872 /templates/repo/editor | |
parent | 3ebbdfaa757e1299b3a495c8fc711d574c0d278f (diff) | |
download | gitea-0144817971012bed2b00784064c37b1e7e5acff3.tar.gz gitea-0144817971012bed2b00784064c37b1e7e5acff3.zip |
Do not allow commiting to protected branch from online editor (#1502)
* Do not allow commiting to protected branch from online editor
* Add editor integration tests for adding new file and not allowing to add new file to protected branch
Diffstat (limited to 'templates/repo/editor')
-rw-r--r-- | templates/repo/editor/commit_form.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl index 96b0dcbd3d..43021ca59a 100644 --- a/templates/repo/editor/commit_form.tmpl +++ b/templates/repo/editor/commit_form.tmpl @@ -10,7 +10,7 @@ </div> <div class="quick-pull-choice js-quick-pull-choice"> <div class="field"> - <div class="ui radio checkbox"> + <div class="ui radio checkbox {{if not .CanCommitToBranch}}disabled{{end}}"> <input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="direct" {{if eq .commit_choice "direct"}}checked{{end}}> <label> <i class="octicon octicon-git-commit" height="16" width="14"></i> @@ -40,4 +40,4 @@ {{.i18n.Tr "repo.editor.commit_changes"}} </button> <a class="ui button red" href="{{EscapePound $.BranchLink}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.editor.cancel"}}</a> -</div>
\ No newline at end of file +</div> |