ZRRPBEI4ZSISCMWV62JGB35QNRJVA7SZUR4F52WTQRECCG2GCEAQC
TNMOG2ZQTXJJ6TEPEDB6D4XPIIGMAV3DUDWO33WD23CGDVT4LO2QC
OX6NYJDVCDX2UCJ4QQMTRJVZ535NOMCJGYCHDLCADJPQI7RMCXPQC
ODNCGFQ5FPKFI624BVMLW7PJ2EFJOR3TY66OCZM42UNNTWBCF2TQC
UMFB2767NMAG46NAG3XHMYQMCLF5TMVN46SST4AM2CFUEMNZH3WQC
3HZY24CX4U2TO74HOY4YX3LBJIYF4DLXHCIY7J2RASAC4COMSMZAC
QTFVCDIFHTF36AGU4UGNCTWSHQYTM2KERXS26TPAJK7IDJHL7BVAC
LZO3C2KIACZ3HN72RBGWWIT5ED4RJMYKI3SAHXT6RIUPHDFL3STQC
3PNG7NIBQQURUUPRVQXYL342OT7JUUYOMY2JJNP6YDX7SYJDZMYAC
JARRBLZDQ2JZWY7IUVPTOT7WJMBPMLFLF2MGLVGOYROAAISYGLSAC
FPK5LF53CFUEKFYJ3IYXT4UTVC6IITWJOCFATMC4PLHEUP5SIEAAC
I4K2UPCWTK4EEPPQYBZ6UEGLF2HIUR5X6GJH34JEKPVKRBVWFCVAC
TLJC6BJ3W4IGAKOG65VHAR2YICD63W3VELJBBWTIKDJ7FCMFAUPAC
QL55ECJ6KMMBUOWQ6LKSOVN7L43CH4S6SPE2AQ3VX3KSGC32RP4AC
}
sub delete : Chained('jobset') PathPart Args(0) {
my ($self, $c) = @_;
requireProjectOwner($c, $c->stash->{project});
requirePost($c);
txn_do($c->model('DB')->schema, sub {
$c->stash->{jobset}->delete;
});
$c->res->redirect($c->uri_for($c->controller('Project')->action_for("view"),
[$c->stash->{project}->name]));
[% IF !create %]
<button id="delete-jobset" type="submit" class="btn btn-danger" name="submit" value="delete">
<i class="icon-trash icon-white"></i>
Delete this jobset
</button>
<script type="text/javascript">
$("#delete-jobset").click(function() {
return confirm("Are you sure you want to delete this jobset?");
});
</script>
[% END %]
<form id="delete-jobset" method="post" action="[% c.uri_for('/jobset' project.name jobset.name 'delete') %]" class="hidden"></form>
<script>
function confirmDeleteJobset() {
bootbox.confirm(
'Are you sure you want to delete this jobset?',
function(del) { if (del) $('#delete-jobset').submit(); });
return;
};
</script>
[% INCLUDE menuItem title="Delete" uri = "javascript:confirmDeleteJobset()" %]