Fix refresh of the list of countries in referent search page. Closes #1132.
[platal.git] / templates / profile / referent.tpl
... / ...
CommitLineData
1{**************************************************************************}
2{* *}
3{* Copyright (C) 2003-2010 Polytechnique.org *}
4{* http://opensource.polytechnique.org/ *}
5{* *}
6{* This program is free software; you can redistribute it and/or modify *}
7{* it under the terms of the GNU General Public License as published by *}
8{* the Free Software Foundation; either version 2 of the License, or *}
9{* (at your option) any later version. *}
10{* *}
11{* This program is distributed in the hope that it will be useful, *}
12{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14{* GNU General Public License for more details. *}
15{* *}
16{* You should have received a copy of the GNU General Public License *}
17{* along with this program; if not, write to the Free Software *}
18{* Foundation, Inc., *}
19{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
20{* *}
21{**************************************************************************}
22
23
24{if $plset_count}
25{include core=plset.tpl}
26{else}
27{include wiki=Docs.Emploi}
28{/if}
29
30<a id="mentors"></a>
31
32<p>
33Actuellement, {$mentors_number} mentors et référents se sont déclarés sur {#globals.core.sitename#}.
34</p>
35
36{javascript name=ajax}
37<script type="text/javascript">//<![CDATA[
38
39var baseurl = platal_baseurl + "referent/";
40{literal}
41var Ajax2 = new AjaxEngine();
42
43function setSector(sector)
44{
45 if (sector == '') {
46 document.getElementById('scat').style.display = 'none';
47 document.getElementById('country').style.display = 'none';
48 document.getElementById('keywords').style.display = 'none';
49 document.getElementById('search_referent').disabled = 'disabled';
50 } else {
51 Ajax.update_html('ssect_chg', baseurl + 'ssect/' + sector);
52 Ajax2.update_html('country_chg', baseurl + 'country/' + sector);
53 document.getElementById('scat').style.display = '';
54 document.getElementById('country').style.display = '';
55 document.getElementById('keywords').style.display = '';
56 document.getElementById('search_referent').disabled = '';
57 }
58}
59
60function setSSectors()
61{
62 var sect = document.getElementById('sect_field').value;
63 var ssect = document.getElementById('ssect_field').value;
64 Ajax2.update_html('country_chg', baseurl + 'country/' + sect + '/' + ssect);
65}
66
67{/literal}
68//]]></script>
69
70<form action="{$smarty.server.REQUEST_URI}" method="get">
71 <table cellpadding="0" cellspacing="0" summary="Formulaire de recherche de referents" class="bicol">
72 <tr class="impair">
73 <td class="titre">
74 Secteur de compétence<br />du référent
75 </td>
76 <td>
77 <select name="sector" id="sect_field" onchange="setSector(this.value)">
78 <option name=""></option>
79 {html_options options=$sectors selected=$sectorSelection}
80 </select>
81 </td>
82 </tr>
83 <tr class="impair" style="display: none" id="scat">
84 <td class="titre">
85 Sous-secteur
86 </td>
87 <td id="ssect_chg">
88 </td>
89 </tr>
90 <tr class="pair" style="display: none" id="country">
91 <td class="titre">
92 Pays bien connu du référent
93 </td>
94 <td id="country_chg">
95 </td>
96 </tr>
97 <tr class="impair" style="display: none" id="keywords">
98 <td class="titre">
99 Expertise (rentre un ou plusieurs mots clés)
100 </td>
101 <td >
102 <input type="text" name="expertise" size="30" value="{$expertise_champ}" />
103 </td>
104 </tr>
105 </table>
106 <div class="center" style="margin-top: 1em;">
107 <input id="search_referent" type="submit" value="Chercher" name="Chercher" />
108 </div>
109</form>
110
111<script type="text/javascript">
112setSector(document.getElementById('sect_field').value);
113</script>
114{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}