diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm
index 8655bea8..5ee9cd5f 100644
--- a/src/lib/Hydra/Controller/Jobset.pm
+++ b/src/lib/Hydra/Controller/Jobset.pm
@@ -115,7 +115,7 @@ sub edit : Chained('jobset') PathPart Args(0) {
requireProjectOwner($c, $c->stash->{project});
- $c->stash->{template} = 'jobset.tt';
+ $c->stash->{template} = 'edit-jobset.tt';
$c->stash->{edit} = 1;
}
@@ -235,8 +235,8 @@ sub updateJobset {
, description => trim($c->request->params->{"description"})
, nixexprpath => $nixExprPath
, nixexprinput => $nixExprInput
- , enabled => trim($c->request->params->{enabled}) eq "1" ? 1 : 0
- , enableemail => trim($c->request->params->{enableemail}) eq "1" ? 1 : 0
+ , enabled => defined $c->request->params->{enabled} ? 1 : 0
+ , enableemail => defined $c->request->params->{enableemail} ? 1 : 0
, emailoverride => trim($c->request->params->{emailoverride}) || ""
, keepnr => trim($c->request->params->{keepnr}) || 3
});
diff --git a/src/lib/Hydra/Controller/Project.pm b/src/lib/Hydra/Controller/Project.pm
index 36cfbe0b..905b6e09 100644
--- a/src/lib/Hydra/Controller/Project.pm
+++ b/src/lib/Hydra/Controller/Project.pm
@@ -110,7 +110,7 @@ sub create_jobset : Chained('project') PathPart('create-jobset') Args(0) {
requireProjectOwner($c, $c->stash->{project});
- $c->stash->{template} = 'jobset.tt';
+ $c->stash->{template} = 'edit-jobset.tt';
$c->stash->{create} = 1;
$c->stash->{edit} = 1;
}
diff --git a/src/root/common.tt b/src/root/common.tt
index 1e60cd01..ede0f0a8 100644
--- a/src/root/common.tt
+++ b/src/root/common.tt
@@ -196,11 +196,6 @@ BLOCK maybeLink;
END;
-BLOCK maybeButton;
- IF uri %] uri); IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END; content %][% ELSE; content; END;
-END;
-
-
BLOCK renderSelection;
IF edit;
IF radiobuttons; %]
@@ -227,21 +222,8 @@ BLOCK renderSelection;
END;
-BLOCK maybeEditString;
- IF edit %]
- param, name => param, value => value) %] />
- [% ELSE;
- HTML.escape(value);
- END;
-END;
-
-
-BLOCK editString;
- IF edit %]
- param, name => param, value => value) %] />
- [% ELSE;
- HTML.escape(value);
- END;
+BLOCK editString; %]
+ param, name => param, value => value) %] />
END;
diff --git a/src/root/edit-jobset.tt b/src/root/edit-jobset.tt
new file mode 100644
index 00000000..83bcd025
--- /dev/null
+++ b/src/root/edit-jobset.tt
@@ -0,0 +1,143 @@
+[% WRAPPER layout.tt title=(create ? "Create jobset in project $project.name" : "Editing jobset $project.name:$jobset.name") %]
+[% PROCESS common.tt %]
+
+[% BLOCK renderInputAlt %]
+
+ alt.value, name => name) %]>
+
+[% END %]
+
+[% BLOCK renderInput %]
+
Input name | Type | Values |
---|---|---|
+ |