diff --git a/postcode/__init__.py b/postcode/__init__.py index df4479d..89fa074 100644 --- a/postcode/__init__.py +++ b/postcode/__init__.py @@ -14,6 +14,7 @@ app.debug = True app.config.from_object(__name__) app.config['SECRET_KEY'] = environ['SECRET_KEY'] - +app.config['RECAPTCHA_PUBLIC_KEY'] = environ['RECAPTCHA_PUBLIC_KEY'] +app.config['RECAPTCHA_PRIVATE_KEY'] = environ['RECAPTCHA_PRIVATE_KEY'] init_db() diff --git a/postcode/forms.py b/postcode/forms.py index e091fcc..c70be49 100644 --- a/postcode/forms.py +++ b/postcode/forms.py @@ -1,7 +1,10 @@ from flask.ext.wtf import Form from wtforms import TextField, BooleanField from wtforms.validators import Required, Email +from flask.ext.wtf.recaptcha import RecaptchaField + class signupForm(Form): name = TextField('name') email = TextField('email', validators = [Required(), Email()]) + recaptcha = RecaptchaField() diff --git a/postcode/routing.py b/postcode/routing.py index d9da419..76fd739 100644 --- a/postcode/routing.py +++ b/postcode/routing.py @@ -12,9 +12,6 @@ }, 'product_page':{ 'url': '/products/' - }, - 'recordtrac':{ - 'url': '/recordtrac' } } diff --git a/postcode/static/content/nextrequest.pdf b/postcode/static/content/nextrequest.pdf new file mode 100644 index 0000000..0e82009 Binary files /dev/null and b/postcode/static/content/nextrequest.pdf differ diff --git a/postcode/static/css/custom.css b/postcode/static/css/custom.css index 7317868..80838e3 100644 --- a/postcode/static/css/custom.css +++ b/postcode/static/css/custom.css @@ -271,7 +271,7 @@ a.rt_link:active {color: #E57755;} } .recordtrac { - margin: 0em 1em 1em 0em; + margin: 0em 1em 0em 0em; } .recordtrac .title{ font-family: 'Lato', sans-serif; @@ -340,20 +340,19 @@ a.rt_link:active {color: #E57755;} } .shim_RT{ - margin-top: 5.5em; + margin-top: 7em; margin-bottom: 2em; } .recordtrac .video{ - margin: 3.5em 0em 2.5em; + margin: 1.5em 0em 2.5em; } .modal-content{ padding: 30px 50px 50px 50px; } .newRT{ background-color: #EC916F; - margin-top: 5em; - padding: .75em; + padding: 2.5em 1.5em; } .newRT h2{ color: white; @@ -601,6 +600,50 @@ padding: .25em .6em; padding-bottom: 3em; } +.areyouhuman { + display: none; +} + +.nr-banner { + margin-top: 50px; + background-color: #EC916F; + color: #fff; + padding: 0px; + text-align: center; + z-index: 1; +} + +.nr-banner p { + color: #fff; + font-size: 28px; + padding: 5px; + margin: 0.2em; +} + +.nr-banner a { + color: #fff; + font-style: italic; + padding-left: 15px; + text-decoration: underline; + font-weight: bold; +} + +.recordtrac .video-subheader { + margin-top: -0.5em; +} + +.modal-text { + font-size: 1.5em; +} + +.custom-modal h2.modal-title { + font-size: 2.5em; +} + +.custom-modal .modal-title img { + width: 40px; +} + diff --git a/postcode/static/images/NR_email_header.png b/postcode/static/images/NR_email_header.png new file mode 100644 index 0000000..0e7be1c Binary files /dev/null and b/postcode/static/images/NR_email_header.png differ diff --git a/postcode/static/images/recordtrac_logo_color.png b/postcode/static/images/recordtrac_logo_color.png new file mode 100644 index 0000000..53d1216 Binary files /dev/null and b/postcode/static/images/recordtrac_logo_color.png differ diff --git a/postcode/static/js/custom.js b/postcode/static/js/custom.js index 4a9025a..1dd6743 100644 --- a/postcode/static/js/custom.js +++ b/postcode/static/js/custom.js @@ -1,3 +1,9 @@ $(document).ready(function() { - + $( "#email" ).keypress(function( event ) { + $('.areyouhuman').show() + }) + if($('.recaptcha-error').text().length > 0) { + $('.areyouhuman').show() + } + $('#message-modal').modal('show') }); diff --git a/postcode/templates/about.html b/postcode/templates/about.html index 29b535e..a7d73ce 100644 --- a/postcode/templates/about.html +++ b/postcode/templates/about.html @@ -66,7 +66,7 @@

WE HELP THE


@rduecyg
-

Reed is a designer, urbanist, and the creative lead for PostCode. He focuses on making applications for cities and governments that are simple, beautiful, and easy to use. Prior to PostCode, Reed was a fellow with Code for America, where he worked to help develop CityVoice a call in system for collecting community feedback. Before that he was in Istanbul on a Fulbright Grant studying architecture and infrastructure planning. His work and thinking on cities and design have been presented in numerous biennials, conferences, and publications in the U.S. and abroad. In his free time he likes running, making things with his hands, and a good IPA.

Reed holds a Masters of Architecture from the Rhode Island School of Design and a BA in Urban and Environmental Studies from Colorado College.

+

Reed works on product design and business development for PostCode. He focuses on making applications for cities and governments that are simple, beautiful, and easy to use. Prior to PostCode, Reed was a fellow with Code for America, where he worked to help develop CityVoice a call in system for collecting community feedback. Before that he was in Istanbul on a Fulbright Grant studying architecture and infrastructure planning. His work and thinking on cities and design have been presented in numerous biennials, conferences, and publications in the U.S. and abroad. In his free time he likes running, making things with his hands, and a good IPA.

Reed holds a Masters of Architecture from the Rhode Island School of Design and a BA in Urban and Environmental Studies from Colorado College.

diff --git a/postcode/templates/base.html b/postcode/templates/base.html index 21193d6..1950724 100644 --- a/postcode/templates/base.html +++ b/postcode/templates/base.html @@ -48,7 +48,7 @@
@@ -238,15 +248,5 @@

-
-
-
-
-

I want RecordTrac in my city.

- -
-
-
-
{% endblock content %} diff --git a/postcode/templates/recordtrac42.html b/postcode/templates/recordtrac42.html index 53d0330..40a7611 100644 --- a/postcode/templates/recordtrac42.html +++ b/postcode/templates/recordtrac42.html @@ -1,11 +1,15 @@ + + - \ No newline at end of file + diff --git a/postcode/views.py b/postcode/views.py index e33eada..6147a8c 100644 --- a/postcode/views.py +++ b/postcode/views.py @@ -34,37 +34,26 @@ def any_page(page): def product_page(product): return redirect(url_for('static', filename='content/%s.pdf' %(product))) -@app.route('/recordtrac', methods = ['GET', 'POST']) -def recordtrac(): - form = signupForm() - try: - if request.method == 'POST' and form.validate(): - user = Signup(form.email.data, form.name.data) - db_session.add(user) - db_session.commit() - signup_email(user) - return render_template('recordtrac-confirm.html', ga_tracking_code = ga_tracking_code, remarketing_id=remarketing_id) - return render_template('recordtrac.html', ga_tracking_code = ga_tracking_code, remarketing_id=remarketing_id, form=form) - except: - app.logger.error(traceback.format_exception(*sys.exc_info())) - return index() +@app.route('/nextrequest', methods = ['GET', 'POST']) +def nextrequest(): + return redirect("https://www.nextrequest.com", code=302) def signup_email(user): sg = sendgrid.SendGridClient(os.environ['SENDGRID_USERNAME'], os.environ['SENDGRID_PASSWORD']) message_postcode = sendgrid.Mail() message_postcode.add_to('Postcode ') - message_postcode.set_subject('RecordTrac Sign Up') - message_postcode.set_html('Hi, just wanted to let you know that someone just signed up for RecordTrac with the email:
%s' %user.email) - message_postcode.set_from('recordtrac@postcode.io') + message_postcode.set_subject('NextRequest Sign Up') + message_postcode.set_html('Hi, just wanted to let you know that someone just signed up for NextRequest with the email:
%s' %user.email) + message_postcode.set_from('nextrequest@postcode.io') status, msg_pc = sg.send(message_postcode) app.logger.debug(msg_pc) - user_html = "

Thanks for getting in touch with us about RecordTrac!

We're leading the way on public records requests and are excited you're interested in joining us. We'll follow up with you shortly to set up a customized pilot for your organization.

 

If you have any questions don't hesitate to call or send us an email.
tel: (844) 767-8263
email: recordtrac@postcode.io

" + user_html = "

Thanks for getting in touch with us about NextRequest!

We're leading the way on public records requests and are excited you're interested in joining us. We'll follow up with you shortly to set up a customized pilot for your organization.

 

If you have any questions don't hesitate to call or send us an email.
tel: (844) 767-8263
email: nextrequest@postcode.io

" message_user = sendgrid.Mail() message_user.add_to('%s' %user.email) - message_user.set_subject('RecordTrac Sign Up') + message_user.set_subject('NextRequest Sign Up') message_user.set_html(user_html) - message_user.set_from('recordtrac@postcode.io') + message_user.set_from('nextrequest@postcode.io') status, msg_user = sg.send(message_user) app.logger.debug(msg_user) return msg_user, msg_pc