提交 01a3c574 编写于 作者: J Josh Soref 提交者: Oleg Nenashev

[JENKINS-55787] Switch labels from entry to checkbox (#3921)

* [JENKINS-55787] Switch labels from entry to checkbox

* trim

* help-boolean-default
上级 1f290ff1
......@@ -29,10 +29,10 @@ THE SOFTWARE.
<f:entry title="${%Name}" help="/help/parameter/name.html">
<f:textbox name="parameter.name" value="${instance.name}" />
</f:entry>
<f:entry title="${%Default Value}" help="/help/parameter/boolean-default.html">
<f:checkbox name="parameter.defaultValue" checked="${instance.defaultValue}" />
</f:entry>
<f:entry field="boolean-default">
<f:checkbox title="${%Default Value}" name="parameter.defaultValue" checked="${instance.defaultValue}" />
</f:entry>
<f:entry title="${%Description}" help="/help/parameter/description.html">
<f:textarea name="parameter.description" value="${instance.description}" codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription" />
</f:entry>
</j:jelly>
\ No newline at end of file
</j:jelly>
<div>
定义当前参数的默认值。
</div>
\ No newline at end of file
......@@ -27,10 +27,10 @@ THE SOFTWARE.
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
<j:set var="escapeEntryTitleAndDescription" value="false"/>
<f:entry title="${h.escape(it.name)}" description="${it.formattedDescription}">
<f:entry description="${it.formattedDescription}">
<div name="parameter">
<input type="hidden" name="name" value="${it.name}" />
<f:checkbox name="value" checked="${it.defaultValue}" />
<f:checkbox title="${h.escape(it.name)}" name="value" checked="${it.defaultValue}" />
</div>
</f:entry>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -26,8 +26,8 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
<j:set var="escapeEntryTitleAndDescription" value="false"/>
<f:entry title="${h.escape(it.name)}" description="${it.formattedDescription}">
<f:checkbox name="value" checked="${it.value}" readonly="true" />
</f:entry>
</j:jelly>
\ No newline at end of file
<j:set var="escapeEntryTitleAndDescription" value="false"/>
<f:entry>
<f:checkbox title="${h.escape(it.name)}" description="${it.formattedDescription}" name="value" checked="${it.value}" readonly="true" />
</f:entry>
</j:jelly>
......@@ -29,10 +29,10 @@ THE SOFTWARE.
<f:entry title="${%File location}" help="/help/parameter/file-name.html">
<f:textbox name="parameter.name" value="${instance.name}" />
</f:entry>
<!--f:entry title="Optional">
<f:checkbox name="parameter.optional" value="${instance.optional}" />
</f:entry-->
<!--f:entry>
<f:checkbox title="Optional" name="parameter.optional" value="${instance.optional}" />
</f:entry-->
<f:entry title="${%Description}" help="/help/parameter/description.html">
<f:textarea name="parameter.description" value="${instance.description}" codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription" />
</f:entry>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -37,8 +37,8 @@ THE SOFTWARE.
</select>
</f:entry>
<f:entry title="${%Recurse in subfolders}" field="recurse">
<f:checkbox id="recurse"/>
<f:entry field="recurse">
<f:checkbox title="${%Recurse in subfolders}" id="recurse" />
</f:entry>
<f:entry title="${%Jobs}">
......
......@@ -35,7 +35,7 @@ THE SOFTWARE.
<f:entry title="${%Description}" help="/help/parameter/description.html">
<f:textarea name="parameter.description" value="${instance.description}" codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription" />
</f:entry>
<f:entry field="trim" help="/help/parameter/trim.html">
<f:checkbox default="false" title="${%Trim the string}"/>
<f:entry field="trim">
<f:checkbox default="false" title="${%Trim the string}" />
</f:entry>
</j:jelly>
......@@ -41,11 +41,11 @@ THE SOFTWARE.
<f:entry title="${%Description}" help="/help/view-config/description.html">
<f:textarea name="description" field="description" codemirror-mode="${app.markupFormatter.codeMirrorMode}" codemirror-config="${app.markupFormatter.codeMirrorConfig}" previewEndpoint="/markupFormatter/previewDescription"/>
</f:entry>
<f:entry title="${%Filter build queue}" help="/help/view-config/filter-queue.html">
<f:checkbox name="filterQueue" field="filterQueue"/>
<f:entry field="filterQueue">
<f:checkbox title="${%Filter build queue}" help="/help/view-config/filter-queue.html" name="filterQueue" />
</f:entry>
<f:entry title="${%Filter build executors}" help="/help/view-config/filter-executors.html">
<f:checkbox name="filterExecutors" field="filterExecutors"/>
<f:entry field="filterExecutors">
<f:checkbox title="${%Filter build executors}" help="/help/view-config/filter-executors.html" name="filterExecutors" />
</f:entry>
<!-- subtypes can put entries here. -->
......@@ -62,4 +62,4 @@ THE SOFTWARE.
<st:adjunct includes="lib.form.confirm" />
</l:main-panel>
</l:layout>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -27,4 +27,4 @@ THE SOFTWARE.
<f:entry title="${%Case-sensitivity}">
<f:checkbox name="insensitiveSearch" checked="${instance.insensitiveSearch}" title="${%Insensitive search tool}"/>
</f:entry>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -2,6 +2,6 @@
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"
xmlns:f="/lib/form">
<f:entry field="allowAnonymousRead">
<f:checkbox default="true" title="${%Allow anonymous read access}"/>
<f:checkbox default="true" title="${%Allow anonymous read access}" />
</f:entry>
</j:jelly>
......@@ -26,8 +26,8 @@ l.layout(norefresh:true, permission:app.ADMINISTER, title:my.displayName, csscla
set("descriptor", my.descriptor);
f.optionalBlock( field:"useSecurity", title:_("Enable security"), checked:app.useSecurity) {
f.entry (title:_("Disable remember me"), field: "disableRememberMe") {
f.checkbox()
f.entry() {
f.checkbox(title:_("Disable remember me"), field: "disableRememberMe")
}
f.entry(title:_("Access Control")) {
......
......@@ -26,7 +26,7 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson"
xmlns:f="/lib/form">
<f:entry field="allowsSignup">
<f:checkbox default="false" title="${%Allow users to sign up}"/>
<f:checkbox default="false" title="${%Allow users to sign up}" />
</f:entry>
<j:if test="${size(h.captchaSupportDescriptors) gt 0}">
<f:entry>
......
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:entry title="" field="excludeClientIPFromCrumb">
<f:entry field="excludeClientIPFromCrumb">
<f:checkbox checked="${instance.isExcludeClientIPFromCrumb()}" title="${%Enable proxy compatibility}" />
</f:entry>
</j:jelly>
......@@ -35,7 +35,7 @@ THE SOFTWARE.
name="retentionStrategy.upTimeMins" value="${instance.upTimeMins}"
checkMessage="${%Scheduled Uptime is mandatory and must be a number.}"/>
</f:entry>
<f:entry title="${%Keep online while jobs are running}" help="/help/system-config/master-slave/demand/keepUpWhenActive.html">
<f:checkbox name="retentionStrategy.keepUpWhenActive" checked="${h.defaultToTrue(instance.keepUpWhenActive)}"/>
<f:entry>
<f:checkbox title="${%Keep online while jobs are running}" help="/help/system-config/master-slave/demand/keepUpWhenActive.html" name="retentionStrategy.keepUpWhenActive" checked="${h.defaultToTrue(instance.keepUpWhenActive)}" />
</f:entry>
</j:jelly>
......@@ -31,20 +31,20 @@ THE SOFTWARE.
<f:entry title="${%Excludes}" field="excludes">
<f:textbox />
</f:entry>
<f:entry field="allowEmptyArchive" >
<f:checkbox title="${%allowEmptyArchive}"/>
<f:entry field="allowEmptyArchive">
<f:checkbox title="${%allowEmptyArchive}" />
</f:entry>
<f:entry field="onlyIfSuccessful" >
<f:checkbox title="${%onlyIfSuccessful}"/>
<f:entry field="onlyIfSuccessful">
<f:checkbox title="${%onlyIfSuccessful}" />
</f:entry>
<f:entry field="fingerprint">
<f:checkbox title="${%Fingerprint all archived artifacts}"/>
<f:checkbox title="${%Fingerprint all archived artifacts}" />
</f:entry>
<f:entry field="defaultExcludes" >
<f:checkbox title="${%defaultExcludes}" default="true"/>
<f:entry field="defaultExcludes">
<f:checkbox title="${%defaultExcludes}" default="true" />
</f:entry>
<f:entry field="caseSensitive" >
<f:checkbox title="${%caseSensitive}" default="true"/>
<f:entry field="caseSensitive">
<f:checkbox title="${%caseSensitive}" default="true" />
</f:entry>
</f:advanced>
</j:jelly>
\ No newline at end of file
</j:jelly>
......@@ -47,11 +47,11 @@ THE SOFTWARE.
<f:entry title="${%JVM Options}" help="/plugin/maven-plugin/maven-opts.html">
<f:expandableTextbox field="jvmOptions"/>
</f:entry>
<f:entry field="injectBuildVariables" title="${%Inject build variables}">
<f:checkbox checked="${it.injectBuildVariables}"/>
<f:entry field="injectBuildVariables">
<f:checkbox title="${%Inject build variables}" checked="${it.injectBuildVariables}" />
</f:entry>
<f:entry field="usePrivateRepository" title="${%Use private Maven repository}" help="/plugin/maven-plugin/private-repository.html">
<f:checkbox checked="${it.usesPrivateRepository()}" />
<f:entry field="usePrivateRepository">
<f:checkbox title="${%Use private Maven repository}" help="/plugin/maven-plugin/private-repository.html" checked="${it.usesPrivateRepository()}" />
</f:entry>
<f:dropdownDescriptorSelector title="${%Settings file}" field="settings" default="${descriptor.defaultSettingsProvider}"/>
......
......@@ -27,8 +27,8 @@ THE SOFTWARE.
<f:entry title="${%Schedule}" help="/descriptor/hudson.triggers.TimerTrigger/help/spec">
<f:textarea field="scmpoll_spec"/>
</f:entry>
<f:entry field="ignorePostCommitHooks" title="${%Ignore post-commit hooks}">
<f:checkbox />
<f:entry field="ignorePostCommitHooks">
<f:checkbox title="${%Ignore post-commit hooks}" />
</f:entry>
<j:invokeStatic var="listeners" method="all" className="hudson.model.listeners.SCMPollListener"/>
<j:forEach var="l" items="${listeners}">
......
......@@ -3,7 +3,7 @@ package jenkins.security.DownloadSettings
def f = namespace(lib.FormTagLib)
f.section(title:_("Plugin Manager")) {
f.entry(field: "useBrowser") {
f.checkbox(title: _("Use browser for metadata download"))
}
f.entry() {
f.checkbox(field: "useBrowser", title: _("Use browser for metadata download"))
}
}
......@@ -11,7 +11,6 @@ f.entry(title:_("description"), field:"description") {
f.textbox()
}
f.entry(title:_("forceExistingJobs"), field:"forceExistingJobs") {
f.checkbox(name:"forceExistingJobs")
f.entry() {
f.checkbox(title:_("forceExistingJobs"), field:"forceExistingJobs")
}
......@@ -27,13 +27,13 @@ THE SOFTWARE.
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:section title="${%API Token}">
<f:entry field="tokenGenerationOnCreationEnabled">
<f:checkbox title="${%tokenGenerationOnCreationEnabled}"/>
<f:checkbox title="${%tokenGenerationOnCreationEnabled}" />
</f:entry>
<f:entry field="creationOfLegacyTokenEnabled">
<f:checkbox title="${%creationOfLegacyTokenEnabled}"/>
<f:checkbox title="${%creationOfLegacyTokenEnabled}" />
</f:entry>
<f:entry field="usageStatisticsEnabled">
<f:checkbox title="${%usageStatisticsEnabled}"/>
<f:checkbox title="${%usageStatisticsEnabled}" />
</f:entry>
</f:section>
</j:jelly>
......@@ -24,8 +24,8 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:entry title="${%Disable WorkDir}" field="disabled">
<f:checkbox/>
<f:entry field="disabled">
<f:checkbox title="${%Disable WorkDir}" />
</f:entry>
<f:entry title="${%Custom WorkDir path}" field="workDirPath">
<f:textbox/>
......@@ -33,7 +33,7 @@ THE SOFTWARE.
<f:entry title="${%Internal data directory}" field="internalDir">
<f:textbox default="remoting"/>
</f:entry>
<f:entry title="${%Fail if workspace is missing}" field="failIfWorkDirIsMissing">
<f:checkbox/>
<f:entry field="failIfWorkDirIsMissing">
<f:checkbox title="${%Fail if workspace is missing}" />
</f:entry>
</j:jelly>
......@@ -73,7 +73,7 @@ public class ParametersTest {
System.out.println(o);
HtmlCheckBoxInput booleanParameterInput = (HtmlCheckBoxInput) o;
assertEquals(true, booleanParameterInput.isChecked());
assertEquals("boolean", ((HtmlElement) DomNodeUtil.selectSingleNode(element, "td[@class='setting-name']")).getTextContent());
assertEquals("boolean", ((HtmlElement) DomNodeUtil.selectSingleNode(element, "td[@class='setting-main']")).getTextContent());
element = DomNodeUtil.selectSingleNode(form, ".//tr[td/div/input/@value='choice']");
assertNotNull(element);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册