{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2007 Polytechnique.org *}
+{* Copyright (C) 2003-2010 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
<td class="titre">Commentaire</td>
<td><textarea name="survey_question[comment]" rows="5" cols="60">{$survey_current.comment}</textarea></td>
</tr>
- {javascript name=jquery}
+ <tr>
+ <td></td>
+ <td class="smaller">
+ <a href="wiki_help/notitle" class="popup3">
+ {icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki autorisée pour le commentaire d'une question
+ </a>
+ </td>
+ </tr>
<script type="text/javascript">//<![CDATA[
- var id = {$survey_current.choices|@count};
+ var id = new Array();
+ id['choices'] = {$survey_current.choices|@count};
+ id['subquestions'] = {$survey_current.subquestions|@count};
{literal}
- function newChoice(tid)
+ function newField(name, tid)
{
- fid = "t" + id;
- $("#choice_" + tid).before('<div id="choice_' + fid + '">'
- + '<input type="text" name="survey_question[options][' + fid + ']" size="50" maxlength="200" value="" /> '
- + '<a href="javascript:removeChoice("' + fid + '")"><img src="images/icons/delete.gif" alt="" title="Supprimer" /></a>'
+ fid = "t" + id[name];
+ $("#" + name + "_" + tid).before('<div id="' + name + '_' + fid + '">'
+ + '<input id="' + name + '_' + fid + '_field" type="text" name="survey_question[' + name + '][' + fid + ']" size="50" maxlength="200" value="" /> '
+ + '<a href="javascript:removeField("' + name + '","' + fid + '")"><img src="images/icons/delete.gif" alt="" title="Supprimer" /></a>'
+ '</div>');
- id++;
+ id[name]++;
+ $("#" + name + "_" + fid + "_field").focus();
}
- function removeChoice(tid)
+ function removeField(name, tid)
{
- $("#choice_" + tid).remove();
+ $("#" + name + "_" + tid).remove();
}
{/literal}
//]]></script>