]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/templates/notes/new.jst.ejs
Disable "Add Note" button when there is no text
[rails.git] / app / assets / javascripts / templates / notes / new.jst.ejs
index 9c82a60a4220c51065623512f891bd90e3aeda29..2f12227fd23f9e04b6c0ef9ae853bcf88f250c4c 100644 (file)
@@ -1,11 +1,12 @@
-<p>
-  <%- I18n.t('javascripts.notes.new.intro_1') %><br/>
-  <%- I18n.t('javascripts.notes.new.intro_2') %>
-</p>
-<form action="#">
-  <input type="hidden" name="lon">
-  <input type="hidden" name="lat">
-  <textarea name="comment" cols="40" rows="10"></textarea>
-  <br/>
-  <input type="submit" name="add" value="<%- I18n.t('javascripts.notes.new.add') %>" id="note-add">
-</form>
+<div class="note">
+  <p><%- I18n.t('javascripts.notes.new.intro') %></p>
+  <form action="#">
+    <input type="hidden" name="lon">
+    <input type="hidden" name="lat">
+    <textarea class="comment" name="text" cols="40" rows="10"></textarea>
+    <br/>
+    <div class="buttons">
+      <input type="submit" name="add" value="<%- I18n.t('javascripts.notes.new.add') %>" data-url="<%- create_url %>" disabled="1">
+    </div>
+  </form>
+</div>