Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Sep 6, 2023
2 parents 8a78dd8 + 4e8251c commit 4363224
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 49 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

0 comments on commit 4363224

Please sign in to comment.