From cfe1255432388fc65772b4dde67baf4a613e3af9 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Mon, 23 Jul 2012 20:03:38 -0400 Subject: [PATCH] Updated error messages for missing signup fields. --- common/djangoapps/student/views.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 0f6ffd6fdd..d0da67f247 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -261,13 +261,13 @@ def create_account(request, post_override=None): # TODO: Check password is sane for a in ['username', 'email', 'name', 'password', 'terms_of_service', 'honor_code']: if len(post_vars[a]) < 2: - error_str = {'username' : 'Username of length 2 or greater', - 'email' : 'Properly formatted e-mail', - 'name' : 'Your legal name ', - 'password': 'Valid password ', - 'terms_of_service': 'Accepting Terms of Service', - 'honor_code': 'Agreeing to the Honor Code'} - js['value']="{field} is required.".format(field=error_str[a]) + error_str = {'username' : 'Username must be minimum of two characters long.', + 'email' : 'A properly formatted e-mail is required.', + 'name' : 'Your legal name must be a minimum of two characters long.', + 'password': 'A valid password is required.', + 'terms_of_service': 'Accepting Terms of Service is required.', + 'honor_code': 'Agreeing to the Honor Code is required.'} + js['value']= error_str[a] return HttpResponse(json.dumps(js)) try: