Remove unused roles/forms.py. Commit ready for merge
- Legacy-Id: 14845
This commit is contained in:
parent
7211cf399b
commit
01bfbff170
|
@ -87,6 +87,12 @@ class PersonTests(TestCase):
|
|||
Person.objects.create(name="Duplicate Test")
|
||||
self.assertTrue("possible duplicate" in outbox[0]["Subject"].lower())
|
||||
|
||||
def test_merge(self):
|
||||
url = urlreverse("ietf.person.views.merge")
|
||||
r = self.client.get(url)
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
|
||||
class PersonUtilsTests(TestCase):
|
||||
def get_person_no_user(self):
|
||||
person = PersonFactory()
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
import re
|
||||
|
||||
from django import forms
|
||||
|
||||
|
||||
class LiaisonForm(forms.Form):
|
||||
liaison_name = forms.CharField(max_length=100,label='Name',help_text="To see a list of people type the first name, or last name, or both.")
|
||||
affiliation = forms.CharField(max_length=50)
|
||||
|
||||
# set css class=name-autocomplete for name field (to provide select list)
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(LiaisonForm, self).__init__(*args, **kwargs)
|
||||
self.fields['liaison_name'].widget.attrs['class'] = 'name-autocomplete'
|
||||
|
||||
def clean_liaison_name(self):
|
||||
name = self.cleaned_data.get('liaison_name', '')
|
||||
# check for tag within parenthesis to ensure name was selected from the list
|
||||
m = re.search(r'(\d+)', name)
|
||||
if name and not m:
|
||||
raise forms.ValidationError("You must select an entry from the list!")
|
||||
return name
|
||||
|
||||
def clean_affiliation(self):
|
||||
affiliation = self.cleaned_data.get('affiliation', '')
|
||||
# give error if field ends with "Liaison", application adds this label
|
||||
m = re.search(r'[L|l]iaison$', affiliation)
|
||||
if affiliation and m:
|
||||
raise forms.ValidationError("Don't use 'Liaison' in field. Application adds this.")
|
||||
return affiliation
|
||||
|
||||
class ChairForm(forms.Form):
|
||||
chair_name = forms.CharField(max_length=100,label='Name',help_text="To see a list of people type the first name, or last name, or both.")
|
||||
|
||||
# set css class=name-autocomplete for name field (to provide select list)
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ChairForm, self).__init__(*args, **kwargs)
|
||||
self.fields['chair_name'].widget.attrs['class'] = 'name-autocomplete'
|
||||
|
||||
def clean_chair_name(self):
|
||||
name = self.cleaned_data.get('chair_name', '')
|
||||
# check for tag within parenthesis to ensure name was selected from the list
|
||||
m = re.search(r'(\d+)', name)
|
||||
if name and not m:
|
||||
raise forms.ValidationError("You must select an entry from the list!")
|
||||
return name
|
|
@ -9,7 +9,6 @@ from ietf.ietfauth.utils import role_required
|
|||
from ietf.secr.groups.forms import RoleForm
|
||||
from ietf.secr.sreq.forms import GroupSelectForm
|
||||
|
||||
#from forms import *
|
||||
|
||||
# -------------------------------------------------
|
||||
# Helper Functions
|
||||
|
|
Loading…
Reference in a new issue