Sha256: d80309b023ba8f53cb3501f7417d9ef3ad6870fe2864dfd747b78ab944b256e0

Contents?: true

Size: 652 Bytes

Versions: 4

Compression:

Stored size: 652 Bytes

Contents

var modal = $('.bootbox.modal');
<%- if model.errors.any? %>
    BBCrud.Alert.show('<%= error_alert %>');
    <% if remotipart_submitted? %>
        var form = "<%= j "#{render(form_path)}" %>";
    <% else %>
        var form = "<%= j render(form_path) %>";
    <% end %>
    modal.find('.modal-body').html(form);
    modal.find('input[type="submit"]').hide();
<%- else %>
    BBCrud.Alert.show('<%= success_alert %>');
    modal.modal('hide');
    <%- if defined?(visit_path) && visit_path != false %>
        var path = '<%= defined?(visit_path) ? visit_path : nil %>';
        Turbolinks.visit(path === '' ? null : path);
    <%- end %>
<%- end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bootbox_crud-0.2.1 app/views/modals/_form.js.erb
bootbox_crud-0.2.0 app/views/modals/_form.js.erb
bootbox_crud-0.1.1.7 app/views/modals/_form.js.erb
bootbox_crud-0.1.1.6 app/views/modals/_form.js.erb