survey module : more explicit button for new surveys
authorx2004laborde <x2004laborde@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 2 Jun 2007 09:31:30 +0000 (09:31 +0000)
committerx2004laborde <x2004laborde@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 2 Jun 2007 09:31:30 +0000 (09:31 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1849 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/survey.php
modules/survey/survey.inc.php
templates/survey/edit_newsurvey.tpl [new file with mode: 0644]
templates/survey/edit_survey.tpl

index ad3b862..1c8f2ae 100644 (file)
@@ -271,7 +271,7 @@ class SurveyModule extends PLModule
                 $this->store_session($survey);
             } else {
                 $this->clear_session();
-                $this->show_form($page, $action, 'root', 'root');
+                $this->show_form($page, $action, 'root', 'newsurvey');
             } // }}}
         } elseif ($action == 'add') { // {{{ adds a new question
             if (Post::has('survey_submit')) { // if the form has been submitted, adds the question
@@ -437,7 +437,7 @@ class SurveyModule extends PLModule
             $page->addJsLink('ajax.js');
             $page->assign('survey_types', Survey::getTypes());
         }
-        if ($type == 'root') {
+        if ($type == 'root' || $type == 'newsurvey') {
             $page->assign('survey_modes', Survey::getModes());
         }
     }
@@ -475,5 +475,5 @@ class SurveyModule extends PLModule
     // }}}
 }
 
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 ts=4 foldmethod=marker enc=utf-8:
 ?>
index c6df2bf..a42927d 100644 (file)
@@ -819,5 +819,5 @@ class SurveyCheckboxTable extends SurveyTable
 // }}}
 // }}}
 
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 ts=4 foldmethod=marker enc=utf-8:
 ?>
diff --git a/templates/survey/edit_newsurvey.tpl b/templates/survey/edit_newsurvey.tpl
new file mode 100644 (file)
index 0000000..e07fd90
--- /dev/null
@@ -0,0 +1,31 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+    <tr>
+      <td colspan='2'>
+        Remplissez ici une description g&#233;n&#233;rale du sondage, puis cliquer sur "Continuer"
+        pour passer &#224; l'&#233;dition des questions.
+      </td>
+    </tr>
+{include file='survey/edit_root.tpl'}
+
+{* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *}
index 0c434b6..786218d 100644 (file)
@@ -28,7 +28,7 @@
     {include file="survey/edit_$survey_type.tpl"}
   </table>
   <div class="center">
-    <input type="submit" name="survey_submit" value="Valider"/>
+    <input type="submit" name="survey_submit" value="{if $survey_type == 'newsurvey'}Continuer{else}Valider{/if}"/>
     <input type="reset" name="survey_reset" value="R&#233;initialiser"/>
     <input type="submit" name="survey_cancel" value="Annuler"/>
   </div>