Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #624 from peterbe/bug-1251295-fully-enable-savedse…
Browse files Browse the repository at this point in the history
…arch-functionality

fixes bug 1251295 - Fully enable SavedSearch functionality
  • Loading branch information
Peter Bengtsson committed Mar 4, 2016
2 parents c3c9382 + 916231a commit 786c59f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions airmozilla/search/templates/search/home.html
Expand Up @@ -6,23 +6,6 @@
{% stylesheet 'search' %}
{% endblock %}

{% block site_js %}
{{ super() }}

<script>
$(function() {
if (localStorage.getItem('savesearch')) {
$('.savesearch-create-form').show();
} else {
console.log("To enable Save Search, type this in on the console:\n");
console.log("localStorage.setItem('savesearch', true);\n");
console.log("Then refresh the page");
}
});
</script>
{% endblock %}


{% block body_class %}with-sidebar{% endblock %}

{% block sidebar_inner %}
Expand Down Expand Up @@ -142,8 +125,7 @@ <h4>Nothing found</h4>
{% endif %}

{% if search_form and not search_form.errors %}
{# by default, it's hidden. For testing purposes. #}
<div class="savesearch-create-form" style="display:none">
<div class="savesearch-create-form">
{% if request.user.is_active %}
<form action="{{ url('search:savesearch') }}" method="post">
<input type="hidden" name="q" value="{{ search_form.q.value() }}">
Expand Down

0 comments on commit 786c59f

Please sign in to comment.