changeset 1422:c97b3b9b5c86 biblio_alt_search_auth

changed form_builder - labelled_form_for was not generating validad HTML5 markup.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 02 Oct 2013 16:44:26 +0100
parents 69d32b831d2b
children 40e82f170353
files plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb plugins/redmine_bibliography/app/views/publications/_form.html.erb plugins/redmine_bibliography/app/views/publications/new.html.erb
diffstat 4 files changed, 32 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb	Wed Oct 02 12:23:05 2013 +0100
+++ b/plugins/redmine_bibliography/app/views/publications/_authorship_fields.html.erb	Wed Oct 02 16:44:26 2013 +0100
@@ -1,9 +1,9 @@
 <div id="authors" class="fields">
   <div class="author_edit" id="<%= form_tag_id( f.object_name, :edit_author_info ) %>">
 
-    <p><%= f.text_field :name_on_paper, :class => "author_name_on_paper" -%></p>
-    <p><%= f.text_field :institution -%></p>
-    <p><%= f.text_field :email -%></p>
+    <p><%= f.label :name_on_paper %><%= f.text_field :name_on_paper, :class => "author_name_on_paper" -%></p>
+    <p><%= f.label :institution %><%= f.text_field :institution -%></p>
+    <p><%= f.label :email %><%= f.text_field :email -%></p>
 
     <p class="author_associated search_author_tie">
       <%= f.check_box :search_author_tie, :label => '' -%>
--- a/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb	Wed Oct 02 12:23:05 2013 +0100
+++ b/plugins/redmine_bibliography/app/views/publications/_bibtex_fields.html.erb	Wed Oct 02 16:44:26 2013 +0100
@@ -1,5 +1,5 @@
 <p>
-  <label for="bibtex_entry_type"><%=l("field_entry_type")%> <span class="required">*</span></label>
+  <label for="publication_bibtex_entry_attributes_entry_type"><%=l("field_entry_type")%> <span class="required">*</span></label>
 	<%= f.collection_select :entry_type,
 	        BibtexEntryType.find(:all).reject { |x| x.redundant? },
 	        :id,
@@ -8,71 +8,71 @@
 </p>
 
 <p class="bibtex hol">
-  <%= f.text_field :year, :size => 4 %>
+  <%= f.label :year %><%= f.text_field :year -%>
 </p>
 <p class="bibtex hol">
-  <%= f.text_field :month, :size => 4%>
+  <%= f.label :month %><%= f.text_field :month, :size => 4%>
 </p>
 <p class="bibtex hol">
-  <%= f.text_field :chapter, :size => 15%>
+  <%= f.label :chapter %><%= f.text_field :chapter, :size => 15%>
 </p>
 <p class="bibtex hol">
-  <%= f.text_field :editor, :size => 33  %>
+  <%= f.label :editor %><%= f.text_field :editor, :size => 33  %>
 </p>
 <p class="bibtex hol">
-  <%= f.text_field :booktitle, :size => 33  %>
+  <%= f.label :booktitle %><%= f.text_field :booktitle, :size => 33  %>
 </p>
 <p class="bibtex hol">
-  <%= f.text_field :publisher,:size => 33  %>
+  <%= f.label :publisher %><%= f.text_field :publisher,:size => 33  %>
 </p>
 <p class="bibtex hol">
-  <%= f.text_field :pages, :size => 12 %>
+  <%= f.label :pages %><%= f.text_field :pages, :size => 12 %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :address %>
+ <%= f.label :address %><%= f.text_field :address %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :annote %>
+ <%= f.label :annote %><%= f.text_field :annote %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :crossref %>
+ <%= f.label :crossref %><%= f.text_field :crossref %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :edition %>
+ <%= f.label :edition %><%= f.text_field :edition %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :eprint %>
+ <%= f.label :eprint %><%= f.text_field :eprint %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :howpublished %>
+ <%= f.label :howpublished %><%= f.text_field :howpublished %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :journal %>
+ <%= f.label :journal %><%= f.text_field :journal %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :key %>
+ <%= f.label :key %><%= f.text_field :key %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :note %>
+ <%= f.label :note %><%= f.text_field :note %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :number %>
+ <%= f.label :number %><%= f.text_field :number %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :organization %>
+ <%= f.label :organization %><%= f.text_field :organization %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :school %>
+ <%= f.label :school %><%= f.text_field :school %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :series %>
+ <%= f.label :series %><%= f.text_field :series %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :type %>
+ <%= f.label :type %><%= f.text_field :type %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :url %>
+ <%= f.label :url %><%= f.text_field :url %>
 </p>
 <p class="bibtex hol">
- <%= f.text_field :volume %>
+ <%= f.label :volume %><%= f.text_field :volume %>
 </p>
\ No newline at end of file
--- a/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Wed Oct 02 12:23:05 2013 +0100
+++ b/plugins/redmine_bibliography/app/views/publications/_form.html.erb	Wed Oct 02 16:44:26 2013 +0100
@@ -1,4 +1,4 @@
-<h3><%= f.text_field :title, :required => true, :size => 70 %></h3>
+<h3><%= f.label :title %>&nbsp;<span class="required">*</span>&nbsp;<%= f.text_field :title, :required => true, :size => 70 %></h3>
 
 <div class="splitcontentleft">
   <h3><%= l(:label_publication_other_details) %></h3>
@@ -8,12 +8,12 @@
     <%- end -%>
 
     <p>
-      <%= f.text_field :external_url, :size => 70 %>
+      <%= f.label :external_url %><%= f.text_field :external_url -%>
       <br />
-      <em><%= l(:text_external_url) %></em>
+      <em><%= l(:text_external_url) -%></em>
     </p>
     <p>
-      <%= f.text_field :doi, :size => 70 %>
+      <%= f.label :doi %><%= f.text_field :doi -%>
       <br />
       <em><%= l(:text_doi) %></em>
     </p>
--- a/plugins/redmine_bibliography/app/views/publications/new.html.erb	Wed Oct 02 12:23:05 2013 +0100
+++ b/plugins/redmine_bibliography/app/views/publications/new.html.erb	Wed Oct 02 16:44:26 2013 +0100
@@ -26,7 +26,7 @@
 
 <h2><%=l(:label_publication_new)%></h2>
 
-<%= labelled_form_for @publication, :url => { :project_id  => @project, :action => :create } do |f| -%>
+<%= form_for @publication, :url => { :project_id  => @project, :action => :create } do |f| -%>
 
     <%= render :partial => 'form', :locals => { :f => f }  %>