Added timezones
This commit is contained in:
parent
ec49c6da34
commit
c11de84241
@ -27,6 +27,7 @@ from urlparse import urlsplit
|
||||
from datetime import datetime
|
||||
|
||||
from formencode.validators import Int
|
||||
from pytz import all_timezones
|
||||
|
||||
from scribeengine.lib.base import *
|
||||
from scribeengine.lib.validation.client import JSString, JSEmail
|
||||
@ -42,6 +43,7 @@ class AccountController(BaseController):
|
||||
@authenticate()
|
||||
def index(self):
|
||||
c.page_title = u'My Account'
|
||||
c.timezones = all_timezones
|
||||
return render(u'/account/index.mako')
|
||||
|
||||
def register(self):
|
||||
|
@ -384,17 +384,6 @@ fieldset {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
fieldset.form-details {
|
||||
background: url(../images/img05.gif) no-repeat left 1.5em;
|
||||
padding: 13px 20px 0 20px;
|
||||
}
|
||||
|
||||
fieldset.form-details legend {
|
||||
font-size: 1.2em;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.form-text,
|
||||
.form-password,
|
||||
.form-textarea {
|
||||
@ -434,6 +423,24 @@ fieldset.form-details legend {
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
fieldset.form-details {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
fieldset.form-details legend {
|
||||
background: url(../images/img05.gif) no-repeat left top;
|
||||
color: #fff;
|
||||
font-size: 1.5em;
|
||||
line-height: 50px;
|
||||
margin: 0 -10px;
|
||||
padding-left: 1em;
|
||||
width: 593px;
|
||||
}
|
||||
|
||||
fieldset.form-details .form-text {
|
||||
width: 573px;
|
||||
}
|
||||
|
||||
#register-now {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
@ -2,24 +2,37 @@
|
||||
<%include file="/flash.mako"/>
|
||||
<div class="post">
|
||||
<h2 class="title">My Account</h2>
|
||||
<p>This is your account page. Update your details by changing them below and clicking the Save button.</p>
|
||||
<%include file="/errors.mako"/>
|
||||
<form id="account-account" action="${h.url_for(controller=u'account', action=u'index')}" method="post">
|
||||
<fieldset class="form-details">
|
||||
<legend>Required Details</legend>
|
||||
<div class="form-item">
|
||||
<label for="account-nick">Nick:</label>
|
||||
<input type="text" name="account-nick" id="account-nick" class="form-text" />
|
||||
<input type="text" name="account-nick" id="account-nick" class="form-text" value="${c.current_user.nick}" />
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label for="account-email">E-mail:</label>
|
||||
<input type="text" name="account-email" id="account-email" class="form-text" />
|
||||
<input type="text" name="account-email" id="account-email" class="form-text" value="${c.current_user.email}" />
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="form-details">
|
||||
<legend>Personal Details</legend>
|
||||
<div class="form-item">
|
||||
<label for="account-first_name">First Name:</label>
|
||||
<input type="text" name="account-first_name" id="account-first_name" class="form-text" />
|
||||
<input type="text" name="account-first_name" id="account-first_name" class="form-text" value="${c.current_user.first_name}" />
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label for="account-last_name">Last Name:</label>
|
||||
<input type="text" name="account-last_name" id="account-last_name" class="form-text" value="${c.current_user.last_name}" />
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<label for="account-timezone">Timezone:</label>
|
||||
<select name="account-timezone" id="account-timezone" class="form-select">
|
||||
% for timezone in c.timezones:
|
||||
<option>${timezone.zone}</option>
|
||||
% endfor
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
|
4
setup.py
4
setup.py
@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
try:
|
||||
from setuptools import setup, find_packages
|
||||
except ImportError:
|
||||
@ -28,7 +29,8 @@ setup(
|
||||
"Pylons==0.9.7",
|
||||
"SQLAlchemy>=0.5,<0.6",
|
||||
"TurboMail>=3.0,<3.1",
|
||||
"MonthDelta>=0.9,<0.10"
|
||||
"MonthDelta>=0.9,<0.10",
|
||||
"pytz"
|
||||
],
|
||||
setup_requires=["PasteScript>=1.6.3"],
|
||||
packages=find_packages(exclude=['ez_setup']),
|
||||
|
Reference in New Issue
Block a user