mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 08:34:49 +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)
|
* @returns (String)
|
||||||
*/
|
*/
|
||||||
function changeToInputFileField(object, name, value, id) {
|
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 buttonLabel = I18n.t('general.file.choose');
|
||||||
var html = "<div class='repository-input-file-field'>" +
|
var html = "<div class='repository-input-file-field'>" +
|
||||||
"<div class='form-group'><div><input type='file' name='" + name + "' id='" +
|
"<div class='form-group'><div><input type='file' name='" + name + "' id='" +
|
||||||
|
|
|
@ -1094,7 +1094,8 @@ var RepositoryDatatable = (function(global) {
|
||||||
// add flag
|
// add flag
|
||||||
$(input).attr('remove', true);
|
$(input).attr('remove', true);
|
||||||
// clear fileName
|
// 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.find('.form-group')[0]).removeClass('has-error');
|
||||||
parent.removeClass('has-error');
|
parent.removeClass('has-error');
|
||||||
$(parent.find('.help-block')[0]).remove();
|
$(parent.find('.help-block')[0]).remove();
|
||||||
|
|
|
@ -1915,6 +1915,7 @@ en:
|
||||||
search: "Search"
|
search: "Search"
|
||||||
file:
|
file:
|
||||||
choose: "Choose File"
|
choose: "Choose File"
|
||||||
|
no_file_chosen: "No file chosen"
|
||||||
processing: "File is still being processed and cannot be downloaded yet."
|
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."
|
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."
|
size_exceeded: "File size must be less than %{file_size} MB."
|
||||||
|
|
Loading…
Add table
Reference in a new issue