# HG changeset patch
# User Willem Jan Palenstijn <wpalenst@math.leidenuniv.nl>
# Date 1251830271 -7200
# Node ID b798f140d2376b90e87d9a47ecca9561e1f8560e
# Parent c3af99971420bfdebc6097e1a7482d6e19b1f66f
Ticket 4552: Fix email address input in notebook account registration. (Based on patch by Timothy Clemans)
diff -r c3af99971420 -r b798f140d237 sage/server/notebook/twist.py
a
|
b
|
|
2039 | 2039 | is_valid_dict = {'username': is_valid_username, 'password': is_valid_password, |
2040 | 2040 | 'retype_password': do_passwords_match, 'email': is_valid_email} |
2041 | 2041 | |
2042 | | missing = [False] * len(input_boxes) |
2043 | 2042 | filled_in = {} |
2044 | 2043 | template_dict = {} |
2045 | 2044 | |
| 2045 | if notebook.conf()['email']: |
| 2046 | template_dict['email'] = True |
| 2047 | input_boxes.append('email') |
| 2048 | |
| 2049 | missing = [False] * len(input_boxes) |
| 2050 | |
2046 | 2051 | def errors_found(): |
2047 | 2052 | for key, value in filled_in.iteritems(): |
2048 | 2053 | template_dict[key] = value |
… |
… |
|
2058 | 2063 | plural = True if count > 1 else False |
2059 | 2064 | template_dict['error'] = 'Es ' if plural else 'E ' |
2060 | 2065 | |
2061 | | if notebook.conf()['email']: |
2062 | | template_dict['email'] = True |
2063 | | |
2064 | 2066 | if set(input_boxes) <= set(request.args): |
2065 | 2067 | for i, box in enumerate(input_boxes): |
2066 | 2068 | filled_in[box] = request.args[box][0] |