]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/diary_entry/edit.html.erb
Fix rubocop warnings
[rails.git] / app / views / diary_entry / edit.html.erb
index af23262d52310fe437bf4ffc604a289f2562b0c5..f29dc30ffec2edce53a397ad78d0a51237c712bb 100644 (file)
     <fieldset>
       <div class='form-row'>
         <label class="standard-label"><%= t 'diary_entry.edit.subject' -%></label>
-        <%= f.text_field :title %>
+        <%= f.text_field :title, :class => "richtext_title" %>
       </div>
       <div class='form-row'>
         <label class="standard-label"><%= t 'diary_entry.edit.body' -%></label>
         <%= richtext_area :diary_entry, :body, :cols => 80, :rows => 20, :format => @diary_entry.body_format %>
       </div>
-      <div clas='form-row'>
+      <div class='form-row'>
         <label class="standard-label"><%= t 'diary_entry.edit.language' -%></label>
         <%= f.collection_select :language_code, Language.order(:english_name), :code, :name %>
     </div>
       </div>
     </fieldset>
 
-    <%= submit_tag t('diary_entry.edit.save_button') %>
-    <%# TODO: button should say 'publish' or 'save changes' depending on new/edit state %>
+    <% if action_name == 'new' %>
+      <%= submit_tag t('diary_entry.new.publish_button') %>
+    <% else %>
+      <%= submit_tag t('diary_entry.edit.save_button') %>
+    <% end %>
   </div>
 <% end %>