Skip to content

Commit

Permalink
self credentials page table style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed Jun 10, 2022
1 parent a7fd0de commit bf59ecb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ protected <F extends FocusType> ValuePolicyType getValuePolicy(PrismObject<F> ob
protected void updatePasswordValidation(AjaxRequestTarget target) {
super.updatePasswordValidation(target);
updateNewPasswordValuePerformed(target);
// getTable().visitChildren(PasswordPolicyValidationPanel.class,
// (IVisitor<PasswordPolicyValidationPanel, PasswordPolicyValidationPanel>) (panel, iVisit) -> {
// panel.refreshValidationPopup(target);
// });
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
<html xmlns:wicket="http://wicket.apache.org">
<wicket:extend>
<div class="mb-3" wicket:id="propagatePasswordCheckbox"/>
<div class="mb-3" wicket:id="individualSystemsTable"/>
<div wicket:id="individualSystemsContainer" class="mb-3">
<div class="card card-outline card-secondary password-propagation">
<div class="card-header">
<wicket:message key="ChangePasswordPanel.individualSystems"/>
</div>
<div class="box-body">
<div wicket:id="individualSystemsTable"/>
</div>
</div>
</div>
</wicket:extend>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.IModel;
Expand All @@ -69,6 +70,7 @@ public class PropagatePasswordPanel<F extends FocusType> extends ChangePasswordP
private static final String OPERATION_LOAD_VALUE_POLICY = DOT_CLASS + "loadValuePolicy";
private static final Trace LOGGER = TraceManager.getTrace(PropagatePasswordPanel.class);
private static final String ID_PROPAGATE_PASSWORD_CHECKBOX = "propagatePasswordCheckbox";
private static final String ID_INDIVIDUAL_SYSTEMS_CONTAINER = "individualSystemsContainer";
private static final String ID_INDIVIDUAL_SYSTEMS_TABLE = "individualSystemsTable";

private boolean propagatePassword = false;
Expand Down Expand Up @@ -98,6 +100,12 @@ public void onUpdate(AjaxRequestTarget target) {
propagatePasswordCheckbox.setOutputMarkupId(true);
add(propagatePasswordCheckbox);

WebMarkupContainer individualSystemsContainer = new WebMarkupContainer(ID_INDIVIDUAL_SYSTEMS_CONTAINER);
individualSystemsContainer.setOutputMarkupId(true);
individualSystemsContainer.add(new VisibleBehaviour(() -> propagatePasswordCheckbox.getCheckboxModel().getObject() != null
&& propagatePasswordCheckbox.getCheckboxModel().getObject()));
add(individualSystemsContainer);

provider = new ListDataProvider<>(PropagatePasswordPanel.this, getShadowModel());
BoxedTablePanel<PasswordAccountDto> provisioningTable = new BoxedTablePanel<>(ID_INDIVIDUAL_SYSTEMS_TABLE,
provider, initColumns()) {
Expand All @@ -108,9 +116,7 @@ protected boolean hideFooterIfSinglePage() {
return true;
}
};
provisioningTable.add(new VisibleBehaviour(() -> propagatePasswordCheckbox.getCheckboxModel().getObject() != null
&& propagatePasswordCheckbox.getCheckboxModel().getObject()));
add(provisioningTable);
individualSystemsContainer.add(provisioningTable);
}

private IModel<List<PasswordAccountDto>> getShadowModel() {
Expand Down

0 comments on commit bf59ecb

Please sign in to comment.