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.
29 lines
1.0 KiB
29 lines
1.0 KiB
{% extends '@SonataAdmin/CRUD/base_edit.html.twig' %}
|
|
|
|
{% block javascripts %}
|
|
{{ parent() }}
|
|
<script>
|
|
$(function() {
|
|
let convocatoria, proceso;
|
|
$(".sel-convocatoria").change(function () {
|
|
convocatoria = $(this).val();
|
|
if(convocatoria && proceso){
|
|
reloadEntrepreneurs();
|
|
}
|
|
});
|
|
$(".sel-proceso").change(function () {
|
|
proceso = $(this).val();
|
|
if(convocatoria && proceso){
|
|
reloadEntrepreneurs();
|
|
}
|
|
});
|
|
function reloadEntrepreneurs(){
|
|
var data = { convocatoria: convocatoria, proceso:proceso}
|
|
$("select.sel-entrepreneur").val(null).trigger('change');
|
|
$.get("{{ path('admin_app_workshop_getEntrepreneur') }}",data).then(function (response) {
|
|
$("select.sel-entrepreneur").html(response).select2('enable');
|
|
});
|
|
}
|
|
});
|
|
</script>
|
|
{% endblock %}
|