Conjunto 96973f4 en sapic
- Fecha y hora:
- 13/09/2018 18:58:45 (hace 6 años)
- Branches:
- master
- Children:
- b20cf64, a192369, 897e8e0
- Parents:
- 1c21737
- Ficheros:
-
- 2 editados
Leyenda
- No modificado
- Añadido
- Eliminado
-
explicacion_situacional/forms.py
r39b8a44 r96973f4 129 129 """ 130 130 131 respuesta = forms.BooleanField(label ='Respuesta',132 widget =forms.Select(choices=((True,'Si'),131 respuesta = forms.BooleanField(label = 'Respuesta', 132 widget = forms.Select(choices = ((True,'Si'), 133 133 (False,'No') 134 134 ) 135 135 ), 136 required =False136 required = False 137 137 ) 138 justificacion = forms.CharField(label ='Respuesta',139 widget =forms.Textarea(),140 required =False,141 m in_length = 128,138 justificacion = forms.CharField(label = 'Respuesta', 139 widget = forms.Textarea(), 140 required = False, 141 max_length = 2000, 142 142 ) 143 143 … … 183 183 """ 184 184 185 respuesta = forms.CharField(label ='Respuesta',186 widget =forms.Textarea(),187 m in_length=128185 respuesta = forms.CharField(label = 'Respuesta', 186 widget = forms.Textarea(), 187 max_length = 2000, 188 188 ) 189 189 … … 213 213 respuesta = forms.ModelChoiceField(label = 'Opcion', 214 214 queryset = Opcion.objects.all(), 215 required =True,216 empty_label =None215 required = True, 216 empty_label = None 217 217 ) 218 218 -
static/js/funciones.js
r1c21737 r96973f4 15 15 var text_area = $(value).parent().parent().find('textarea'); 16 16 not_empty = $(text_area).val().trim() !== '' ? 1:0; 17 not_empty = $(text_area).val().length >= 1 28&& $(text_area).val().length <= 2000 ? 1:0;18 if ($(text_area).val().length < 128 || $(text_area).val().length>2000) {19 bootbox.alert("La longitud de la respuesta debe estar entre 128 y2000 cáracteres");17 not_empty = $(text_area).val().length >= 1 && $(text_area).val().length <= 2000 ? 1:0; 18 if ($(text_area).val().length >2000) { 19 bootbox.alert("La longitud de la respuesta debe ser menor a 2000 cáracteres"); 20 20 } 21 21 } … … 28 28 if (name.search('abierta')!==-1) { 29 29 not_empty = $(value).val().trim() !== '' ? 1:not_empty; 30 not_empty = $(value).val().length >= 1 28&& $(value).val().length <= 2000 ? 1:0;31 if ($(value).val().length < 128 || $(value).val().length>2000) {32 bootbox.alert("La longitud de la respuesta debe estar entre 128 y2000 cáracteres");30 not_empty = $(value).val().length >= 1 && $(value).val().length <= 2000 ? 1:0; 31 if ($(value).val().length >2000) { 32 bootbox.alert("La longitud de la respuesta debe ser menor a 2000 cáracteres"); 33 33 } 34 34 }
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.