mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
@@ -1,6 +1,6 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
|
import { Modal, ModalHeader, ModalBody, ModalFooter, Alert } from 'reactstrap';
|
||||||
import { gettext, repoPasswordMinLength } from '../../utils/constants';
|
import { gettext, repoPasswordMinLength } from '../../utils/constants';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
@@ -117,7 +117,7 @@ class ChangeRepoPasswordDialog extends React.Component {
|
|||||||
<input type="password" name="new_passwd" className="form-control" id="new-passwd" value={this.state.newPassword} onChange={this.handleNewPasswordInputChange} /><br />
|
<input type="password" name="new_passwd" className="form-control" id="new-passwd" value={this.state.newPassword} onChange={this.handleNewPasswordInputChange} /><br />
|
||||||
<label htmlFor="new-passwd-again">{gettext('New Password Again')}</label><br />
|
<label htmlFor="new-passwd-again">{gettext('New Password Again')}</label><br />
|
||||||
<input type="password" name="new_passwd_again" className="form-control" id="new-passwd-again" value={this.state.newPasswordAgain} onChange={this.handleNewPasswordAgainInputChange} /><br />
|
<input type="password" name="new_passwd_again" className="form-control" id="new-passwd-again" value={this.state.newPasswordAgain} onChange={this.handleNewPasswordAgainInputChange} /><br />
|
||||||
{this.state.errorMsg && <p className="alert alert-danger" role="alert">{this.state.errorMsg}</p>}
|
{this.state.errorMsg && <Alert color="danger">{this.state.errorMsg}</Alert>}
|
||||||
</form>
|
</form>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label } from 'reactstrap';
|
import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Alert } from 'reactstrap';
|
||||||
import { gettext, maxFileName } from '../../utils/constants';
|
import { gettext, maxFileName } from '../../utils/constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -87,7 +87,7 @@ class CreateDepartmentRepoDialog extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</Form>
|
</Form>
|
||||||
<Label className="err-message">{this.state.errMessage}</Label>
|
{this.state.errMessage && <Alert color="danger">{this.state.errMessage}</Alert>}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label } from 'reactstrap';
|
import { Button, Modal, ModalHeader, Input, ModalBody, ModalFooter, Form, FormGroup, Label, Alert } from 'reactstrap';
|
||||||
import { gettext, enableEncryptedLibrary } from '../../utils/constants';
|
import { gettext, enableEncryptedLibrary } from '../../utils/constants';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -201,7 +201,7 @@ class CreateRepoDialog extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</Form>
|
</Form>
|
||||||
<Label className="err-message">{this.state.errMessage}</Label>
|
{this.state.errMessage && <Alert color="danger">{this.state.errMessage}</Alert>}
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
<Button color="primary" onClick={this.handleSubmit}>{gettext('Submit')}</Button>
|
||||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import copy from 'copy-to-clipboard';
|
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 { gettext, shareLinkExpireDaysMin, shareLinkExpireDaysMax } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import SharedLinkInfo from '../../models/shared-link-info';
|
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')}
|
<Input type="radio" name="radio1" onChange={() => this.setPermission('preview')} />{' '}{gettext('Preview only')}
|
||||||
</Label>
|
</Label>
|
||||||
</FormGroup>
|
</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>
|
<Button onClick={this.generateShareLink}>{gettext('Generate')}</Button>
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
import { Button, Form, FormGroup, FormText, Label, Input, InputGroup, InputGroupAddon } from 'reactstrap';
|
import { Button, Form, FormGroup, FormText, Label, Input, InputGroup, InputGroupAddon, Alert } from 'reactstrap';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import SharedUploadInfo from '../../models/shared-upload-info';
|
import SharedUploadInfo from '../../models/shared-upload-info';
|
||||||
@@ -163,7 +163,7 @@ class GenerateUploadLink extends React.Component {
|
|||||||
<Input className="passwd" type={this.state.passwordVisible ? 'text' : 'password'} value={this.state.passwordnew || ''} onChange={this.inputPasswordNew} />
|
<Input className="passwd" type={this.state.passwordVisible ? 'text' : 'password'} value={this.state.passwordnew || ''} onChange={this.inputPasswordNew} />
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
}
|
}
|
||||||
<Label className="err-message">{this.state.errorInfo}</Label><br/>
|
{this.state.errorInfo && <Alert color="danger" className="mt-2">{this.state.errorInfo}</Alert>}
|
||||||
<Button className="generate-link-btn" onClick={this.generateUploadLink}>{gettext('Generate')}</Button>
|
<Button className="generate-link-btn" onClick={this.generateUploadLink}>{gettext('Generate')}</Button>
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { gettext, enableRepoHistorySetting } from '../../utils/constants';
|
import { gettext, enableRepoHistorySetting } from '../../utils/constants';
|
||||||
import toaster from '../toast';
|
import toaster from '../toast';
|
||||||
import { Button, Modal, ModalHeader, ModalBody, Form, FormGroup, Label, Input } from 'reactstrap';
|
import { Button, Modal, ModalHeader, ModalBody, Form, FormGroup, Label, Input, Alert } from 'reactstrap';
|
||||||
import { seafileAPI } from '../../utils/seafile-api.js';
|
import { seafileAPI } from '../../utils/seafile-api.js';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
@@ -126,7 +126,7 @@ class LibHistorySetting extends React.Component {
|
|||||||
/>{' '}
|
/>{' '}
|
||||||
<Label><span>{gettext('days')}</span></Label>
|
<Label><span>{gettext('days')}</span></Label>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
<Label className="err-message">{this.state.errorInfo}</Label><br />
|
{this.state.errorInfo && <Alert color="danger">{this.state.errorInfo}</Alert>}
|
||||||
<Button color="primary" onClick={this.submit}>{gettext('Submit')}</Button>
|
<Button color="primary" onClick={this.submit}>{gettext('Submit')}</Button>
|
||||||
</Form>
|
</Form>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
|
@@ -974,6 +974,7 @@ a.table-sort-op:focus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.err-message {
|
.err-message {
|
||||||
|
margin-left: 0.5rem;
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user