2017-09-19 21:02:16 +08:00
|
|
|
|
2017-09-22 17:56:50 +08:00
|
|
|
<% if @protocolsio_too_big %>
|
|
|
|
alert('<%= I18n.t('my_modules.protocols.load_from_file_size_error',
|
|
|
|
size: Constants::FILE_MAX_SIZE_MB ) %>');
|
|
|
|
|
|
|
|
|
2017-09-19 22:07:54 +08:00
|
|
|
<% else %>
|
2017-09-19 21:02:16 +08:00
|
|
|
|
2017-09-22 17:56:50 +08:00
|
|
|
$('#modal-import-json-protocol').modal('hide');
|
2017-09-22 22:02:56 +08:00
|
|
|
<% if remotipart_submitted? %> <%# a workaround to a bug with remotipart, that caused alot of headache, courtesy of github.com/dhampik %>
|
2017-09-22 17:56:50 +08:00
|
|
|
$('#protocolsio-preview-modal-target').html("<%= j "#{render(:partial => 'protocols/import_export/import_json_protocol_preview_modal')}" %>");
|
|
|
|
<% else %>
|
|
|
|
$('#protocolsio-preview-modal-target').html("<%= j render(:partial => 'protocols/import_export/import_json_protocol_preview_modal') %>");
|
|
|
|
<% end %>
|
|
|
|
$('#modal-import-json-protocol-preview').modal('show');
|
|
|
|
<% end %>
|