Skip to content

Commit 02d9495

Browse files
Modify credentials.jelly to require token and include ID
Updated token field to be required and included ID and description fields from a separate page.
1 parent 5a9c2b8 commit 02d9495

File tree

1 file changed

+2
-22
lines changed
  • src/main/resources/io/jenkins/plugins/vigilnz/credentials/TokenCredentials

1 file changed

+2
-22
lines changed

src/main/resources/io/jenkins/plugins/vigilnz/credentials/TokenCredentials/credentials.jelly

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,9 @@
22
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler">
33

44
<f:entry title="Token" field="token">
5-
<f:password clazz="passwordClass"/>
6-
<st:adjunct includes="js/token.js"/>
5+
<f:password clazz="required"/>
76
</f:entry>
87

9-
<f:entry field="id" title="ID">
10-
<j:choose>
11-
<!-- Existing credential: show read-only with actual Jenkins ID -->
12-
<j:when test="${instance != null}">
13-
<!-- Get the actual ID to display and submit -->
14-
<j:set var="idValue"
15-
value="${instance.id != null and instance.id != '' ? instance.id : instance.id}"/>
16-
<!-- Display as read-only -->
17-
<f:readOnlyTextbox value="${idValue}"/>
8+
<st:include page="id-and-description" class="${descriptor.clazz}"/>
189

19-
</j:when>
20-
<!-- New credential: allow user to enter ID (optional) -->
21-
<j:otherwise>
22-
<f:textbox/>
23-
</j:otherwise>
24-
</j:choose>
25-
</f:entry>
26-
27-
<f:entry title="Description" field="description">
28-
<f:textbox/>
29-
</f:entry>
3010
</j:jelly>

0 commit comments

Comments
 (0)