Merge commit 'origin/master' into fusionax
[platal.git] / templates / profile / jobs.secteur.tpl
index 5af83dd..bad409e 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2009 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {**************************************************************************}
 
 <?xml version="1.0" encoding="utf-8"?>
-<select name="job[{$id}][ss_secteur]">
+<select name="jobs[{$id}][ss_secteur]"
+ {if ($change)}onchange="updateJobSousSecteur({$id}, '{$jobid}', '{$jobpref}', ''); return true;"{/if}>
   <option value=""></option>
   {iterate from=$ssecteurs item=ssecteur}
+  {if $ssecteur.optgroup}
+  {if $gp}
+  </optgroup>
+  {/if}
+  <optgroup label="{$ssecteur.label}">
+  {assign var=1 name=gp}
+  {else}
   <option value="{$ssecteur.id}" {if $ssecteur.id eq $sel}selected="selected"{/if}>{$ssecteur.label}</option>
+  {/if}
+  {if $gp}
+  </optgroup>
+  {/if}
   {/iterate}
 </select>