mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
[org admin - departments] redesigned it (#6070)
This commit is contained in:
@@ -9,7 +9,7 @@ import toaster from '../toast';
|
||||
const propTypes = {
|
||||
toggle: PropTypes.func.isRequired,
|
||||
groupID: PropTypes.number.isRequired,
|
||||
onDepartChanged: PropTypes.func.isRequired,
|
||||
onSetQuota: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class SetGroupQuotaDialog extends React.Component {
|
||||
@@ -30,7 +30,7 @@ class SetGroupQuotaDialog extends React.Component {
|
||||
let newQuota = this.state.quota == -2 ? this.state.quota : this.state.quota * 1000000;
|
||||
seafileAPI.orgAdminSetGroupQuota(orgID, this.props.groupID, newQuota).then((res) => {
|
||||
this.props.toggle();
|
||||
this.props.onDepartChanged();
|
||||
this.props.onSetQuota(res.data);
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
@@ -74,6 +74,7 @@ class SetGroupQuotaDialog extends React.Component {
|
||||
{ this.state.errMessage && <p className="error">{this.state.errMessage}</p> }
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button color="secondary" onClick={this.props.toggle}>{gettext('Cancel')}</Button>
|
||||
<Button color="primary" onClick={this.setGroupQuota}>{gettext('Submit')}</Button>
|
||||
</ModalFooter>
|
||||
</Modal>
|
||||
|
Reference in New Issue
Block a user