-
${%CopyOption.description}
+
${%CopyOption.description}
-
-
-
@@ -63,11 +67,11 @@ THE SOFTWARE.
-
+
+
+
+
+
diff --git a/core/src/main/resources/hudson/model/View/newJob.properties b/core/src/main/resources/hudson/model/View/newJob.properties
index 4aa1ef73d683..c08fa1cdfe34 100644
--- a/core/src/main/resources/hudson/model/View/newJob.properties
+++ b/core/src/main/resources/hudson/model/View/newJob.properties
@@ -2,6 +2,7 @@ NewJob=New {0}
JobName={0} name
ItemName.help=Required field
ItemName.label=Enter an item name
+ItemType.label=Select an item type
ItemName.validation.required=This field cannot be empty, please enter a valid name
ItemType.validation.required=Please select an item type
CopyOption.placeholder=Type to autocomplete
diff --git a/war/src/main/js/add-item.js b/war/src/main/js/add-item.js
index 62244731adde..59b20dde64a1 100644
--- a/war/src/main/js/add-item.js
+++ b/war/src/main/js/add-item.js
@@ -70,33 +70,9 @@ $.when(getItems()).done(function (data) {
}
function hideInputHelp(context) {
- $(".input-help", context).addClass("input-message-disabled");
}
function showInputHelp(context) {
- $(".input-help", context).removeClass("input-message-disabled");
- }
-
- // About Scroll-linked effect: https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Scroll-linked_effects
- function doSticky() {
- var decorator = $("form .footer .btn-decorator");
- var pos = decorator.offset();
- var vpH = $(window).height();
- if (pos.top >= vpH) {
- decorator.css({ position: "fixed" });
- }
-
- $(window).scroll(function () {
- var footer = $("form .footer");
- var ref1 = decorator.offset().top + decorator.outerHeight();
- var ref2 = footer.offset().top + footer.outerHeight();
- var vpH = $(window).height();
- if (ref2 > vpH + $(window).scrollTop()) {
- decorator.css({ position: "fixed" });
- } else if (ref2 - 1 <= ref1) {
- decorator.css({ position: "absolute" });
- }
- });
}
function enableSubmit(status) {
@@ -173,6 +149,9 @@ $.when(getItems()).done(function (data) {
item.setAttribute("role", "radio");
item.setAttribute("aria-checked", "false");
+ var iconDiv = drawIcon(elem);
+ item.appendChild(iconDiv);
+
var label = item.appendChild(document.createElement("label"));
var radio = label.appendChild(document.createElement("input"));
@@ -189,9 +168,6 @@ $.when(getItems()).done(function (data) {
desc.className = "desc";
desc.innerHTML = checkForLink(elem.description);
- var iconDiv = drawIcon(elem);
- item.appendChild(iconDiv);
-
function select(e) {
e.preventDefault();
cleanCopyFromOption();
@@ -228,7 +204,6 @@ $.when(getItems()).done(function (data) {
iconDiv.className = "icon";
var img1 = document.createElement("img");
- img1.className = elem.iconClassName + " icon-xlg";
img1.src = elem.iconQualifiedUrl;
iconDiv.appendChild(img1);
@@ -373,8 +348,5 @@ $.when(getItems()).done(function (data) {
// Disable the submit button
enableSubmit(false);
-
- // Do sticky the form buttons
- doSticky();
});
});
diff --git a/war/src/main/js/widgets/add/addform.scss b/war/src/main/js/widgets/add/addform.scss
index 27b47f9425f7..fda493e53365 100644
--- a/war/src/main/js/widgets/add/addform.scss
+++ b/war/src/main/js/widgets/add/addform.scss
@@ -1,72 +1,14 @@
+@use "../../../scss/abstracts/mixins";
+
#add-item-panel {
- max-width: 950px;
+ max-width: 850px;
margin: auto;
- form > .header {
- position: relative;
- border: 1px solid var(--input-border);
- border-bottom: none;
- background: var(--light-grey);
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
- z-index: 5;
- }
-
- form > .footer {
- position: relative;
- border: 1px solid var(--input-border);
- border-top: none;
- background: var(--light-grey);
- height: 110px;
-
- .btn-decorator {
- position: absolute;
- bottom: 0px;
- padding: 20px 30px;
- width: auto;
- border-top-right-radius: 10px;
- border: 1px solid var(--add-item-btn-decorator-border-color);
- background: var(--add-item-btn-decorator-bg-color);
- text-align: center;
- z-index: 10;
- display: flex;
- align-items: center;
-
- input[type="checkbox"] {
- width: auto;
- min-width: auto;
- margin-right: 0px;
- }
- }
- }
-
- .add-item-name {
- padding: 20px;
-
- label {
- position: relative;
- padding-bottom: 10px;
- }
- }
-
.item-copy {
position: relative;
- border: 1px solid var(--input-border);
- border-top: none;
- padding: 20px;
- background-color: var(--light-grey);
-
- p.description {
- font-size: var(--font-size-base);
- margin-top: 0;
- }
.add-item-copy {
position: relative;
- padding-left: 58px;
-
- /* This is needed because