1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +00:00

improve tip message (#2933)

* improve tip message

* restore model data
This commit is contained in:
杨顺强
2019-02-12 11:16:49 +08:00
committed by Daniel Pan
parent 4c8a528e38
commit 9e9de800c1
7 changed files with 13 additions and 12 deletions

View File

@@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import copy from 'copy-to-clipboard';
import { Button, Form, FormGroup, Label, Input, InputGroup, InputGroupAddon } from 'reactstrap';
import { Button, Form, FormGroup, Label, Input, InputGroup, InputGroupAddon, Alert } from 'reactstrap';
import { gettext, shareLinkExpireDaysMin, shareLinkExpireDaysMax } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
import SharedLinkInfo from '../../models/shared-link-info';
@@ -345,7 +345,7 @@ class GenerateShareLink extends React.Component {
<Input type="radio" name="radio1" onChange={() => this.setPermission('preview')} />{' '}{gettext('Preview only')}
</Label>
</FormGroup>
<Label className="err-message">{gettext(this.state.errorInfo)}</Label><br />
{this.state.errorInfo && <Alert color="danger" className="mt-2">{gettext(this.state.errorInfo)}</Alert>}
<Button onClick={this.generateShareLink}>{gettext('Generate')}</Button>
</Form>
);