Sha256: 47ad4cdf3fcd880d273e64d1418b086a83faf48345cdce3a265cac9719b5003a
Contents?: true
Size: 1009 Bytes
Versions: 29
Compression:
Stored size: 1009 Bytes
Contents
<h1>New Source</h1> <form action='/admin/block-type-sources' method='post' id='new_source_form'> <input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' /> <p><input type='text' id='name' name='name' placeholder='Name' /></p> <div id='message'></div> <p> <input type='button' value='< Back' onclick="window.location='/admin/block-type-sources';" /> <input type='button' value='Add Source' onclick="add_block_type_source();" /> </p> </form> <% content_for :caboose_js do %> <script type='text/javascript'> function add_block_type_source() { $('#message').empty().append($('<p/>').addClass('loading').html('Adding source...')); $.ajax({ url: '/admin/block-type-sources', type: 'post', data: $('#new_source_form').serialize(), success: function(resp) { if (resp.error) $('#message').empty().append($('<p/>').addClass('note error').html(resp.error)); if (resp.redirect) window.location = resp.redirect; } }); } </script> <% end %>
Version data entries
29 entries across 29 versions & 1 rubygems