Commit 9980f39a authored by Zack Wong's avatar Zack Wong
Browse files

fixed some account form issues

parent f6d86cd5
......@@ -64,6 +64,8 @@ class EmailForm(MyModelForm):
def clean(self):
if self['forward'].value() == True:
try:
if (len(self['email_address'].value()) == 0):
self.add_error('email_address', 'Email field cannot be left blankL.')
if (self['email_address'].value().split('@')[1] in ["ucc.asn.au", "ucc.gu.uwa.edu.au"]):
self.add_error('email_address', 'Forwarding address cannot be the same as your account address.')
except:
......@@ -76,12 +78,14 @@ class DispenseForm(MyForm):
max_length=4,
widget=forms.PasswordInput,
strip=False,
required=False,
help_text="PIN must be 4 digits long")
confirm_pin = forms.CharField(
min_length=0,
max_length=4,
widget=forms.PasswordInput,
required=False,
strip=False,
)
def clean(self):
......
......@@ -44,7 +44,7 @@
</fieldset>
<div class="submit-row">
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}"> prev </button>
<button name="wizard_goto_step" class="button" type="submit" value="{{ wizard.steps.prev }}"> prev </button>
{% endif %}
{% if wizard.steps.next %}
......@@ -60,4 +60,4 @@
</form>
</div>
{% endblock %}
\ No newline at end of file
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment