Skip to content

Commit

Permalink
agregando select despues de enviar el form
Browse files Browse the repository at this point in the history
  • Loading branch information
eos87 committed Feb 6, 2011
1 parent 8757560 commit 44a4c67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion encuesta/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class InfluenciaForm(forms.Form):
tipo = forms.MultipleChoiceField(choices=TIPO_CHOICE, label='Modalidad de apoyo')
organizacion = forms.ModelMultipleChoiceField(queryset=Organizacion.objects.all(), label='Organizaciones')#, widget=forms.CheckboxSelectMultiple)
organizacion = forms.ModelMultipleChoiceField(queryset=None, label='Organizaciones')#, widget=forms.CheckboxSelectMultiple)
resultado = forms.ModelMultipleChoiceField(queryset=Resultado.objects.all(), label='Resultados')
periodo = forms.MultipleChoiceField(choices=CHOICE_PERIODO, label='Período')
anio = forms.ChoiceField(choices=CHOICE_ANIO, label='Año')
Expand Down
5 changes: 4 additions & 1 deletion templates/fed/indicadores.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
verificar();
$("#id_tipo").change(function() {
verificar();
});
});

$('#select_organizacion').click(function(){
$('#id_organizacion option').each(function(){
Expand Down Expand Up @@ -64,6 +64,9 @@
$('#id_organizacion').append($('<option></option>').val(item.id).html(item.nombre_corto));
});
}
{% for o in orgs_aux %}
$('#id_organizacion option[value={{o.id}}]').attr('selected', true);
{% endfor %}
});
}else{
verificar();
Expand Down

0 comments on commit 44a4c67

Please sign in to comment.