mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-07 15:33:50 +08:00
Merge pull request #817 from mlorb/ml-sci-1632
Fixes buttons on my profile page [SCI-1632]
This commit is contained in:
commit
8bd698e5c3
1 changed files with 12 additions and 9 deletions
|
@ -7,6 +7,7 @@ import {
|
|||
FormControl,
|
||||
ControlLabel,
|
||||
Button,
|
||||
ButtonToolbar,
|
||||
HelpBlock
|
||||
} from "react-bootstrap";
|
||||
import { updateUser } from "../../../../../services/api/users_api";
|
||||
|
@ -277,7 +278,7 @@ class InputEnabled extends Component {
|
|||
.then(() => {
|
||||
this.props.reloadInfo();
|
||||
this.props.disableEdit();
|
||||
if(this.props.forceRerender) {
|
||||
if (this.props.forceRerender) {
|
||||
this.props.forceRerender();
|
||||
}
|
||||
})
|
||||
|
@ -374,12 +375,14 @@ class InputEnabled extends Component {
|
|||
{this.inputField()}
|
||||
{this.confirmationField()}
|
||||
<StyledHelpBlock>{this.state.errorMessage}</StyledHelpBlock>
|
||||
<Button bsStyle="default" onClick={this.props.disableEdit}>
|
||||
<FormattedMessage id="general.cancel" />
|
||||
</Button>
|
||||
<Button bsStyle="primary" type="submit">
|
||||
<FormattedMessage id="general.update" />
|
||||
</Button>
|
||||
<ButtonToolbar>
|
||||
<Button bsStyle="primary" type="submit">
|
||||
<FormattedMessage id="general.update" />
|
||||
</Button>
|
||||
<Button bsStyle="default" onClick={this.props.disableEdit}>
|
||||
<FormattedMessage id="general.cancel" />
|
||||
</Button>
|
||||
</ButtonToolbar>
|
||||
</FormGroup>
|
||||
</form>
|
||||
</StyledInputEnabled>
|
||||
|
@ -399,7 +402,7 @@ InputEnabled.propTypes = {
|
|||
};
|
||||
|
||||
InputEnabled.defaultProps = {
|
||||
forceRerender: () => (false)
|
||||
}
|
||||
forceRerender: () => false
|
||||
};
|
||||
|
||||
export default InputEnabled;
|
||||
|
|
Loading…
Reference in a new issue