X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/3236874239f091690f47e1c8b076e21ec0b142d1..7eca93637b2f696dcc140d36e44d5f4810346e2c:/forum/forms/admin.py?ds=sidebyside
diff --git a/forum/forms/admin.py b/forum/forms/admin.py
index 791f5ec..1ff2e85 100644
--- a/forum/forms/admin.py
+++ b/forum/forms/admin.py
@@ -1,8 +1,11 @@
import socket
from django import forms
from django.utils.translation import ugettext as _
+from django.contrib.admin.widgets import FilteredSelectMultiple, AdminDateWidget
from qanda import TitleField, EditorField
from forum import settings
+from forum.models.node import NodeMetaClass
+from forum.models import User
class IPListField(forms.CharField):
def clean(self, value):
@@ -55,9 +58,8 @@ class UrlFieldWidget(forms.TextInput):
return """
-
- """ % {'name': name, 'value': value, 'app_url': settings.APP_URL,
- 'script_alias': settings.FORUM_SCRIPT_ALIAS}
+
+ """ % {'name': name, 'value': value, 'app_url': settings.APP_URL}
class PageForm(forms.Form):
@@ -89,4 +91,17 @@ class PageForm(forms.Form):
comments = forms.BooleanField(label=_("Allow comments"), initial=False, required=False)
-
\ No newline at end of file
+from forum.forms.auth import SimpleRegistrationForm
+from forum.forms.general import SetPasswordForm
+
+
+class CreateUserForm(SimpleRegistrationForm, SetPasswordForm):
+ validate_email = forms.BooleanField(required=False, label=_('send validation email'))
+
+ def __init__(self, *args, **kwargs):
+ super(CreateUserForm, self).__init__(*args, **kwargs)
+ self.fields.keyOrder = ['username', 'email', 'validate_email', 'password1', 'password2']
+ self.fields['email'].label = _('email address')
+
+
+