Browse Source

* comments form

master
Alex 'AdUser' Z 9 years ago
parent
commit
bdc246710a
  1. 2
      public/theme/js/main.js
  2. 2
      templates/comments/new.html.ep

2
public/theme/js/main.js

@ -24,7 +24,7 @@ $(document).ready(function() {
e.preventDefault(); e.preventDefault();
$.post('/comments/add', $(this).serialize()) $.post('/comments/add', $(this).serialize())
.done(function(data) { location.reload(); }) .done(function(data) { location.reload(); })
.fail(function(data) { $('#comments #resp').val(data); }); .fail(function(data) { $('#comments #resp').html(data.responseText); });
}); // form submit }); // form submit
}); // on form load }); // on form load
}); // #cadd click }); // #cadd click

2
templates/comments/new.html.ep

@ -4,6 +4,6 @@
<hr/> <hr/>
<textarea name="text"></textarea> <textarea name="text"></textarea>
<br/> <br/>
<input type="submit" value="<%= l('Add') %>"> <input type="submit" value="<%= l('Add') %>">&nbsp;
<span id="resp" style="color: red"></span> <span id="resp" style="color: red"></span>
</form> </form>

Loading…
Cancel
Save