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.211 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.210 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.209 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.208 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.207 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.206 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.205 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.204 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.203 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.202 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.201 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.200 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.198 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.197 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.196 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.195 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.194 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.193 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.192 app/views/caboose/redirects/admin_new.html.erb
caboose-cms-0.9.191 app/views/caboose/redirects/admin_new.html.erb