|
|
|
|
@ -272,7 +272,7 @@ |
|
|
|
|
$.each(json.results, function (i, v) { |
|
|
|
|
if (v.status == "not_agreed") { |
|
|
|
|
htmlInbox += '<div class="numberStepp box-sizing">' + |
|
|
|
|
'<p>Этап</p><form class="update-stages-form" id="stage-form-'+ v.pos +'">' + |
|
|
|
|
'<p>Этап</p><form class="update-stages-form" data-order-id="'+ v.order +'" id="stage-form-'+ v.pos +'">' + |
|
|
|
|
'<label for="">Название</label><input class="form-control" type="text" name="name" value="'+ v.name +'" />' + |
|
|
|
|
'<label for="">Цена</label><input class="form-control" type="text" name="cost" value="'+ v.cost +'" />' + |
|
|
|
|
'<input class="form-control" type="hidden" name="order" value="'+ v.order +'" />' + |
|
|
|
|
@ -334,6 +334,8 @@ |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$(".update-stages-form").each(function(i,v){ |
|
|
|
|
var currentStageId = parseInt($(this).attr('data-order-id')); |
|
|
|
|
alert(currentStageId); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '/api/stages/' + currentStageId + '/', |
|
|
|
|
type: 'PUT', |
|
|
|
|
@ -345,10 +347,14 @@ |
|
|
|
|
success: function(json){ |
|
|
|
|
console.log(json); |
|
|
|
|
}, |
|
|
|
|
error: function(e){ |
|
|
|
|
console.log('error'); |
|
|
|
|
console.log(e); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var currentOrderId = $(this).attr('data-order-id'); |
|
|
|
|
|