Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Sep 6, 2023
2 parents be7feba + 4e8251c commit 7a6262d
Show file tree
Hide file tree
Showing 16 changed files with 219 additions and 50 deletions.
3 changes: 3 additions & 0 deletions gui/admin-gui/src/frontend/scss/_admin-lte-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
&.info-box {
min-height:70px;
}
&.info-box > div > div:first-child {
min-height:54px;
}
}

.btn-default {
Expand Down
8 changes: 8 additions & 0 deletions gui/admin-gui/src/frontend/scss/midpoint-utils.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,11 @@
transition: all ease $duration#{$important-flag};
-webkit-transition: all ease $duration#{$important-flag};
}

.fp-center {
min-height:100%!important;
width: 100%;
min-height: 100% !important;
height: auto !important;
position: absolute;
}
18 changes: 12 additions & 6 deletions gui/admin-gui/src/frontend/scss/midpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1741,19 +1741,25 @@ span.yui-skin-sam {
font-weight: bold;
}

.register-box {
width: 600px !important;
@media (min-width: 577px) {
.register-box {
max-width: calc(480px + 1rem)!important;
width:100%;
}
.login-box {
max-width: calc(360px + 1rem)!important;
width:100%;
}
}

@mixin login-box {
width: 400px !important;
.login-box {

& .login-card-body .spacer hr {
border-color:#dfdfdf;
border-color:#cbcbcb;
}

& .login-card-body .spacer span {
color:#dfdfdf;
color:#cbcbcb;
}

& .login-card-body .user-panel.info-box .image img {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<body>

<wicket:panel>
<p>
<p class="d-flex flex-wrap align-items-end gap-2">
<img wicket:id="image" />
<a wicket:id="changeLink">
<wicket:container wicket:id="changeLinkLabel" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public AbstractPageLogin() {

@Override
protected void addDefaultBodyStyle(TransparentWebMarkupContainer body) {
body.add(AttributeModifier.replace("class", "login-page"));
body.add(AttributeModifier.replace("style", "")); //TODO hack :) because PageBase has min-height defined.
body.add(AttributeModifier.replace("class", "login-page py-3 fp-center"));
body.add(AttributeModifier.remove("style")); //TODO hack :) because PageBase has min-height defined.
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<wicket:extend>
<form wicket:id="mainForm">
<div wicket:id="contentArea"></div>
<input wicket:id="submitRegistration" class="btn btn-primary login-panel-control" wicket:message="value:PageSelfRegistration.register"/>
<input wicket:id="submitRegistration" class="btn btn-primary login-panel-control mt-4" wicket:message="value:PageSelfRegistration.register"/>
</form>
<wicket:child/>
</wicket:extend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ <h1>midPoint</h1>
<h4 class="login-box-msg" wicket:id="formTitle"></h4>
<p class="login-panel-description text-center" wicket:id="formDescription"></p>
<wicket:child />
<div class="d-flex flex-wrap gap-2 justify-content-between login-panel-control">
<a class="btn text-center text-primary login-panel-control mt-2" style="display: inline-block;" wicket:id="back">
<i class="fas fa-arrow-left mr-2"></i>
<wicket:message key="PageEmailNonce.backButtonLabel"/>
</a>
</div>
</div>
<a class="text-center login-panel-control" style="display: inline-block;" wicket:id="back">
<i class="fas fa-arrow-left mr-2"></i>
</a>
<div class="card-footer login-footer" wicket:id="footerContainer">
<span class="pull-right hidden-xs" wicket:id="version">
<b><wicket:message key="PageTemplate.version"/></b> <wicket:message key="midpoint.system.build"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected IModel<String> getDescriptionModel() {
}

private void addBackButton() {
AjaxButton back = new AjaxButton(ID_BACK, createStringResource("PageEmailNonce.backButtonLabel")) {
AjaxButton back = new AjaxButton(ID_BACK) {

private static final long serialVersionUID = 1L;

Expand All @@ -109,8 +109,8 @@ protected boolean isBackButtonVisible() {

@Override
protected void addDefaultBodyStyle(TransparentWebMarkupContainer body) {
body.add(AttributeModifier.replace("class", "register-page"));
body.add(AttributeModifier.replace("style", "")); //TODO hack :) because PageBase has min-height defined.
body.add(AttributeModifier.replace("class", "register-page py-3 fp-center"));
body.add(AttributeModifier.remove("style")); //TODO hack :) because PageBase has min-height defined.
}

private void initSelfRegistrationConfiguration() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,43 @@
<wicket:extend>

<wicket:fragment wicket:id="staticContent">
<div wicket:id="staticForm">
<div class="input-group mb-3">
<div wicket:id="firstName"/>
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-user"></span>
</div>
<div wicket:id="staticForm" >
<div class="mb-3">
<div class="d-flex flex-column my-2 justify-content-between login-panel-control">
<label>
<wicket:message key="UserType.givenName"/>
</label>
<div>
<div wicket:id="firstName"/>
</div>
</div>

<div class="input-group mb-3">
<div wicket:id="lastName"/>
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-user"></span>
</div>
<div class="d-flex flex-column my-2 justify-content-between login-panel-control">
<label>
<wicket:message key="UserType.familyName"/>
</label>
<div>
<div wicket:id="lastName"/>
</div>
</div>

<div class="input-group mb-3">
<div wicket:id="email"/>
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-user"></span>
</div>
<div class="d-flex flex-column my-2 justify-content-between login-panel-control">
<label>
<wicket:message key="UserType.emailAddress"/>
</label>
<div>
<div wicket:id="email"/>
</div>
</div>

<div class="input-group mb-3">
<div class="col-md-12 px-0" wicket:id="password"/>
<div class="d-flex flex-column my-2 justify-content-between login-panel-control">
<label>
<wicket:message key="CredentialsType.password"/>
</label>
<div>
<div class="col-md-12 px-0" wicket:id="password"/>
</div>
</div>
</div>

<div wicket:id="componentFeedback"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void setObject(String object) {
getUserModel().getObject().setGivenName(new PolyStringType(object));
}
});
initInputProperties(feedback, "UserType.givenName", firstName);
initInputProperties(feedback, firstName);
staticRegistrationForm.add(firstName);

TextPanel<String> lastName = new TextPanel<>(ID_LAST_NAME,
Expand All @@ -151,20 +151,19 @@ public void setObject(String object) {
}

});
initInputProperties(feedback, "UserType.familyName", lastName);
initInputProperties(feedback, lastName);
staticRegistrationForm.add(lastName);

TextPanel<String> email = new TextPanel<>(ID_EMAIL,
new PropertyModel<>(getUserModel(), UserType.F_EMAIL_ADDRESS.getLocalPart()));
initInputProperties(feedback, "UserType.emailAddress", email);
initInputProperties(feedback, email);
staticRegistrationForm.add(email);

createPasswordPanel(staticRegistrationForm);
return staticRegistrationForm;
}

private void initInputProperties(FeedbackPanel feedback, String placeholderKey, TextPanel<String> input) {
input.getBaseFormComponent().add(AttributeAppender.append("placeholder", createStringResource(placeholderKey)));
private void initInputProperties(FeedbackPanel feedback, TextPanel<String> input) {
input.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
input.getBaseFormComponent().setRequired(true);
feedback.setFilter(new ContainerFeedbackMessageFilter(input.getBaseFormComponent()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
<wicket:child/>

<wicket:enclosure child="flowLinkContainer">
<div class="d-flex align-items-center my-2 py-1 spacer">
<hr class="w-100" style="border-color: #818d98;">
<span class="mx-3">OR</span>
<hr class="w-100" style="border-color: #818d98;">
<div class="d-flex align-items-center my-2 spacer">
<hr class="w-100">
<span class="mx-3 text-sm">
<wicket:message key="PageLogin.separator"/>
</span>
<hr class="w-100">
</div>

<div wicket:id="flowLinkContainer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
</div>
<wicket:enclosure child="itemsPanel">
<div class="border-top d-flex flex-column pt-3 gap-2 w-100">
<div wicket:id="itemsPanel" class="d-flex flex-wrap gap-2">
<label class="col-md-4 m-0" wicket:id="itemName"></label>
<div wicket:id="itemValue"/>
<div wicket:id="itemsPanel" class="d-flex flex-wrap">
<label class="col-sm-4 m-0" wicket:id="itemName"></label>
<div class="col-sm-8 m-0" wicket:id="itemValue"/>
</div>
</div>
<a wicket:id="confirmIdentity" class="d-flex btn btn-primary align-items-center justify-content-center w-100 mt-2">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Copyright (C) 2010-2023 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.schema.validator.processor;

import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.schema.validator.UpgradeObjectProcessor;
import com.evolveum.midpoint.schema.validator.UpgradePhase;
import com.evolveum.midpoint.schema.validator.UpgradePriority;
import com.evolveum.midpoint.schema.validator.UpgradeType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

@SuppressWarnings("unused")
public class AdditionalPanelsProcessor implements UpgradeObjectProcessor<ObjectType> {

@Override
public UpgradePhase getPhase() {
return UpgradePhase.BEFORE;
}

@Override
public UpgradePriority getPriority() {
return UpgradePriority.NECESSARY;
}

@Override
public UpgradeType getType() {
return UpgradeType.PREVIEW;
}

@Override
public boolean isApplicable(PrismObject<?> object, ItemPath path) {
return matchParentTypeAndItemName(object, path, GuiObjectListViewType.class, GuiObjectListViewType.F_ADDITIONAL_PANELS);
}

@Override
public boolean process(PrismObject<ObjectType> object, ItemPath path) throws Exception {
GuiObjectListViewType view = getItemParent(object, path);

GuiObjectListViewAdditionalPanelsType additionalPanels = view.getAdditionalPanels();
if (additionalPanels.getMemberPanel() == null) {
view.setAdditionalPanels(null);
return true;
}

GuiObjectListPanelConfigurationType memberPanel = additionalPanels.getMemberPanel();

GuiObjectDetailsPageType objectDetailsPage = new GuiObjectDetailsPageType();
objectDetailsPage.setType(view.getType());

ContainerPanelConfigurationType panel = new ContainerPanelConfigurationType();
panel.setIdentifier("orgMembers"); //view.getIdentifier();
objectDetailsPage.getPanel().add(panel);

GuiObjectListViewType listView = new GuiObjectListViewType();
panel.setListView(listView);

listView.setSearchBoxConfiguration(memberPanel.getSearchBoxConfiguration().clone());

ItemPath objectCollectionViewsPath = path.allUpToIncluding(path.size() - 4);
AdminGuiConfigurationType adminGuiConfiguration = getItemParent(object, objectCollectionViewsPath);
GuiObjectDetailsSetType objectDetails = adminGuiConfiguration.getObjectDetails();
if (objectDetails == null) {
objectDetails = new GuiObjectDetailsSetType();
adminGuiConfiguration.setObjectDetails(objectDetails);
}

objectDetails.getObjectDetailsPage().add(objectDetailsPage);


view.setAdditionalPanels(null);
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ private String getProcessorIdentifier(Class<?> processorClass) {
@Test
public void test30TestSystemConfig() throws Exception {
testUpgradeValidator("system-configuration.xml", result -> {
Assertions.assertThat(result.getItems()).hasSize(23);
Assertions.assertThat(result.getItems()).hasSize(24);

UpgradeValidationItem item = assertGetItem(result, getProcessorIdentifier(RoleCatalogCollectionsProcessor.class));
Assertions.assertThat(item.getDelta().getModifiedItems()).hasSize(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@
</searchItems>
</searchBoxConfiguration>
</objectCollectionView>
<objectCollectionView id="15">
<identifier>orgMember</identifier>
<type>OrgType</type>
</objectCollectionView>
</objectCollectionViews>
<objectDetails>
<objectDetailsPage id="10">
Expand All @@ -216,6 +220,35 @@
<identifier>123</identifier>
</container>
</objectDetailsPage>
<objectDetailsPage>
<type>OrgType</type>
<panel>
<identifier>orgMembers</identifier>
<listView>
<searchBoxConfiguration>
<scopeConfiguration>
<display>
<label>Custom Scope</label>
<help>Help scope text</help>
</display>
<defaultValue>subtree</defaultValue>
</scopeConfiguration>
<objectTypeConfiguration>
<display>
<label>Custom Type</label>
</display>
<defaultValue>OrgType</defaultValue>
<supportedTypes>OrgType</supportedTypes>
<supportedTypes>UserType</supportedTypes>
<supportedTypes>ServiceType</supportedTypes>
</objectTypeConfiguration>
<indirectConfiguration>
<visibility>hidden</visibility>
</indirectConfiguration>
</searchBoxConfiguration>
</listView>
</panel>
</objectDetailsPage>
</objectDetails>
<accessRequest>
<roleCatalog>
Expand Down

0 comments on commit 7a6262d

Please sign in to comment.