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 | 280 | |
| 281 | 281 | <script> |
| 282 | 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 | 285 | $.ajax({ |
| 285 | 286 | method: "POST", |
| 286 | 287 | url: "{{ url('ajax_eliminar_tutor') }}", |
| 287 | 288 | async: true, |
| 288 | 289 | cache: false, |
| 289 | - data: ({ eliminar: $(this).attr('id'), ascensoId: {{ ascenso.id }} }), | |
| 290 | + data: ({ eliminar: eliminado, ascensoId: {{ ascenso.id }} }), | |
| 290 | 291 | success: function (data) { |
| 291 | 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 | 295 | cantidad = cantidad + 1; |
| 295 | 296 | $("#add_tutor_tutores_ascenso").chosen('destroy').chosen({ max_selected_options: cantidad }); |
| 296 | 297 | ... | ... |