Skip to content

Commit f0a33cb

Browse files
authored
Document how to make a textbox mandatory and add a placeholder (#415)
1 parent 6ce482a commit f0a33cb

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/main/resources/io/jenkins/plugins/designlibrary/Inputs/index.jelly

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
<s:group>
2929
<s:preview>
3030
<f:entry title="Example" field="example">
31-
<f:textbox />
31+
<f:textbox placeholder="Enter an example"/>
3232
</f:entry>
3333
</s:preview>
3434
<s:code file="example.jelly" />
3535
</s:group>
36+
<p class="jdl-paragraph">${%textbox.usage}</p>
3637
</s:section>
3738

3839
<s:section title="${%Search}">

src/main/resources/io/jenkins/plugins/designlibrary/Inputs/index.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ syntaxHighlight.description.2=There is support for languages like <code>groovy</
1212
format (except the start and end bracket) to be passed as CodeMirror option object.
1313
html.description=To edit html and have a preview you need the <a href="https://plugins.jenkins.io/antisamy-markup-formatter/" target="_blank">OWASP Markup Formatter</a> \
1414
plugin. Below snippet ensures that when the plugin is not installed that the preview will just print plain text.
15-
15+
textbox.usage=By adding <code>clazz="required"</code> you can mark a textbox as being mandatory.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<f:entry title="Example" field="example">
2-
<f:textbox />
2+
<f:textbox placeholder="Enter an example"/>
33
</f:entry>

0 commit comments

Comments
 (0)