# HG changeset patch # User luisf # Date 1314012722 -3600 # Node ID e9274ba9c1b3a8185cef50aeb270b28d48e691b0 # Parent 3221b2ab780474243f25f77c08b274614f97bba0 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. diff -r 3221b2ab7804 -r e9274ba9c1b3 vendor/plugins/redmine_bibliography/app/views/publications/_authorship_fields.rhtml --- 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 @@ - <%= 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 %> diff -r 3221b2ab7804 -r e9274ba9c1b3 vendor/plugins/redmine_bibliography/app/views/publications/_form.html.erb --- 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 %> -

- <%= f.text_field :title, :required => true, :size => 60 %> -

+ +

<%= f.text_field :title, :required => true, :size => 60 %>

+

<%= l(:authors) %>

+
+ <% f.fields_for :authorships do |builder| -%> + <%= render "authorship_fields", :f => builder %> + <%- end -%> -

<%= l(:authors) %>

-
- - <% f.fields_for :authorships do |builder| %> - <%= render "authorship_fields", :f => builder %> - <% end %> - - <%= link_to_add_fields l(:label_add_another_author), f, :authorships %> -
- + <%= link_to_add_fields l(:label_add_another_author), f, :authorships %> +

Other Details

-
- <% f.fields_for :bibtex_entry do |builder| -%> - <%= render :partial => 'bibtex_fields', :locals => { :f => builder} %> - <%- end -%> -
+ +
+ <% f.fields_for :bibtex_entry do |builder| -%> + <%= render :partial => 'bibtex_fields', :locals => { :f => builder} %> + <%- end -%> +
diff -r 3221b2ab7804 -r e9274ba9c1b3 vendor/plugins/redmine_bibliography/app/views/publications/edit.html.erb --- 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 } %> +
<%= f.submit %> <% end %>