Changeset 1014dce in sicp
- Timestamp:
- May 14, 2015, 1:24:32 PM (9 years ago)
- Branches:
- master
- Children:
- 5936eab
- Parents:
- cf35d9b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/usuario/templates/registro.html
r5de4c2a r1014dce 15 15 {{ field }} 16 16 </div> 17 {% if field.errors %} 18 <div class="alert alert-danger" role="alert">{{ field.errors }}</div> 19 {% endif %} 17 20 </div> 18 21 </div> … … 28 31 {{ field }} 29 32 </div> 33 {% if field.errors %} 34 <div class="alert alert-danger" role="alert">{{ field.errors }}</div> 35 {% endif %} 30 36 </div> 31 37 </div> 32 38 {% endfor %} 33 39 <script type="text/javascript"> 40 /** 41 * @brief Función que actualiza la imagen captcha del formulario 42 * 43 * @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) 44 * @copyright GNU/GPLv2 45 * @date 14-05-2014 46 * @return Retorna falso en caso de no obtener respuesta del servidor, en caso contrario, muestra la nueva imagen captcha 47 */ 34 48 $('.js-captcha-refresh').click(function(){ 35 49 $form = $(this).parents('form'); 50 var url = location.protocol + "//" + window.location.hostname + ":" + location.port + "/captcha/refresh/"; 36 51 37 $.getJSON($(this).data('url'), {}, function(json) { 38 // This should update your captcha image src and captcha hidden input 52 $.getJSON(url, {}, function(json) { 53 $form.find('input[name="captcha_0"]').val(json.key); 54 $form.find('img.captcha').attr('src', json.image_url); 39 55 }); 40 56
Note: See TracChangeset
for help on using the changeset viewer.