mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
Fixup (#4756)
* [create repo] fixup for 'template' * [auto deletion] fixup * [file upload] fixup * fixup
This commit is contained in:
@@ -191,6 +191,19 @@ class CreateRepoDialog extends React.Component {
|
|||||||
onChange={this.handleRepoNameChange}
|
onChange={this.handleRepoNameChange}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
|
{libraryTemplates.length > 0 && (
|
||||||
|
<FormGroup>
|
||||||
|
<Label for="library-template">{gettext('Template')}</Label>
|
||||||
|
<Select
|
||||||
|
id="library-template"
|
||||||
|
defaultValue={{value: libraryTemplates[0], label: libraryTemplates[0]}}
|
||||||
|
options={libraryTemplates.map((item, index) => { return {value: item, label: item}; })}
|
||||||
|
onChange={this.handlelibraryTemplatesInputChange}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
|
||||||
{storages.length > 0 && (
|
{storages.length > 0 && (
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<Label for="storage-backend">{gettext('Storage Backend')}</Label>
|
<Label for="storage-backend">{gettext('Storage Backend')}</Label>
|
||||||
@@ -203,18 +216,6 @@ class CreateRepoDialog extends React.Component {
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{libraryTemplates.length > 0 && (
|
|
||||||
<FormGroup>
|
|
||||||
<Label for="library-templates">{gettext('Library Templates')}</Label>
|
|
||||||
<Select
|
|
||||||
id="library-templates"
|
|
||||||
defaultValue={{value: libraryTemplates[0], label: libraryTemplates[0]}}
|
|
||||||
options={libraryTemplates.map((item, index) => { return {value: item, label: item}; })}
|
|
||||||
onChange={this.handlelibraryTemplatesInputChange}
|
|
||||||
/>
|
|
||||||
</FormGroup>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{this.props.libraryType === 'group' && (
|
{this.props.libraryType === 'group' && (
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<Label for="exampleSelect">{gettext('Permission')}</Label>
|
<Label for="exampleSelect">{gettext('Permission')}</Label>
|
||||||
|
@@ -52,10 +52,9 @@ class LibOldFilesAutoDelDialog extends React.Component {
|
|||||||
|
|
||||||
let repoID = this.props.repoID;
|
let repoID = this.props.repoID;
|
||||||
|
|
||||||
let message = gettext('Library old files auto delete days setted.');
|
|
||||||
seafileAPI.setRepoOldFilesAutoDelDays(repoID, daysNeedTobeSet).then(res => {
|
seafileAPI.setRepoOldFilesAutoDelDays(repoID, daysNeedTobeSet).then(res => {
|
||||||
toaster.success(message);
|
|
||||||
this.props.toggleDialog();
|
this.props.toggleDialog();
|
||||||
|
toaster.success(gettext('Successfully set it.'));
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
let errMessage = Utils.getErrorMsg(error);
|
let errMessage = Utils.getErrorMsg(error);
|
||||||
toaster.danger(errMessage);
|
toaster.danger(errMessage);
|
||||||
|
@@ -390,7 +390,7 @@ class FileUploader extends React.Component {
|
|||||||
|
|
||||||
getFileServerErrorMessage = (key) => {
|
getFileServerErrorMessage = (key) => {
|
||||||
const errorMessage = {
|
const errorMessage = {
|
||||||
'File locked by others.': gettext('File locked by others.'), // 403
|
'File locked by others.': gettext('File is locked by others.'), // 403
|
||||||
'Invalid filename.': gettext('Invalid filename.'), // 440
|
'Invalid filename.': gettext('Invalid filename.'), // 440
|
||||||
'File already exists.': gettext('File already exists.'), // 441
|
'File already exists.': gettext('File already exists.'), // 441
|
||||||
'File size is too large.': gettext('File size is too large.'), // 442
|
'File size is too large.': gettext('File size is too large.'), // 442
|
||||||
|
@@ -197,7 +197,7 @@ class AdminVirusFilesBatchView(APIView):
|
|||||||
else:
|
else:
|
||||||
result['failed'].append({
|
result['failed'].append({
|
||||||
'virus_id': virus_id,
|
'virus_id': virus_id,
|
||||||
'error_msg': _('Virus file not found.')
|
'error_msg': _('Virus file is not found.')
|
||||||
})
|
})
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user