Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1.0 KiB

5 years ago
  1. {% extends '@SonataAdmin/CRUD/base_edit.html.twig' %}
  2. {% block javascripts %}
  3. {{ parent() }}
  4. <script>
  5. $(function() {
  6. let convocatoria, proceso;
  7. $(".sel-convocatoria").change(function () {
  8. convocatoria = $(this).val();
  9. if(convocatoria && proceso){
  10. reloadEntrepreneurs();
  11. }
  12. });
  13. $(".sel-proceso").change(function () {
  14. proceso = $(this).val();
  15. if(convocatoria && proceso){
  16. reloadEntrepreneurs();
  17. }
  18. });
  19. function reloadEntrepreneurs(){
  20. var data = { convocatoria: convocatoria, proceso:proceso}
  21. $("select.sel-entrepreneur").val(null).trigger('change');
  22. $.get("{{ path('admin_app_workshop_getEntrepreneur') }}",data).then(function (response) {
  23. $("select.sel-entrepreneur").html(response).select2('enable');
  24. });
  25. }
  26. });
  27. </script>
  28. {% endblock %}