Sha256: 2cca579b8f3b9544dba366acca62172a897e7bd7644e5be11098e30149b88542
Contents?: true
Size: 1.7 KB
Versions: 89
Compression:
Stored size: 1.7 KB
Contents
<h1>New Custom Commercial Property</h1> <% content_for :caboose_css do %> <style type='text/css'> #search_form_wrapper { margin-bottom: 10px; position: absolute; top:0; right: 0; } </style> <% end %> <form action='/admin/commercial' method='post' id='commercial_form'> <input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' /> <p>Office: <select name='lo_code'> <option value=''>-- Select an office --</option> <% @offices.each do |office| %> <option value="<%= office.lo_code %>"><%= office.lo_name %></option> <% end %> </select> </p> <p>Agent: <select name='la_code'> <option value=''>-- Select an agent --</option> <% @agents.each do |agent| %> <option value="<%= agent.la_code %>"><%= agent.first_name %> <%= agent.last_name %></option> <% end %> </select> </p> <div id='message'></div> <p> <input type='button' value='< Back' onclick="window.location='/admin/commercial';" /> <input type='submit' value='Add Property' onclick='add_commercial_property(); return false;' /> </p> </form> <% content_for :caboose_js do %> <script type='text/javascript'> function add_commercial_property() { modal.autosize("<p class='loading'>Adding property...</p>"); $.ajax({ url: '/admin/commercial', type: 'post', data: $('#commercial_form').serialize(), success: function(resp) { if (resp.error) modal.autosize("<p class='note error'>" + resp.error + "</p>"); if (resp.success) modal.autosize("<p class='note success'>" + resp.success + "</p>"); if (resp.redirect) window.location = resp.redirect; } }); } var model = false; $(document).ready(function() { modal = new CabooseModal(800); }); </script> <% end %>
Version data entries
89 entries across 89 versions & 1 rubygems