Guillermo - add-edit-password-frontend-areyousure [skip ci]
This commit is contained in:
parent
3bd5db9bf0
commit
1487df9a93
|
@ -6,6 +6,8 @@ import Header from 'core-components/header';
|
||||||
import Form from 'core-components/form';
|
import Form from 'core-components/form';
|
||||||
import FormField from 'core-components/form-field';
|
import FormField from 'core-components/form-field';
|
||||||
import SubmitButton from 'core-components/submit-button';
|
import SubmitButton from 'core-components/submit-button';
|
||||||
|
import ModalContainer from 'app/modal-container';
|
||||||
|
import AreYouSure from 'app-components/are-you-sure';
|
||||||
|
|
||||||
class DashboardEditProfilePage extends React.Component {
|
class DashboardEditProfilePage extends React.Component {
|
||||||
|
|
||||||
|
@ -36,10 +38,17 @@ class DashboardEditProfilePage extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmitEditEmail(formState) {
|
onSubmitEditEmail(formState) {
|
||||||
|
ModalContainer.openModal(<AreYouSure onYes={this.callEditEmailAPI.bind(this, formState)}/>);
|
||||||
|
}
|
||||||
|
|
||||||
|
onSubmitEditPassword(formState) {
|
||||||
|
ModalContainer.openModal(<AreYouSure onYes={this.callEditPassAPI.bind(this, formState)}/>);
|
||||||
|
}
|
||||||
|
|
||||||
|
callEditEmailAPI(formState){
|
||||||
this.setState({
|
this.setState({
|
||||||
loadingEmail: true
|
loadingEmail: true
|
||||||
});
|
});
|
||||||
|
|
||||||
API.call({
|
API.call({
|
||||||
path: "/user/edit-email",
|
path: "/user/edit-email",
|
||||||
data: {
|
data: {
|
||||||
|
@ -52,11 +61,10 @@ class DashboardEditProfilePage extends React.Component {
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmitEditPassword(formState) {
|
callEditPassAPI(formState){
|
||||||
this.setState({
|
this.setState({
|
||||||
loadingPass: true
|
loadingPass: true
|
||||||
});
|
});
|
||||||
|
|
||||||
API.call({
|
API.call({
|
||||||
path: "/user/edit-password",
|
path: "/user/edit-password",
|
||||||
data: {
|
data: {
|
||||||
|
|
Loading…
Reference in New Issue