Sha256: 6295029fbbd760de374b63ea3908c131b55b3a2a26a44d3dce1c62e32b351cba

Contents?: true

Size: 1.06 KB

Versions: 897

Compression:

Stored size: 1.06 KB

Contents

<h1>New AB Test</h1>

<form action='/admin/ab-variants' method='post' id='ab_variant_form'>
  <input type='hidden' name='authenticity_token' value='<%=form_authenticity_token %>'>
  <p><input type='text' name='name' id='name' placeholder='AB Variant Name' style='width: 500px;'></p>
  <div id='message'></div>
  <p>
  <input type='button' value='< Back' onclick="window.location='/admin/ab-variants';">
  <input type='submit' value='Add New A/B Variant' onclick="add_ab_variant(); return false;">
  </p>
</form>

<% content_for :caboose_js do %>
<script type='text/javascript'>

function add_ab_variant() 
{
  $('#message').html("<p class='loading'>Adding A/B Variant...</p>");
  $.ajax({
    url: '/admin/ab-variants',
    type: 'post',
    data: $('#ab_variant_form').serialize(),
    success: function(resp) {
      if (resp.error) $('#message').html("<p class='note error'>" + resp.error + "</p>");
      if (resp.redirect) window.location = resp.redirect;
    }
  });
}

var modal = false;
$(window).load(function() {
  modal = new CabooseModal(800);
});

</script>
<% end %>

Version data entries

897 entries across 897 versions & 1 rubygems

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