
<script>
$(document).on("ready", function() {

   $('#dialog h3.modal-title').html("Activar caja registradora");
   // Render the edit form
   $('.modal-body').html('<%= j render("open_cash_registers/form") %>');
   // Show the dynamic dialog
   $('#dialog').modal("show");

   // Set focus to the first element
   $('#dialog').on('shown.bs.modal', function () {
        $('.first_input').focus();
        $('#open_cash_register_cash_register_id').select2();
    });
});

</script>
