$('#ajax-modal').html("<%=j(render(:template => 'easy_attendances/approval', :formats => [:html])) %>");
showModal('ajax-modal', '80%');

var submitButton = {
  text:"<%=j l(:button_submit) -%>",
  click: function () {
  $(this).find('form').append($("<input>").attr("type", "hidden").attr("name", "approve").val(<%=@approve%>)).submit()
  },
  'class': 'button-1'
};

var closeButton = {
  text: "<%=j l(:button_close) -%>",
  click: function() {$(this).dialog('close');},
  'class': 'button'
};

$("#ajax-modal").find(".submit-buttons").remove();

$("#ajax-modal").dialog('option', {
  buttons: [closeButton, submitButton]}
);
