root/trunk/apps/main/modules/people/templates/_filterForm.php

Revision 2, 1.5 kB (checked in by nperriault, 2 years ago)

First commit of the extracted code from production, I hope no passwd has been forgotten :-)

Line 
1 <?php echo form_tag('@people_home', 'method=get id=country_form') ?>
2   <p>
3     <?php echo label_for('country', __('Filter by country')) ?>
4     <?php echo select_tag('country',
5                           options_for_select($countries,
6                                              $sf_request->getParameter('country'),
7                                              array('include_custom' => __('All countries'))),
8                           array("onchange" => "document.getElementById('city').selectedIndex=0;".
9                                               "document.getElementById('city_selector').style.display='none';".
10                                               "return false")) ?>
11   </p>
12   <?php if ($sf_request->hasParameter('country') && isset($cities)): ?>
13   <p id="city_selector">
14     <?php echo label_for('country', __('Filter by city in %country%',
15                                        array('%country%' => format_country($sf_request->getParameter('country'))))) ?>
16     <?php echo select_tag('city',
17                           options_for_select($cities,
18                                              $sf_params->getRaw('selected_city'),
19                                              array('include_custom' => __('All cities')))) ?>
20   </p>
21   <?php endif; ?>
22   <p>
23     <?php echo checkbox_tag('available', 1, $sf_request->hasParameter('available'), 'id=available') ?>
24     <?php echo label_for('available', __('Only people available for hire'), 'class=left') ?>
25   </p>
26   <p>
27     <?php echo submit_tag(__('Filter')) ?>
28   </p>
29 <?php echo end_form() ?>
Note: See TracBrowser for help on using the browser.