From 58ad3b4b6ce565a269dc77cb0ac703942d70b00d Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Mon, 7 Oct 2013 10:46:10 -0400 Subject: [PATCH] Enable setting checkresponsible in the edit jobset form Signed-off-by: Shea Levy --- src/lib/Hydra/Controller/Jobset.pm | 6 +++++- src/root/edit-jobset.tt | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index 6a2090b2..0fa18717 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -229,7 +229,11 @@ sub updateJobset { error($c, "Invalid input name ‘$name’.") unless $name =~ /^[[:alpha:]][\w-]*$/; error($c, "Invalid input type ‘$type’.") unless defined $c->stash->{inputTypes}->{$type}; - my $input = $jobset->jobsetinputs->create({ name => $name, type => $type }); + my $input = $jobset->jobsetinputs->create({ + name => $name, + type => $type, + checkresponsible => $c->stash->{params}->{"input-$baseName-checkresponsible"} + }); # Set the values for this input. my @values = ref($values) eq 'ARRAY' ? @{$values} : ($values); diff --git a/src/root/edit-jobset.tt b/src/root/edit-jobset.tt index bf7e94d3..47213f11 100644 --- a/src/root/edit-jobset.tt +++ b/src/root/edit-jobset.tt @@ -25,20 +25,23 @@ [% END %] [% IF edit %][% END %] + + + [% END %] [% BLOCK renderJobsetInputs %] - + [% FOREACH input IN jobset.jobsetinputs %] [% INCLUDE renderJobsetInput input=input baseName="input-$input.name" %] [% END %] - +
Input nameTypeValues
Input nameTypeValuesCheck for responsible commits?
@@ -164,6 +167,7 @@ var x = $("#input-template").clone(true).attr("id", "").insertBefore($(this).parents("tr")).show(); $("#input-template-name", x).attr("name", newid + "-name"); $("#input-template-type", x).attr("name", newid + "-type"); + $("#input-template-checkresponsible", x).attr("name", newid + "-checkresponsible"); $("#input-template", x).attr("id", newid); return false; });