$('#dialog h3.modal-title').html("<%= @type == 1 ? 'Seleccione cliente para abonar' : 'Abono a apartado' %>");

$('#dialog').modal({ closeOnEscape: false });
<% if @type == 1 %>
	$('.modal-body').html('<%= j render("cash_registers_moves/quick_credit_payment") %>');
<% else %>
	$('#dialog').addClass('bs-modal-lg');
	$('#dialog .modal-dialog').addClass('modal-lg');
	$('.modal-body').html('<%= j render("cash_registers_moves/quick_reserve_payment") %>');
<% end %>
// Show the dynamic dialog
$('#dialog').modal("show");
// Set focus to the first element
$('#dialog').on('shown.bs.modal', function () {
      $('.first_input').focus();
      $('select').select2();

 })
