mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-30 19:48:18 +08:00
Forgot flash fail messagges, now added them for file too big and general error
This commit is contained in:
parent
feb686b4ac
commit
4b837dbe9d
2 changed files with 6 additions and 4 deletions
|
@ -1,7 +1,8 @@
|
|||
|
||||
<% if @protocolsio_too_big %>
|
||||
alert('<%= I18n.t('my_modules.protocols.load_from_file_size_error',
|
||||
size: Constants::FILE_MAX_SIZE_MB ) %>');
|
||||
$('#modal-import-json-protocol').modal('hide');
|
||||
HelperModule.flashAlertMsg(' <%= t('my_modules.protocols.load_from_file_size_error',
|
||||
size: Constants::FILE_MAX_SIZE_MB ) %>','danger');
|
||||
<% else %>
|
||||
$('#modal-import-json-protocol').modal('hide');
|
||||
<% if remotipart_submitted? %> <%# a workaround to a bug with remotipart, that caused alot of headache, courtesy of github.com/dhampik %>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<% if @protocolsio_general_error %>
|
||||
alert('<%= t('my_modules.protocols.load_from_file_protocol_general_error',
|
||||
max: Constants::NAME_MAX_LENGTH, min: Constants::NAME_MIN_LENGTH) %>');
|
||||
$('#modal-import-json-protocol-preview').modal('hide');
|
||||
HelperModule.flashAlertMsg(' <%= t('my_modules.protocols.load_from_file_protocol_general_error',
|
||||
max: Constants::NAME_MAX_LENGTH, min: Constants::NAME_MIN_LENGTH) %>', 'danger');
|
||||
<% else %>
|
||||
$('#modal-import-json-protocol-preview').modal('hide');
|
||||
$('#protocols_io_form').trigger("reset");
|
||||
|
|
Loading…
Reference in a new issue