 $('#ajax-modal').html("<%=j form_for(@easy_attendance, html: {class: 'form-box'}) {|f| render(partial: 'form', locals: {f: f, easy_attendance: @easy_attendance, modul_uniq_id: '', easy_attendance_activities: @easy_attendance_activities}) } %>");

showModal('ajax-modal', '80%');
var submitButton = {
  text:"<%=j l(:button_create) %>",
  click: function() {
    $(this).next().find('button.modal-submit').prop('disabled', true);
    $(this).find('form').submit();
  },
  'class': 'button-positive modal-submit'
 };
var closeButton = {
  text: "<%=j l(:button_close) %>",
  click: function() {
    $(this).dialog('close');
  },
  'class': 'button'
};
$("#ajax-modal").dialog('option', {
  title: "<%=j l(:new, scope: :easy_attendance) %>",
  buttons: [closeButton, submitButton]
});
<% if @only_arrival.nil? %>
  iniEasyAttendanceActivityChanger();
<% end %>
$("#ajax-modal").css({"overflow":"visible"});
