Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Nov 6, 2021
1 parent cea8325 commit 7fb61fb
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ def st=namespace("jelly:stapler")

l.layout(permission:app.SYSTEM_READ, title:my.displayName, cssclass:request.getParameter('decorate')) {
l.main_panel {
h1 {
l.icon(class: 'icon-secure icon-xlg')
text(my.displayName)
div(class: "jenkins-app-bar") {
div(class: "jenkins-app-bar__content") {
h1 {
text(my.displayName)
}
}
}
set("readOnlyMode", !app.hasPermission(app.ADMINISTER))

Expand All @@ -32,12 +35,8 @@ l.layout(permission:app.SYSTEM_READ, title:my.displayName, cssclass:request.getP
f.checkbox(title:_("Disable remember me"), field: "disableRememberMe")
}

div(style:"width:100%") {
f.descriptorRadioList(title:_("Security Realm"), varName:"realm", instance:app.securityRealm, descriptors: h.filterDescriptors(app, SecurityRealm.all()))
}
}
f.descriptorRadioList(title:_("Security Realm"), varName:"realm", instance:app.securityRealm, descriptors: h.filterDescriptors(app, SecurityRealm.all()))

div(style:"width:100%") {
f.descriptorRadioList(title:_("Authorization"), varName:"authorization", instance:app.authorizationStrategy, descriptors:h.filterDescriptors(app, AuthorizationStrategy.all()))
}

Expand Down
20 changes: 9 additions & 11 deletions core/src/main/resources/lib/form/class-entry.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ THE SOFTWARE.
</st:attribute>
</st:documentation>
<j:set var="clazz" value="${attrs.clazz ?: attrs.descriptor.clazz.name}" />
<f:invisibleEntry>
<input type="hidden" name="stapler-class" value="${clazz}" /> <!-- Legacy: Remove once plugins have been staged onto $class -->
<j:choose>
<j:when test="${attrs.descriptor != null and attrs.descriptor.id != clazz}">
<input type="hidden" name="kind" value="${attrs.descriptor.id}" />
</j:when>
<j:otherwise>
<input type="hidden" name="$class" value="${clazz}" />
</j:otherwise>
</j:choose>
</f:invisibleEntry>
<input type="hidden" name="stapler-class" value="${clazz}" /> <!-- Legacy: Remove once plugins have been staged onto $class -->
<j:choose>
<j:when test="${attrs.descriptor != null and attrs.descriptor.id != clazz}">
<input type="hidden" name="kind" value="${attrs.descriptor.id}" />
</j:when>
<j:otherwise>
<input type="hidden" name="$class" value="${clazz}" />
</j:otherwise>
</j:choose>
</j:jelly>
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/descriptorRadioList.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ THE SOFTWARE.
title="${d.displayName}" checked="${instance.descriptor==d}">
<j:set var="descriptor" value="${d}" />
<j:set var="instance" value="${instance.descriptor==d?instance:null}" />
<f:class-entry descriptor="${descriptor}" />
<st:include from="${d}" page="${d.configPage}" optional="true" />
</f:radioBlock>
<f:class-entry descriptor="${descriptor}" />
</j:forEach>
</f:section>
</j:jelly>
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/hetero-radio.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ THE SOFTWARE.
<j:set var="descriptor" value="${d}" />
<j:set var="instance" value="${currentDescriptor==d?currentInstance:null}" />
<st:include from="${d}" page="${d.configPage}" optional="true" />
<f:class-entry descriptor="${d}" />
</f:radioBlock>
<f:class-entry descriptor="${d}" />
</j:forEach>
</div>
<!-- TODO consider customizedFields -->
Expand Down
15 changes: 14 additions & 1 deletion war/src/main/less/base/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -1174,13 +1174,21 @@ div.to-be-removed { display: none; }
max-width: 100%;
}

.radioBlock-container {
margin-bottom: 0.66rem;

&:last-of-type {
margin-bottom: 0;
}
}

.optionalBlock-container > .form-container,
.radioBlock-container > .form-container,
.dropdownList-container {
position: relative;
margin-top: 10px;
padding-left: 32px;
transition: var(--standard-transition);
margin-top: 0.66rem;

&::after {
content: "";
Expand All @@ -1193,13 +1201,18 @@ div.to-be-removed { display: none; }
border-radius: 2px;
transition: var(--standard-transition);
}

&:empty {
display: none;
}
}

.form-container--hidden {
visibility: hidden!important;
margin-top: 0!important;
opacity: 0!important;
max-height: 0!important;
height: 0!important;
}

.row-set-end { display: none; }
Expand Down
2 changes: 1 addition & 1 deletion war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
}

.jenkins-radio {
margin-top: 2px;
margin-top: 3px;

&:not(:last-of-type) {
margin-bottom: 20px;
Expand Down

0 comments on commit 7fb61fb

Please sign in to comment.