Skip to content

Commit

Permalink
Update field, add back inline error
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Oct 8, 2021
1 parent 2bd13ec commit 367a2e1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/entry.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ THE SOFTWARE.
<!-- expose this so that we can look up the @field value later from prepareDatabinding.jelly -->
<j:set var="entry" value="${attrs}" />
<j:set var="possiblyEscapedTitle" value="${escapeEntryTitleAndDescription ? h.escape(attrs.title) : attrs.title}" />
<div class='tr form-group'>
<div class='jenkins-form-item'>
<j:choose>
<j:when test="${possiblyEscapedTitle!=null}">
<div class="jenkins-form-label help-sibling">
Expand Down
12 changes: 5 additions & 7 deletions core/src/main/resources/lib/hudson/newFromList/form.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ THE SOFTWARE.
<j:set var="descriptors" value="${h.filterDescriptors(it,attrs.descriptors)}" />

<s:form class="jenkins-form" method="post" id="createItemForm" action="${attrs.action?:'createItem'}" name="createItem">
<!-- View name field -->
<div class="jenkins-form-item">
<label for="name" class="jenkins-form-label">${attrs.nameTitle}</label>
<s:entry title="${attrs.nameTitle}">
<s:textbox id="name" name="name" checkUrl="'${h.jsStringEscape(attrs.checkUrl)}?value='+encodeURIComponent(this.value)"
onchange="updateOk()" onkeyup="updateOk()" />
onchange="updateOk(this.form)" onkeyup="updateOk(this.form)" />
<script>$('name').focus();</script>
</div>
</s:entry>

<!-- View name field -->
<div class="jenkins-form-item">
Expand Down Expand Up @@ -120,12 +118,12 @@ THE SOFTWARE.
let nameInput = document.getElementById("name");
let radios = form.querySelectorAll('input[type="radio"]');
if (nameInput.value.length == 0) {
if (nameInput.value.length === 0) {
return true;
}
// this means we only have dummy checkboxes
if (radios.length == 2) {
if (radios.length === 2) {
return true;
}
Expand Down
7 changes: 4 additions & 3 deletions war/src/main/less/base/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ pre.console {
}

.setting-main {
margin-top: 0.25rem;
width: 100%; /* try to make this column as big as possible. */
}

Expand Down Expand Up @@ -577,9 +576,10 @@ label.attach-previous {
padding-left: 20px;
min-height: 16px;
line-height: 16px;
background-image: url("../../images/16x16/error.png");
background-image: url("../../images/svgs/error.svg");
background-position: left center;
background-repeat: no-repeat;
background-size: contain;
}

.error-inline {
Expand All @@ -593,10 +593,11 @@ label.attach-previous {
padding-left: 20px;
min-height: 16px;
line-height: 16px;
background-image: url("../../images/16x16/warning.png");
background-image: url("../../images/svgs/warning.svg");
background-size: 16px 16px;
background-position: left center;
background-repeat: no-repeat;
background-size: contain;
}

.warning-inline {
Expand Down

0 comments on commit 367a2e1

Please sign in to comment.