make registration errors always shown

remotes/origin/HEAD
ya_dim4ik 9 years ago
parent a4849d9b39
commit 7d9204c307
  1. 4
      registration/models.py
  2. 5
      static/client/js/_modules/block.common.js
  3. 2
      static/client/js/main.js
  4. 2
      static/client/js/vendor.js
  5. 2
      static/client/js_min/_modules/block.common.min.js
  6. 2
      static/client/js_min/vendor.min.js

@ -2,6 +2,8 @@ import datetime
import hashlib
import random
import re
import os
from django.core.mail import EmailMessage
from django.conf import settings
from django.contrib.auth.models import User
@ -279,7 +281,7 @@ class RegistrationProfile(models.Model):
('/img/soc-medias/sm-icon-twit.png', 'twit'),
('/img/mail-logo-2.jpg','logo2'))
for img in images:
fp = open(settings.STATIC_ROOT+img[0], 'rb')
fp = open(os.path.join(settings.STATIC_ROOT, img[0]), 'rb')
msg_img = MIMEImage(fp.read())
fp.close()
msg_img.add_header('Content-ID', '<'+img[1]+'>')

@ -304,11 +304,12 @@ if (EXPO.common){
// delete previous error messages
$(".error", $form).remove();
$(".required.err", $form).removeClass("required err");
$('.has_error', $form).removeClass('has_error');
$(".pwf-line .msg-help",$form).each(function () {
var $this = $(this),
defaultT = $this.attr("data-default");
if($.trim(defaultT) != ''){
$this.html('').text(defaultT);
$this.html('').text(defaultT).hide();
}
});
@ -317,8 +318,10 @@ if (EXPO.common){
$error = $("<div/>").attr("class", "error").append(value),
$msg = $input.closest(".pwf-line").find(".msg-help");
$input.parent().addClass('required err');
$input.parents('.pwf-line').addClass('has_error');
$msg.attr("data-default", $msg.text());
$msg.text('').prepend($error);
$msg.show();
});
}

@ -666,7 +666,7 @@ function placeInput(width){
var $input = $(this);
var $fLine = $input.closest(".pwf-line");
var $help = $fLine.find('div.msg-help');
if ($help.is(':visible')) {
if ($help.is(':visible') && !$fLine.hasClass('has_error')) {
$help.fadeOut(300);
}
});

@ -4345,7 +4345,7 @@ function placeInput(width){
var $input = $(this);
var $fLine = $input.closest(".pwf-line");
var $help = $fLine.find('div.msg-help');
if ($help.is(':visible')) {
if ($help.is(':visible') && !$fLine.hasClass('has_error')) {
$help.fadeOut(300);
}
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save