$('#dialog h3.modal-title').html("Registro de anticipo");

$('#dialog').modal({ closeOnEscape: false });
// Rend$( ".selector" ).dialog({ closeOnEscape: false });er the edit form
$('.modal-body').html('<%= j render("cash_registers_moves/form_sale_reserve") %>');
// Show the dynamic dialog
$('#dialog').modal("show");

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