diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-04-29 02:43:42 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-04-29 02:43:42 +0000 |
commit | 4b2fc90431a6011ec0c7ce5318bb98c6133f91b8 (patch) | |
tree | 7591d4bcd9b11df924144d68cfd679328a515e24 | |
parent | 49b28fca68209097d87021849347c52d97904dbb (diff) | |
download | redmine-4b2fc90431a6011ec0c7ce5318bb98c6133f91b8.tar.gz redmine-4b2fc90431a6011ec0c7ce5318bb98c6133f91b8.zip |
view: remote_form_for: equals sign mandatory to print blocks and replace to form_for and use :remote => true and :as
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9571 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/issues/_relations.html.erb | 6 | ||||
-rw-r--r-- | app/views/projects/settings/_members.html.erb | 11 | ||||
-rw-r--r-- | app/views/repositories/_related_issues.html.erb | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/app/views/issues/_relations.html.erb b/app/views/issues/_relations.html.erb index 8eedf40d8..0b503fc6c 100644 --- a/app/views/issues/_relations.html.erb +++ b/app/views/issues/_relations.html.erb @@ -32,10 +32,12 @@ </form> <% end %> -<% remote_form_for(:relation, @relation, +<%= form_for @relation, { + :as => :relation, :remote => true, :url => {:controller => 'issue_relations', :action => 'create', :issue_id => @issue}, :method => :post, :complete => "Form.Element.focus('relation_issue_to_id');", - :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %> + :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')} + } do |f| %> <%= render :partial => 'issue_relations/form', :locals => {:f => f}%> <% end %> diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb index b5086d836..6bb07c69a 100644 --- a/app/views/projects/settings/_members.html.erb +++ b/app/views/projects/settings/_members.html.erb @@ -18,9 +18,10 @@ <td class="<%= member.principal.class.name.downcase %>"><%= link_to_user member.principal %></td> <td class="roles"> <span id="member-<%= member.id %>-roles"><%=h member.roles.sort.collect(&:to_s).join(', ') %></span> - <% remote_form_for(:membership, member, :url => membership_path(member), + <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member), :method => :put, - :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }) do |f| %> + :html => { :id => "member-#{member.id}-roles-form", :class => 'hol' }} + ) do |f| %> <p><% roles.each do |role| %> <label><%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role), :disabled => member.member_roles.detect {|mr| mr.role_id == role.id && !mr.inherited_from.nil?} %> <%=h role %></label><br /> @@ -59,9 +60,11 @@ <div class="splitcontentright"> <% if roles.any? && principals.any? %> - <% remote_form_for(:membership, @member, :url => project_memberships_path(@project), :method => :post, + <%= form_for(@member, {:as => :membership, :remote => true, + :url => project_memberships_path(@project), :method => :post, :loading => '$(\'member-add-submit\').disable();', - :complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();') do |f| %> + :complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();' + } ) do |f| %> <fieldset><legend><%=l(:label_member_new)%></legend> <p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p> diff --git a/app/views/repositories/_related_issues.html.erb b/app/views/repositories/_related_issues.html.erb index f1bb70320..a7aee5d39 100644 --- a/app/views/repositories/_related_issues.html.erb +++ b/app/views/repositories/_related_issues.html.erb @@ -24,7 +24,7 @@ </ul> <% if manage_allowed %> - <% remote_form_for(:issue, @issue, + <%= form_for(@issue, :as => :issue, :remote => true, :url => {:controller => 'repositories', :action => 'add_related_issue', :id => @project, :repository_id => @repository.identifier_param, :rev => @changeset.identifier}, |