From 565dac0a3c314db01ebd4fe669cc097148e6f3ba Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 24 Sep 2016 21:48:31 -0500 Subject: [PATCH] Drop onboarding and todo fields from /new Still able to create new team. --- gratipay/models/team/__init__.py | 6 ++---- www/teams/create.json.spt | 15 ++++++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/gratipay/models/team/__init__.py b/gratipay/models/team/__init__.py index 56ad8ce03b..17e940134f 100644 --- a/gratipay/models/team/__init__.py +++ b/gratipay/models/team/__init__.py @@ -101,11 +101,9 @@ def insert(cls, owner, **fields): INSERT INTO teams (slug, slug_lower, name, homepage, - product_or_service, todo_url, onboarding_url, - owner) + product_or_service, owner) VALUES (%(slug)s, %(slug_lower)s, %(name)s, %(homepage)s, - %(product_or_service)s, %(todo_url)s, %(onboarding_url)s, - %(owner)s) + %(product_or_service)s, %(owner)s) RETURNING teams.*::teams """, fields) diff --git a/www/teams/create.json.spt b/www/teams/create.json.spt index 35f83735e9..cd93020e6d 100644 --- a/www/teams/create.json.spt +++ b/www/teams/create.json.spt @@ -22,8 +22,6 @@ field_names = { 'image': 'Image', 'product_or_service': 'Product or Service', 'homepage': 'Homepage', - 'onboarding_url': 'Self-onboarding Documentation URL', - 'todo_url': 'To-do URL', } if user.ANON: @@ -40,8 +38,6 @@ or user.participant.is_closed: # sanity checks if not request.body.get('agree_public', False): raise Response(400, _("Sorry, you must agree to have your application publicly reviewed.")) -if not request.body.get('agree_payroll', False): - raise Response(400, _("Sorry, you must agree to be responsible for payroll.")) if not request.body.get('agree_terms', False): raise Response(400, _("Sorry, you must agree to the terms of service.")) @@ -64,11 +60,12 @@ if request.method == 'POST': raise Response(400, _("Please fill out the '{}' field.", field_names[field])) fields[field] = value - for field in ('homepage', 'onboarding_url', 'todo_url'): - if not any(map(fields[field].lower().startswith, ('http://', 'https://'))): - raise Response(400, _( "Please enter an http[s]:// URL for the '{}' field." - , field_names[field] - )) +# for field in ('homepage'): +# if not any(map(fields['homepage'].lower().startswith, ('http://', 'https://'))): +# raise Response(400, _( "Please enter an http[s]:// URL for the '{}' field." +# , field_names[field] +# )) + try: fields['slug'] = slugize(fields['name'])