Fixed hidden fields in oauth client authorization
authorJoar Wandborg <joar@wandborg.se>
Sat, 2 Mar 2013 22:40:24 +0000 (23:40 +0100)
committerJoar Wandborg <joar@wandborg.se>
Sat, 2 Mar 2013 22:42:03 +0000 (23:42 +0100)
Removed the translation marking and passed in empty strings to avoid
WTForms automagically creating the labels from the field names (i.e.
client_id => 'Client Id').

mediagoblin/plugins/oauth/forms.py
mediagoblin/plugins/oauth/templates/oauth/authorize.html

index 2a956dad3fa08366d669de75603963399f3d057a..d0a4e9b8ab45359f5c848828fa3b185bfb8b8579 100644 (file)
@@ -23,10 +23,9 @@ from mediagoblin.tools.translate import fake_ugettext_passthrough as _
 
 
 class AuthorizationForm(wtforms.Form):
-    client_id = wtforms.HiddenField(_(u'Client ID'),
-            [wtforms.validators.Required()])
-    next = wtforms.HiddenField(_(u'Next URL'),
-            [wtforms.validators.Required()])
+    client_id = wtforms.HiddenField(u'',
+                                    validators=[wtforms.validators.Required()])
+    next = wtforms.HiddenField(u'', validators=[wtforms.validators.Required()])
     allow = wtforms.SubmitField(_(u'Allow'))
     deny = wtforms.SubmitField(_(u'Deny'))
 
index 647fa41f35a5675ce234538fe86ec37d96bd7599..8a00c9257249fe68f35fafa543c96e218f265a3d 100644 (file)
@@ -16,7 +16,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -#}
 {% extends "mediagoblin/base.html" %}
-{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
+{% import "mediagoblin/utils/wtforms.html" as wtforms_util %}
 
 {% block mediagoblin_content %}
 <form action="{{ request.urlgen('mediagoblin.plugins.oauth.authorize_client') }}"