Use redirectJSON
This commit is contained in:
parent
c4e39d4769
commit
854d419b2c
|
@ -174,17 +174,14 @@
|
|||
});
|
||||
|
||||
$("#submit-jobset").click(function() {
|
||||
requestJSON({
|
||||
redirectJSON({
|
||||
[% IF create || clone %]
|
||||
url: "[% c.uri_for('/jobset' project.name '.new') %]",
|
||||
[% ELSE %]
|
||||
url: "[% c.uri_for('/jobset' project.name jobset.name) %]",
|
||||
[% END %]
|
||||
data: $(this).parents("form").serialize(),
|
||||
type: 'PUT',
|
||||
success: function(data) {
|
||||
window.location = data.redirect;
|
||||
},
|
||||
type: 'PUT'
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
|
|
@ -66,17 +66,14 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
$("#submit-project").click(function() {
|
||||
requestJSON({
|
||||
redirectJSON({
|
||||
[% IF create %]
|
||||
url: "[% c.uri_for('/project' '.new') %]",
|
||||
[% ELSE %]
|
||||
url: "[% c.uri_for('/project' project.name) %]",
|
||||
[% END %]
|
||||
data: $(this).parents("form").serialize(),
|
||||
type: 'PUT',
|
||||
success: function(data) {
|
||||
window.location = data.redirect;
|
||||
},
|
||||
type: 'PUT'
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue