Skip to content

Commit

Permalink
added character limiter to agency side of application
Browse files Browse the repository at this point in the history
  • Loading branch information
aot221 committed Jul 15, 2016
1 parent 8bbf47f commit ac5357d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions public_records_portal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def set_env(key, default=None):
# Initialize database
db = SQLAlchemy(app)


# Initialiaze ReCapthca
recaptcha = ReCaptcha(app)
app.config['SECRET_KEY'] = environ['SECRET_KEY']
Expand Down
2 changes: 1 addition & 1 deletion public_records_portal/templates/new_request.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2>
</div>
{% endif %}
<div id='request_summary_length_error' class="alert alert-danger" style="display: none;">
The title of your reqeust must be less than 90 characters.
The title of your request must be less than 90 characters.
</div>
{{ form.request_summary(class="input-block-level", rows="2", maxlength="90", id="request_summary", placeholder="Please provide a short summary of your request" ) }}
<div class="small" id="request_summary_counter">5000 characters remaining</div>
Expand Down
11 changes: 7 additions & 4 deletions public_records_portal/templates/offline_request.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ <h2>
{{ errors['summary_length'] }}
</div>
{% endif %}
{{ form.request_summary(class="input-block-level", rows="2",
{{ form.request_summary(class="input-block-level", rows="2", maxlength="90",
id="request_summary", placeholder="Please provide a short summary of your request" ) }}
<div class="small" id="request_summary_counter">90 characters remaining</div>
</div>
<div class="control-group">
<h2>
Expand All @@ -74,9 +75,11 @@ <h2>
{{ errors['summary_length'] }}
</div>
{% endif %}
{{
form.request_text(class="input-block-level",rows="6",id="request_text",
placeholder="Provide more information about your request to help the City locate the record. If don’t know the record name, describe type of information you think it would contain and the approximate date range. Do not include private info – such as social security # or credit card." ) }}
{{ form.request_text(class="input-block-level",rows="6",id="request_text",
maxlength="5000",
placeholder="Provide more information about your request to help the Citylocate the record. If you don't know the record name, describe the type of information you think it would contain and the approximate date range. Do not include private information such as a social security # or credit card.") }}
<div class="small" id="request_description_counter">5000 characters
remaining</div>
</div>
<h2>Private Information</h2>

Expand Down

0 comments on commit ac5357d

Please sign in to comment.