]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/forms/admin.py
OSQA-748, smart unicode filtration for the username in the accept rate singular title
[osqa.git] / forum / forms / admin.py
index 389e70e450b3ae531427166d70d22dd604220c78..1ff2e8549d9b145a7e3bdd5e2b495464d144f111 100644 (file)
@@ -1,9 +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):
@@ -56,9 +58,8 @@ class UrlFieldWidget(forms.TextInput):
 
         return """
                 <input class="url_field" type="text" name="%(name)s" value="%(value)s" />
-                <a class="url_field_anchor" target="_blank" href="%(app_url)s%(script_alias)s"></a>
-            """  % {'name': name, 'value': value, 'app_url': settings.APP_URL,
-                    'script_alias': settings.FORUM_SCRIPT_ALIAS}
+                <a class="url_field_anchor" target="_blank" href="%(app_url)s"></a>
+            """  % {'name': name, 'value': value, 'app_url': settings.APP_URL}
 
 
 class PageForm(forms.Form):
@@ -90,19 +91,6 @@ class PageForm(forms.Form):
 
     comments = forms.BooleanField(label=_("Allow comments"), initial=False, required=False)
 
-TEXT_IN_CHOICES = (
-('title', _('Title')),
-('body', _('Body')),
-('both', _('Title and Body'))
-)
-
-class NodeManFilterForm(forms.Form):
-    node_type = forms.CharField(widget=forms.HiddenInput, initial='all')
-    state_type = forms.CharField(widget=forms.HiddenInput, initial='any')
-    text = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 40}))
-    text_in = forms.ChoiceField(required=False, widget=forms.RadioSelect, choices=TEXT_IN_CHOICES, initial='title')
-
-
 from forum.forms.auth import SimpleRegistrationForm
 from forum.forms.general import SetPasswordForm
 
@@ -116,4 +104,4 @@ class CreateUserForm(SimpleRegistrationForm, SetPasswordForm):
         self.fields['email'].label = _('email address')
 
 
-    
\ No newline at end of file
+