Skip to content
Permalink
Browse files

Fix JENKINS-22933

Fixed logic that loads the templates for saved jobs.
  • Loading branch information...
slide committed Nov 16, 2014
1 parent adc5aa9 commit 292b9a01e1244e98d8578641d96c5a6cccca3e04
@@ -7,20 +7,15 @@ t = namespace("/lib/hudson")
f = namespace("/lib/form")
d = namespace("jelly:define")


def configured = instance != null

f.entry(title: _("Templates"), description: _("The templates to use for sending emails")) {
f.repeatable(var: "template", noAddButton: true, minimum:1, name:"templateIds") {
f.repeatable(items: instance?.templateIds, var: "template", noAddButton: true, minimum:1, name:"templateIds") {
table(width: "100%") {
f.entry {
select(name:"templateId") {
descriptor.templates.each { aTemplate ->
if(template != null && template.templateId==aTemplate.id) {
option(value: aTemplate.id, selected: "selected", "${aTemplate.name} - ${aTemplate.description}")
} else {
option(value: aTemplate.id, "${aTemplate.name} - ${aTemplate.description}")
}
f.option(value: aTemplate.id, selected: (template != null && template.templateId==aTemplate.id), "${aTemplate.name} - ${aTemplate.description}")
}
}
}

0 comments on commit 292b9a0

Please sign in to comment.
You can’t perform that action at this time.