Disabled copy/paste in confirm email

Created sorting for email field

updated tests

Fixed sorting issue in registration form

Fixed sorting issue in registration form

Fixed sorting issue in registration form

Added missing items in env and updated order logic

Added missing items in env and updated order logic
This commit is contained in:
Ahtisham Shahid
2020-04-17 14:17:34 +05:00
parent a9efd30c4c
commit 8af94ec72a
3 changed files with 9 additions and 3 deletions

View File

@@ -2815,6 +2815,8 @@ REGISTRATION_FIELD_ORDER = [
"gender",
"year_of_birth",
"level_of_education",
"specialty",
"profession"
"company",
"title",
"mailing_address",

View File

@@ -274,6 +274,9 @@
handleInputBehavior($input);
}
});
$('#register-confirm_email').bind('cut copy paste', function(e) {
e.preventDefault();
});
setTimeout(handleAutocomplete, 1000);
},

View File

@@ -350,10 +350,11 @@ class RegistrationFormFactory(object):
field_order = configuration_helpers.get_value('REGISTRATION_FIELD_ORDER')
if not field_order:
field_order = settings.REGISTRATION_FIELD_ORDER or valid_fields
# Check that all of the valid_fields are in the field order and vice versa, if not set to the default order
# Check that all of the valid_fields are in the field order and vice versa,
# if not append missing fields at end of field order
if set(valid_fields) != set(field_order):
field_order = valid_fields
difference = set(valid_fields).difference(set(field_order))
field_order.extend(difference)
self.field_order = field_order