new.js.erb 322 B

12345678910
  1. $('#dialog h3.modal-title').html("Agregar Cliente");
  2. // Render the edit form
  3. $('.modal-body-content').html('<%= j render "customers/form_remote" %>')
  4. // Show the dynamic dialog
  5. $('#dialog').modal("show");
  6. // Set focus to the first element
  7. $('#dialog').on('shown.bs.modal', function () {
  8. $('.first_input').focus();
  9. })