mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 11:46:25 +08:00
fixes per @Ducz0r 's request
This commit is contained in:
parent
c9dd8b356a
commit
5b9b86a2d4
3 changed files with 4 additions and 2 deletions
|
@ -184,7 +184,7 @@
|
|||
* @returns (String)
|
||||
*/
|
||||
function changeToInputFileField(object, name, value, id) {
|
||||
var fileName = (value.file_file_name) ? value.file_file_name : "";
|
||||
var fileName = (value.file_file_name) ? value.file_file_name : I18n.t('general.file.no_file_chosen');
|
||||
var buttonLabel = I18n.t('general.file.choose');
|
||||
var html = "<div class='repository-input-file-field'>" +
|
||||
"<div class='form-group'><div><input type='file' name='" + name + "' id='" +
|
||||
|
|
|
@ -1094,7 +1094,8 @@ var RepositoryDatatable = (function(global) {
|
|||
// add flag
|
||||
$(input).attr('remove', true);
|
||||
// clear fileName
|
||||
$(parent.find('.file-name-label')[0]).text('');
|
||||
$(parent.find('.file-name-label')[0])
|
||||
.text(I18n.t('general.file.no_file_chosen'));
|
||||
$(parent.find('.form-group')[0]).removeClass('has-error');
|
||||
parent.removeClass('has-error');
|
||||
$(parent.find('.help-block')[0]).remove();
|
||||
|
|
|
@ -1915,6 +1915,7 @@ en:
|
|||
search: "Search"
|
||||
file:
|
||||
choose: "Choose File"
|
||||
no_file_chosen: "No file chosen"
|
||||
processing: "File is still being processed and cannot be downloaded yet."
|
||||
total_size: "You can upload max %{size} MB of files at one time. Please remove one or more files and try to submit again."
|
||||
size_exceeded: "File size must be less than %{file_size} MB."
|
||||
|
|
Loading…
Reference in a new issue