Skip to content

Commit 0741b14

Browse files
authored
Merge pull request #31 from jenkinsci/JENKINS-57346
[JENKINS-57346] Remove use of core help and cleanup jelly
2 parents f951a6f + 05d8d7c commit 0741b14

12 files changed

Lines changed: 45 additions & 49 deletions

File tree

src/main/java/hudson/plugins/validating_string_parameter/ValidatingStringParameterDefinition.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ public String getDisplayName() {
9898
return "Validating String Parameter";
9999
}
100100

101-
@Override
102-
public String getHelpFile() {
103-
return "/plugin/validating-string-parameter/help.html";
104-
}
105-
106101
/**
107102
* Check the regular expression entered by the user
108103
*/

src/main/resources/hudson/plugins/validating_string_parameter/ValidatingStringParameterDefinition/config.jelly

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,20 @@ THE SOFTWARE.
2323
-->
2424

2525
<?jelly escape-by-default='true'?>
26-
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
27-
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
28-
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
29-
<f:entry title="${%Name}" help="/help/parameter/name.html">
30-
<f:textbox field="name" />
26+
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
27+
<f:entry title="${%Name}" field="name">
28+
<f:textbox />
3129
</f:entry>
32-
<f:entry title="${%Default Value}" help="/help/parameter/string-default.html">
33-
<f:textbox field="defaultValue" />
30+
<f:entry title="${%Default Value}" field="defaultValue">
31+
<f:textbox />
3432
</f:entry>
35-
<f:entry title="${%Regular Expression}" help="/plugin/validating-string-parameter/help-regex.html">
36-
<f:textbox field="regex"/>
33+
<f:entry title="${%Regular Expression}" field="regex">
34+
<f:textbox />
3735
</f:entry>
38-
<f:entry title="${%Failed Validation Message}" help="/plugin/validating-string-parameter/help-failedValidationMessage.html">
39-
<f:textbox field="failedValidationMessage"/>
36+
<f:entry title="${%Failed Validation Message}" field="failedValidationMessage">
37+
<f:textbox />
4038
</f:entry>
41-
<f:entry title="${%Description}" help="/help/parameter/description.html">
42-
<f:textarea field="description" codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription" />
39+
<f:entry title="${%Description}" field="description">
40+
<f:textarea codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription" />
4341
</f:entry>
4442
</j:jelly>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
Specifies the default value of the field, which allows the user to save typing the actual value.
3+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
A description that will be shown to the user later.
3+
</div>

src/main/webapp/help-failedValidationMessage.html renamed to src/main/resources/hudson/plugins/validating_string_parameter/ValidatingStringParameterDefinition/help-failedValidationMessage.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<div>
2-
<p>
3-
This message is displayed to the user if they enter a value that does not match
4-
the configured regular expression.
5-
</p>
6-
</div>
1+
<div>
2+
<p>
3+
This message is displayed to the user if they enter a value that does not match
4+
the configured regular expression.
5+
</p>
6+
</div>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div>
2+
The name of the parameter
3+
4+
<p>
5+
These parameters are exposed to build as environment variables.
6+
</div>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div>
2+
<p>
3+
Standard <a href="https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">Java
4+
regular expression</a> that will be used to validate the entered string parameter value.
5+
</p>
6+
</div>

src/main/webapp/help.html renamed to src/main/resources/hudson/plugins/validating_string_parameter/ValidatingStringParameterDefinition/help.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<div>
2-
Defines a simple text parameter, where users can enter a string value,
3-
which you can use during a build, either as an environment variable, or
4-
through variable substitution in some other parts of the configuration.
5-
<p/>
6-
Additionally, this parameter supports a regular expression based validation
7-
of the user entered parameter to ensure it meets the build's requirements.
8-
</div>
1+
<div>
2+
Defines a simple text parameter, where users can enter a string value,
3+
which you can use during a build, either as an environment variable, or
4+
through variable substitution in some other parts of the configuration.
5+
<p/>
6+
Additionally, this parameter supports a regular expression based validation
7+
of the user entered parameter to ensure it meets the build's requirements.
8+
</div>

src/main/resources/hudson/plugins/validating_string_parameter/ValidatingStringParameterDefinition/index.jelly

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
THE SOFTWARE.
2323
-->
2424
<?jelly escape-by-default='true'?>
25-
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
26-
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
27-
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
25+
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
2826

2927
<j:set var="escapeEntryTitleAndDescription" value="false"/>
3028

src/main/resources/hudson/plugins/validating_string_parameter/ValidatingStringParameterValue/value.jelly

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
THE SOFTWARE.
2323
-->
2424
<?jelly escape-by-default='true'?>
25-
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
26-
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
27-
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
25+
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
2826

2927
<j:set var="escapeEntryTitleAndDescription" value="false"/>
3028

0 commit comments

Comments
 (0)