scinote-web/app/views/protocols/protocolsio_import_save.js.erb

16 lines
776 B
Text
Raw Normal View History

<% if @protocolsio_general_error %>
$('#modal-import-json-protocol-preview').modal('hide');
2017-11-02 16:48:09 +01:00
alert(' <%= t('my_modules.protocols.load_from_file_protocol_general_error',
max: Constants::NAME_MAX_LENGTH, min: Constants::NAME_MIN_LENGTH) %>');
<% elsif @toolong%>
$('#modal-import-json-protocol-preview').modal('hide');
2017-11-17 02:56:16 +01:00
$('#protocols_io_form').trigger("reset");
protocolsDatatable.ajax.reload();
2017-11-20 23:19:34 +01:00
HelperModule.flashAlertMsg(' <%= t('protocols.index.import_results.message_warn_truncated')%>', 'warning');
<% else %>
2017-09-26 13:31:24 +02:00
$('#modal-import-json-protocol-preview').modal('hide');
$('#protocols_io_form').trigger("reset");
2017-09-26 13:31:24 +02:00
protocolsDatatable.ajax.reload();
2017-10-25 23:17:20 +02:00
HelperModule.flashAlertMsg(' <%= t('protocols.index.import_results.message_ok_pio')%>', 'success');
<% end %>