Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Revert "Add maxlength attribute to submit form title field."
Browse files Browse the repository at this point in the history
This reverts commit 72b8179.
  • Loading branch information
chromakode committed Dec 11, 2012
1 parent 0776e39 commit cde3b67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions r2/r2/controllers/validator/validator.py
Expand Up @@ -529,9 +529,8 @@ def run(self, text, text2 = ''):


class VTitle(VLength):
max_length = 300
def __init__(self, param, **kw):
VLength.__init__(self, param, self.max_length, **kw)
def __init__(self, param, max_length = 300, **kw):
VLength.__init__(self, param, max_length, **kw)

def param_docs(self):
return {
Expand Down
3 changes: 1 addition & 2 deletions r2/r2/templates/newlink.html
Expand Up @@ -24,7 +24,6 @@
from r2.lib.strings import strings
from r2.lib.pages import UserText
from r2.lib.template_helpers import add_sr
from r2.controllers.validator import VTitle
%>

<%namespace file="utils.html" import="error_field, submit_form, _a_buffered, reddit_selector, text_with_links"/>
Expand Down Expand Up @@ -60,7 +59,7 @@ <h1>${unsafe(_("submit to %(sr)s") % dict(sr=sr))}</h1>

<div class="spacer">
<%utils:round_field title="${_('title')}" id="title-field">
<textarea name="title" rows="2" maxlength="${VTitle.max_length}" required>${thing.title}</textarea>
<textarea name="title" rows="2" required>${thing.title}</textarea>
${error_field("NO_TEXT", "title", "div")}
${error_field("TOO_LONG", "title", "div")}
</%utils:round_field>
Expand Down

0 comments on commit cde3b67

Please sign in to comment.