summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php3
-rw-r--r--themes/default/templates/search.tpl9
2 files changed, 11 insertions, 1 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 86235ac..9d3f548 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -147,6 +147,9 @@ class PHPFSPOT {
break;
}
+ if(isset($_SESSION['from_date']) && isset($_SESSION['to_date']))
+ $this->tmpl->assign('date_search_enabled', true);
+
$this->tmpl->assign('from_date', $this->get_calendar('from'));
$this->tmpl->assign('to_date', $this->get_calendar('to'));
$this->tmpl->assign('sort_field', $this->get_sort_field());
diff --git a/themes/default/templates/search.tpl b/themes/default/templates/search.tpl
index 549f2dc..2a6c14b 100644
--- a/themes/default/templates/search.tpl
+++ b/themes/default/templates/search.tpl
@@ -19,7 +19,14 @@
</tr>
<tr>
<td>Date:</td>
- <td><input type="checkbox" name="consider_date" value="Y" onclick="datesearch();">consider date-search
+ <td>
+ { if ! $date_search_enabled }
+ <input type="checkbox" name="consider_date" value="Y" onclick="datesearch();">
+ { else }
+ <input type="checkbox" name="consider_date" value="Y" onclick="datesearch();" checked="checked">
+ { /if }
+ consider date-search
+ </td>
</tr>
<tr>
<td>&nbsp;</td>