mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +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}
|
||||
/>
|
||||
</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 && (
|
||||
<FormGroup>
|
||||
<Label for="storage-backend">{gettext('Storage Backend')}</Label>
|
||||
@@ -203,18 +216,6 @@ class CreateRepoDialog extends React.Component {
|
||||
</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' && (
|
||||
<FormGroup>
|
||||
<Label for="exampleSelect">{gettext('Permission')}</Label>
|
||||
|
@@ -52,10 +52,9 @@ class LibOldFilesAutoDelDialog extends React.Component {
|
||||
|
||||
let repoID = this.props.repoID;
|
||||
|
||||
let message = gettext('Library old files auto delete days setted.');
|
||||
seafileAPI.setRepoOldFilesAutoDelDays(repoID, daysNeedTobeSet).then(res => {
|
||||
toaster.success(message);
|
||||
this.props.toggleDialog();
|
||||
toaster.success(gettext('Successfully set it.'));
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
|
@@ -390,7 +390,7 @@ class FileUploader extends React.Component {
|
||||
|
||||
getFileServerErrorMessage = (key) => {
|
||||
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
|
||||
'File already exists.': gettext('File already exists.'), // 441
|
||||
'File size is too large.': gettext('File size is too large.'), // 442
|
||||
|
Reference in New Issue
Block a user