]> source.dussan.org Git - redmine.git/commitdiff
view: remote_form_for: equals sign mandatory to print blocks and replace to form_for...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 29 Apr 2012 02:43:42 +0000 (02:43 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 29 Apr 2012 02:43:42 +0000 (02:43 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9571 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/issues/_relations.html.erb
app/views/projects/settings/_members.html.erb
app/views/repositories/_related_issues.html.erb

index 8eedf40d8caa7d1c0d1f4ff6930ef86c1612d14e..0b503fc6cedd0c29dc84d56f04361c5569329e8b 100644 (file)
 </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 %>
index b5086d8368462776dc7b4d09c9b1de8d61106f70..6bb07c69a9f40e86bd4d380b200619327408f34e 100644 (file)
   <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 />
 
 <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>
index f1bb70320975357048926f22ea76cbb551c694d8..a7aee5d392a43dd217d63331d8394561e59bd575 100644 (file)
@@ -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},