Skip to content

Commit bd5624f

Browse files
authored
Merge pull request #759 from mathprod/fix-redmine-4.x
Fix repository settings form template to work with redmine 4.x
2 parents 8731251 + 68d2abc commit bd5624f

File tree

12 files changed

+14
-0
lines changed

12 files changed

+14
-0
lines changed

Diff for: app/controllers/redmine_git_hosting_controller.rb

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ def render_with_api
5454
def render_js_redirect
5555
respond_to do |format|
5656
format.js { render js: "window.location = #{success_url.to_json};" }
57+
format.html do
58+
redirect_to success_url
59+
end
5760
end
5861
end
5962

Diff for: app/views/repository_deployment_credentials/edit.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_deployment_credential, @credential,
22
url: repository_deployment_credential_path(@repository, @credential),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :put, class: 'tabular', remote: true } do |f|
45

56
.flash-messages = error_messages_for 'credential'

Diff for: app/views/repository_deployment_credentials/new.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_deployment_credential, @credential,
22
url: repository_deployment_credentials_path(@repository),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :post, class: 'tabular', remote: true } do |f|
45

56
.flash-messages= error_messages_for 'credential'

Diff for: app/views/repository_git_config_keys/edit.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_git_config_key, @git_config_key,
22
url: repository_git_config_key_path(@repository, @git_config_key),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :put, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }

Diff for: app/views/repository_git_config_keys/new.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_git_config_key, @git_config_key,
22
url: repository_git_config_keys_path(@repository),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :post, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }

Diff for: app/views/repository_git_extras/move.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ h2 = l(:label_move_repository, repo_name: @repository.gitolite_repository_name)
33
.box
44
= labelled_form_for :repository_mover, @move_repository_form,
55
url: move_repository_git_extras_path(@repository),
6+
authenticity_token: form_authenticity_token,
67
html: { method: :post, class: 'tabular', data: { confirm: l(:text_are_you_sure) } } do |f|
78

89
.flash-messages = error_messages_for 'move_repository_form'

Diff for: app/views/repository_mirrors/edit.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_mirror, @mirror,
22
url: repository_mirror_path(@repository, @mirror),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :put, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }

Diff for: app/views/repository_mirrors/new.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_mirror, @mirror,
22
url: repository_mirrors_path(@repository),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :post, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }
+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_post_receive_url, @post_receive_url,
22
url: repository_post_receive_url_path(@repository, @post_receive_url),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :put, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }

Diff for: app/views/repository_post_receive_urls/new.html.slim

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_post_receive_url, @post_receive_url,
22
url: repository_post_receive_urls_path(@repository),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :post, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }
+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_protected_branche, @protected_branch,
22
url: repository_protected_branch_path(@repository, @protected_branch),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :put, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }
+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
= labelled_form_for :repository_protected_branche, @protected_branch,
22
url: repository_protected_branches_path(@repository),
3+
authenticity_token: form_authenticity_token,
34
html: { method: :post, class: 'tabular', remote: true } do |f|
45

56
= render partial: 'form', locals: { f: f }

0 commit comments

Comments
 (0)