diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm
index 0c53a1cf..a56af5a8 100644
--- a/src/lib/Hydra/Controller/Jobset.pm
+++ b/src/lib/Hydra/Controller/Jobset.pm
@@ -244,25 +244,20 @@ sub updateJobset {
foreach my $name (keys %{$c->stash->{params}->{inputs}}) {
my $inputData = $c->stash->{params}->{inputs}->{$name};
my $type = $inputData->{type};
- my $values = $inputData->{values};
+ my $value = $inputData->{value};
my $emailresponsible = defined $inputData->{emailresponsible} ? 1 : 0;
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,
- emailresponsible => $emailresponsible
+ my $input = $jobset->jobsetinputs->create(
+ { name => $name,
+ type => $type,
+ emailresponsible => $emailresponsible
});
- # Set the values for this input.
- my @values = ref($values) eq 'ARRAY' ? @{$values} : ($values);
- my $altnr = 0;
- foreach my $value (@values) {
- $value = checkInputValue($c, $name, $type, $value);
- $input->jobsetinputalts->create({altnr => $altnr++, value => $value});
- }
+ $value = checkInputValue($c, $name, $type, $value);
+ $input->jobsetinputalts->create({altnr => 0, value => $value});
}
}
diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm
index e3ebae80..82fe939c 100644
--- a/src/lib/Hydra/Helper/CatalystUtils.pm
+++ b/src/lib/Hydra/Helper/CatalystUtils.pm
@@ -22,7 +22,7 @@ our @EXPORT = qw(
sendEmail
paramToList
backToReferer
- $pathCompRE $relPathRE $relNameRE $projectNameRE $jobsetNameRE $jobNameRE $systemRE $userNameRE
+ $pathCompRE $relPathRE $relNameRE $projectNameRE $jobsetNameRE $jobNameRE $systemRE $userNameRE $inputNameRE
@buildListColumns
parseJobsetName
showJobName
@@ -235,6 +235,7 @@ Readonly our $jobsetNameRE => "(?:[A-Za-z_][A-Za-z0-9-_\.]*)";
Readonly our $jobNameRE => "(?:$attrNameRE(?:\\.$attrNameRE)*)";
Readonly our $systemRE => "(?:[a-z0-9_]+-[a-z0-9_]+)";
Readonly our $userNameRE => "(?:[a-z][a-z0-9_\.]*)";
+Readonly our $inputNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)";
sub parseJobsetName {
diff --git a/src/root/edit-jobset.tt b/src/root/edit-jobset.tt
index 51775fdf..b860573d 100644
--- a/src/root/edit-jobset.tt
+++ b/src/root/edit-jobset.tt
@@ -2,28 +2,25 @@
[% PROCESS common.tt %]
[% USE format %]
-[% BLOCK renderJobsetInputAlt %]
-
- alt.value, name => name) %]/>
-
-[% END %]
-
[% BLOCK renderJobsetInput %]
Input name | Type | Values | Notify committers | |
---|---|---|---|---|
Input name | Type | Value | Notify committers |