Fixes #150.
UQA4FMUAWSGCX33ZN5R5UC25QZTJ2X6DMP4L7XDFNMHC5QYHR2CQC
UOINKJ2JBCRTZPFTAXDPRJOEUWWPJ43IGVWLRIRLIGHLBMWDOGDQC
LUYDIGYMZFHTN2SU76XUK76E2FMXY6LXH2MYOPBCPI4AOI2RB2SQC
ODNCGFQ5FPKFI624BVMLW7PJ2EFJOR3TY66OCZM42UNNTWBCF2TQC
ZFEN2MAOJRRQEIORSK2N6PNAWGBEN2WNAWA6IWUVOHP5I5PQC6JAC
3HZY24CX4U2TO74HOY4YX3LBJIYF4DLXHCIY7J2RASAC4COMSMZAC
GEADFVZ5LXXFIE3VIP4UJ4AEI2VX57DXER47JA4IHH5BG3QNPAEAC
T273UOB7WVB3NK52EBN65FQR6XP746D3BZM5SOYXEV6NCARIRYOQC
U4TD3AIQXBJFFUORTMIC4IHZTVBORRKL2TZ2FSP4G665ECZOEMNAC
FPK5LF53CFUEKFYJ3IYXT4UTVC6IITWJOCFATMC4PLHEUP5SIEAAC
OX6NYJDVCDX2UCJ4QQMTRJVZ535NOMCJGYCHDLCADJPQI7RMCXPQC
OK4P3AMKXIBSUNL4ABLFKTK3UBFLINDINBPZVP5OSHLRSV44BICAC
RQI3GRC6NSTPQMBTTOM37ITBZQIROTIGAIPDCVZ672TSEJVECB2AC
VJFLX7B6DEYXQRS3T5LHOM4POSGMEBQSJJVBHAQV3U4LRPF4KVBAC
NIX2TKYVRRIQNW447RY2HKV6LMGWJIROXBWPMGAY744PI4OTST6AC
TQVKZQUGCFYNH5P56LXMXRXZNTD56MH5T5GX2BMQ5YSRPGHAUYMAC
6HWHYPSW4Y2QBY3OWAJYEOOVICFFIWSL5OEAU2ZMLD3H4NXXKBOAC
[% WRAPPER layout.tt title=(create ? "Create jobset in project $project.name" : clone ? "Cloning jobset $project.name:$jobset.name" : "Editing jobset $project.name:$jobset.name") %]
[% WRAPPER layout.tt title=
(create ? "Creating jobset in project $project.name" :
createFromEval ? "Creating jobset from evaluation $eval.id of $project.name:$jobset.name" :
cloneJobset ? "Cloning jobset $project.name:$jobset.name" :
"Editing jobset $project.name:$jobset.name") %]
[% alt = input.search_related('jobsetinputalts', {altnr => 0}) %]
<input style="width: 95%" type="text" [% HTML.attributes(value => alt.value, id => "$baseName-value", name => "$baseName-value") %]/>
[% IF input.jobsetinputalts_rs.count > 1 %]
[% IF createFromEval %]
[% value = (input.uri or input.value); IF input.revision; value = value _ " " _ input.revision; END;
warn = input.altnr != 0;
%]
[% ELSE %]
[% alt = input.search_related('jobsetinputalts', {altnr => 0});
value = alt.value
warn = input.jobsetinputalts_rs.count > 1;
%]
[% END %]
[% IF warn %]
<button id="submit-jobset" type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> [%IF create || clone %]Create jobset[% ELSE %]Apply changes[% END %]</button>
<button id="submit-jobset" type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> [%IF !edit %]Create jobset[% ELSE %]Apply changes[% END %]</button>