Sha256: 39da7d7822dbb34b01f52d92e6c9fc85d7242af4453ffd269ee3f10c84b73c58

Contents?: true

Size: 1.25 KB

Versions: 750

Compression:

Stored size: 1.25 KB

Contents

<h1>New Permanent Redirect</h1>

<form action='/admin/redirects' method='post' id='new_redirect_form'>
<input type='hidden' name='authenticity_token' value='<%= form_authenticity_token %>' /> 
<p>Regular expression? <input type='checkbox' name='is_regex' value='1' /></p>
<p><input type='text' name='old_url' id='old_url' placeholder='Old URL' value='' style='width: 400px;' /></p>
<p><input type='text' name='new_url' id='new_url' placeholder='New URL' value='' style='width: 400px;' /></p>
<div id='message'></div>
<p>
  <input type='button' value='< Back' onclick="window.location='/admin/redirects';" />
  <input type='submit' value='Add Redirect' />
</p>
</form>

<% content_for :caboose_js do %>
<script type='text/javascript'>
            
$(document).ready(function() {
  $('#new_redirect_form').submit(function() { add_redirect(); return false; });
});

function add_redirect()
{
  $('#message').html("<p class='loading'>Adding redirect...</p>");
  $.ajax({
    url: '/admin/redirects',
    type: 'post',
    data: $('#new_redirect_form').serialize(),
    success: function(resp) {
      if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
      if (resp.redirect) window.location = resp.redirect;    
    }
  });
}

</script>
<% end %>

Version data entries

750 entries across 750 versions & 1 rubygems

Version Path
caboose-cms-0.9.229 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-1.0.2 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-1.0.1 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.228 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.227 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.226 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.225 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.224 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.223 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.222 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.221 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.220 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.219 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.218 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.217 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.216 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.215 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.214 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.213 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.212 app/views/caboose/redirects/admin_new.html.erb