Skip to content

Commit

Permalink
[JENKINS-69232] Drop down select input is out of style with other dro…
Browse files Browse the repository at this point in the history
…p down select input (#6962)

Co-authored-by: Alexander Brandes <mc.cache@web.de>
  • Loading branch information
ridemountainpig and NotMyFault committed Aug 8, 2022
1 parent b95b558 commit 248830a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions core/src/main/resources/lib/form/enum.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ THE SOFTWARE.
<j:if test="${attrs.field==null}">
<j:set target="${attrs}" property="field" value="${entry.field}" />
</j:if>

<select class="jenkins-input" name="${attrs.field}">
<j:forEach var="it" items="${descriptor.getPropertyType(instance,attrs.field).getEnumConstants()}">
<f:option value="${it.name()}" selected="${instance[attrs.field]!=null ? it==instance[attrs.field] : it.name()==attrs.default}">
<d:invokeBody />
</f:option>
</j:forEach>
</select>
<div class="jenkins-select">
<select class="jenkins-select__input" name="${attrs.field}">
<j:forEach var="it" items="${descriptor.getPropertyType(instance,attrs.field).getEnumConstants()}">
<f:option value="${it.name()}" selected="${instance[attrs.field]!=null ? it==instance[attrs.field] : it.name()==attrs.default}">
<d:invokeBody />
</f:option>
</j:forEach>
</select>
</div>
<!-- TODO consider customizedFields -->
</j:jelly>

0 comments on commit 248830a

Please sign in to comment.