diff --git a/main/survey/create_new_survey.php b/main/survey/create_new_survey.php
index f90b0b19e1..4e4bb9597a 100755
--- a/main/survey/create_new_survey.php
+++ b/main/survey/create_new_survey.php
@@ -1,24 +1,5 @@
addElement('hidden','survey_type',0);
$form -> addElement('html','
');
require_once(api_get_path(LIBRARY_PATH).'surveymanager.lib.php');
@@ -223,9 +187,9 @@ if ($survey_data['survey_type']==1 || $_GET['action'] == 'add' )
$form->addElement('checkbox', 'shuffle', get_lang('ActivateShuffle'));
}
-if ((isset($_GET['action']) && $_GET['action'] == 'edit') && !empty($survey_id) )
-{
+if ((isset($_GET['action']) && $_GET['action'] == 'edit') && !empty($survey_id) ) {
if ($survey_data['anonymous']==0 ) {
+
// Aditional Parameters
$form -> addElement('html','
@@ -235,11 +199,12 @@ if ((isset($_GET['action']) && $_GET['action'] == 'edit') && !empty($survey_id)
');
- $form -> addElement('html','
');
+
+ $form->addElement('html','
');
$form->addElement('checkbox', 'show_form_profile', get_lang('ShowFormProfile'),'','onclick="javascript:if(this.checked==true){document.getElementById(\'options_field\').style.display = \'block\';}else{document.getElementById(\'options_field\').style.display = \'none\';}"');
if ($survey_data['show_form_profile']== 1) {
- $form -> addElement('html','
');
+ $form -> addElement('html','
');
} else {
$form -> addElement('html','
');
}
@@ -273,23 +238,24 @@ if ((isset($_GET['action']) && $_GET['action'] == 'edit') && !empty($survey_id)
}
}
}
- $form->addElement('html', '
');
+ $form->addElement('html', '
');
}
-
}
-$form -> addElement('html','
');
+if ($_GET['action'] == 'add') {
+ $form -> addElement('html','
');
+}
+
if(isset($_GET['survey_id']) && $_GET['action']=='edit') {
- $class="save";
+ $class='save';
$text=get_lang('ModifySurvey');
} else {
- $class="add";
+ $class='add';
$text=get_lang('CreateSurvey');
}
$form->addElement('style_submit_button', 'submit_survey', $text, 'class="'.$class.'"');
// setting the rules
-if ($_GET['action'] == 'add')
-{
+if ($_GET['action'] == 'add') {
$form->addRule('survey_code', ''.get_lang('ThisFieldIsRequired'), 'required');
$form->addRule('survey_code', '', 'maxlength',20);
}