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