$('#dialog h3.modal-title').html("<i class='fa fa-object-group'></i> <%= @todo == 'assign' ? 'Asignar Productos' : 'Desasignar productos'%>");
<% if @todo == 'assign' %>
	$("#dialog .modal-body-content").html("<%= escape_javascript(render 'assign_products') %>");
<% else %>
	$("#dialog .modal-body-content").html("<%= escape_javascript(render 'delete_products') %>");
<% end %>

$("#dialog").modal("show");

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