]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/notes/new.html.erb
Use resourceful routes for user new/create actions
[rails.git] / app / views / notes / new.html.erb
index 7b3b807e3322da84b21e972daecd7b00d5cd96c4..4ae4a995da658be5da60b7053c2d02f509bc1228 100644 (file)
@@ -3,15 +3,21 @@
 <%= render "sidebar_header", :title => t(".title") %>
 
 <div class="note">
-  <p class="alert alert-info"><%= t("javascripts.notes.new.intro") %></p>
+  <p class="alert alert-info"><%= t(".intro") %></p>
+  <% if !current_user %>
+    <p class="alert alert-warning"><%= t ".anonymous_warning_html",
+                                         :log_in => link_to(t(".anonymous_warning_log_in"), login_path(:referer => new_note_path)),
+                                         :sign_up => link_to(t(".anonymous_warning_sign_up"), new_user_path) %></p>
+  <% end %>
+  <p class="alert alert-warning" id="new-note-zoom-warning" hidden><%= t "javascripts.site.createnote_disabled_tooltip" %></p>
   <form action="#">
     <input type="hidden" name="lon" autocomplete="off">
     <input type="hidden" name="lat" autocomplete="off">
     <div class="mb-3">
-      <textarea class="form-control" name="text" cols="40" rows="10" maxlength="2000" placeholder="<%= t("javascripts.notes.new.advice") %>"></textarea>
+      <textarea class="form-control" name="text" cols="40" rows="10" maxlength="2000" placeholder="<%= t(".advice") %>"></textarea>
     </div>
-    <div class="btn-wrapper">
-      <input type="submit" name="add" value="<%= t("javascripts.notes.new.add") %>" disabled="1" class="btn btn-primary">
+    <div>
+      <input type="submit" name="add" value="<%= t(".add") %>" disabled="1" class="btn btn-primary">
     </div>
   </form>
 </div>