changeset 610:e9274ba9c1b3 feature_36

Fixes Bug #272 - the toggle author button calls button_to_remote instead of button_to, which does not have a type="submit" tag. Minor interface changes.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 22 Aug 2011 12:32:02 +0100
parents 3221b2ab7804
children e918338dedfc
files vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb
diffstat 3 files changed, 17 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml	Fri Aug 19 16:45:59 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml	Mon Aug 22 12:32:02 2011 +0100
@@ -39,7 +39,7 @@
 	
   </div>
 
-  <%= button_to l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
+  <%= button_to_function l(:label_save_author), {}, { :onclick => "toggle_save_author(#{form_object_id(f.object_name)}); return false;", :id => form_tag_id( f.object_name, :edit_save_button )} %>
 
   <%= link_to_remove_fields l("remove_author"), f %>
 </div>
--- a/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Fri Aug 19 16:45:59 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Mon Aug 22 12:32:02 2011 +0100
@@ -1,29 +1,26 @@
 <%= f.error_messages %>  
-<p>
-  <b><%= f.text_field :title, :required => true, :size => 60 %></b>
-</p>
+
+<h3><%= f.text_field :title, :required => true, :size => 60 %></h3>
 
 <div class="splitcontentleft">
+  <h3><%= l(:authors) %></h3>    
+  <div class="box tabular">
+    <% f.fields_for :authorships do |builder| -%>
+      <%= render "authorship_fields", :f => builder %>
+    <%- end -%>
 
-    <h3><%= l(:authors) %></h3>    
-    <div class="box tabular">
-
-      <% f.fields_for :authorships do |builder| %>
-        <%= render "authorship_fields", :f => builder %>
-      <% end %>
-
-      <%= link_to_add_fields l(:label_add_another_author), f, :authorships %>
-    </div>
-
+    <%= link_to_add_fields l(:label_add_another_author), f, :authorships %>
+  </div>
 </div>
 
 <div class="splitcontentright">      
   <h3>Other Details</h3>
-<div class="box tabular">
-  <% f.fields_for :bibtex_entry do |builder| -%>
-    <%= render :partial => 'bibtex_fields', :locals => { :f => builder}  %>
-  <%- end -%>
-</div>
+  
+  <div class="box tabular">
+    <% f.fields_for :bibtex_entry do |builder| -%>
+      <%= render :partial => 'bibtex_fields', :locals => { :f => builder}  %>
+    <%- end -%>
+  </div>
 </div>
 
 
--- a/vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb	Fri Aug 19 16:45:59 2011 +0100
+++ b/vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb	Mon Aug 22 12:32:02 2011 +0100
@@ -6,6 +6,7 @@
 
 <% form_for @publication, :url => { :project_id  => @project_id, :action => :update }, :builder => TabularFormBuilder do |f| -%>
   <%= render :partial => 'form', :locals => { :f => f }  %>
+
   <div style="clear:both"></div>
   <%= f.submit %>
 <% end %>