diff --git a/scribeengine/controllers/account.py b/scribeengine/controllers/account.py
index 74ac213..4166965 100644
--- a/scribeengine/controllers/account.py
+++ b/scribeengine/controllers/account.py
@@ -46,23 +46,39 @@ class AccountController(BaseController):
c.timezones = all_timezones
return render(u'/account/index.mako')
+ @jsvalidate(u'account-account')
+ def index_jsschema(self):
+ return {
+ u'account-nick': JSString(required=True,
+ message=u'You need to type in a nick.'),
+ u'account-email': JSEmail(required=True,
+ message=u'You need to supply a valid e-mail address.')
+ }
+
def register(self):
c.page_title = u'Register'
return render(u'/account/register.mako')
- @jsvalidate(u'register-form')
+ @jsvalidate(u'account-register')
def register_jsschema(self):
return {
- u'register-email': JSEmail(required=True, message=u'You haven\'t typed in an e-mail address.'),
- u'register-password': JSString(required=True, message=u'You haven\'t typed in a password.'),
- u'register-confirm': JSString(required=True, equalTo=u'#password', message=u'Your passwords don\'t match.')
+ u'register-email': JSEmail(required=True,
+ message=u'You haven\'t typed in an e-mail address.'),
+ u'register-password': JSString(required=True,
+ message=u'You haven\'t typed in a password.'),
+ u'register-confirm': JSString(required=True, equalTo=u'#password',
+ message=u'Your passwords don\'t match.')
}
def register_schema(self):
return {
- 'register-email': Email(not_empty=True, messages={'empty': u'You haven\'t typed in an e-mail address.'}),
- 'register-password': UnicodeString(not_empty=True, messages={'empty': u'You haven\'t typed in a password.'}),
- 'confirm-password': [FieldsMatch('register-password', 'register-confirm', messages={'invalid': u'Your passwords don\'t match.'})]
+ 'register-email': Email(not_empty=True,
+ messages={'empty': u'You haven\'t typed in an e-mail address.'}),
+ 'register-password': UnicodeString(not_empty=True,
+ messages={'empty': u'You haven\'t typed in a password.'}),
+ 'confirm-password': [
+ FieldsMatch('register-password', 'register-confirm',
+ messages={'invalid': u'Your passwords don\'t match.'})]
}
def register_POST(self):
diff --git a/scribeengine/model/tables.py b/scribeengine/model/tables.py
index 9ef1c4b..c8819ad 100644
--- a/scribeengine/model/tables.py
+++ b/scribeengine/model/tables.py
@@ -103,6 +103,7 @@ users_table = Table(u'users', metadata,
Column(u'first_name', Unicode(100), default=u''),
Column(u'last_name', Unicode(100), default=u''),
Column(u'homepage', Unicode(200), default=u''),
+ Column(u'timezone', Unicode(200), default=u'UTC'),
Column(u'activation_key', Unicode(40), default=None)
)
diff --git a/scribeengine/public/styles/style.css b/scribeengine/public/styles/style.css
index 8902fde..4fedc1d 100644
--- a/scribeengine/public/styles/style.css
+++ b/scribeengine/public/styles/style.css
@@ -393,6 +393,19 @@ fieldset {
color: #fff;
}
+.form-select {
+ color: #fff;
+ background-color: #1f1f1f;
+ font-size: 1.2em;
+ border: 1px solid #454545;
+ padding: 3px 5px;
+}
+
+.form-select option {
+ background-color: #1f1f1f;
+ color: #fff;
+}
+
.form-text {
font-size: 1.5em;
padding: 4px 6px;
diff --git a/scribeengine/templates/account/index.mako b/scribeengine/templates/account/index.mako
index aca5b6a..36932d6 100644
--- a/scribeengine/templates/account/index.mako
+++ b/scribeengine/templates/account/index.mako
@@ -30,7 +30,7 @@