Commit d0f24f9ef66e5d2ab970abae5197b69d592071ff
1 parent
135985e556
Exists in
master
corregido error con los id a la hora de elminar con ajax los posibles jurados del ascneso
Showing
1 changed file
with
5 additions
and
4 deletions
Show diff stats
app/Resources/views/cea/ascenso_mostar.html.twig
@@ -280,17 +280,18 @@ | @@ -280,17 +280,18 @@ | ||
280 | 280 | ||
281 | <script> | 281 | <script> |
282 | var cantidad = $("#falta").data('faltaid'); | 282 | var cantidad = $("#falta").data('faltaid'); |
283 | - $("#seccion_jurados").on("click", ".eliminar_jurado", function(){ | 283 | + $("#seccion_jurados").on("click", ".eliminar_jurado", function(){ |
284 | + var eliminado = $(this).attr('id'); | ||
284 | $.ajax({ | 285 | $.ajax({ |
285 | method: "POST", | 286 | method: "POST", |
286 | url: "{{ url('ajax_eliminar_tutor') }}", | 287 | url: "{{ url('ajax_eliminar_tutor') }}", |
287 | async: true, | 288 | async: true, |
288 | cache: false, | 289 | cache: false, |
289 | - data: ({ eliminar: $(this).attr('id'), ascensoId: {{ ascenso.id }} }), | 290 | + data: ({ eliminar: eliminado, ascensoId: {{ ascenso.id }} }), |
290 | success: function (data) { | 291 | success: function (data) { |
291 | alert(cantidad); | 292 | alert(cantidad); |
292 | - console.log(data); | ||
293 | - $("#well_" + $(".eliminar_jurado").attr('id')).remove(); | 293 | + console.log("esto es id: " + eliminado); |
294 | + $("#well_" + eliminado).remove(); | ||
294 | cantidad = cantidad + 1; | 295 | cantidad = cantidad + 1; |
295 | $("#add_tutor_tutores_ascenso").chosen('destroy').chosen({ max_selected_options: cantidad }); | 296 | $("#add_tutor_tutores_ascenso").chosen('destroy').chosen({ max_selected_options: cantidad }); |
296 | 297 |