Skip to content

Commit

Permalink
change password button fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed Jun 10, 2022
1 parent bf59ecb commit ae9113e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@
import com.evolveum.midpoint.util.logging.LoggingUtils;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.web.component.AjaxButton;
import com.evolveum.midpoint.web.component.AjaxSubmitButton;
import com.evolveum.midpoint.web.component.progress.ProgressDto;
import com.evolveum.midpoint.web.component.progress.ProgressReporter;
import com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnBlurAjaxFormUpdatingBehaviour;
import com.evolveum.midpoint.web.page.admin.home.dto.PasswordAccountDto;
import com.evolveum.midpoint.web.security.MidPointApplication;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

Expand Down Expand Up @@ -156,13 +155,18 @@ protected List<StringLimitationResult> load() {
passwordLimitationsPanel.setOutputMarkupId(true);
add(passwordLimitationsPanel);

AjaxButton changePasswordButton = new AjaxButton(ID_CHANGE_PASSWORD,
AjaxSubmitButton changePasswordButton = new AjaxSubmitButton(ID_CHANGE_PASSWORD,
createStringResource("ChangePasswordPanel.changePasswordButton")) {

private static final long serialVersionUID = 1L;

@Override
public void onClick(AjaxRequestTarget target) {
public void onError(AjaxRequestTarget target) {
target.add(getPageBase().getFeedbackPanel());
}

@Override
public void onSubmit(AjaxRequestTarget target) {
changePasswordPerformed(target);
}
};
Expand Down Expand Up @@ -339,10 +343,9 @@ protected void finishChangePassword(OperationResult result, AjaxRequestTarget ta
setNullEncryptedPasswordData();
if (showFeedback) {
getPageBase().showResult(result);
target.add(getPageBase().getFeedbackPanel());
}
target.add(getPageBase().getFeedbackPanel());
} else {

target.add(getPageBase().getFeedbackPanel());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,6 @@ protected CredentialsPropagationUserControlType getCredentialsPropagationUserCon
}

private BoxedTablePanel<PasswordAccountDto> getTableComponent() {
return (BoxedTablePanel<PasswordAccountDto>) get(ID_INDIVIDUAL_SYSTEMS_TABLE);
return (BoxedTablePanel<PasswordAccountDto>) get(createComponentPath(ID_INDIVIDUAL_SYSTEMS_CONTAINER, ID_INDIVIDUAL_SYSTEMS_TABLE));
}
}

0 comments on commit ae9113e

Please sign in to comment.