diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
index 53d6198a849..3d82a6cb1c0 100755
--- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
+++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
@@ -18,3 +18,4 @@
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL;
+ALTER TABLE `llx_opensurvey_sondage` ADD `allow_comments` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT 1 AFTER `canedit` ;
\ No newline at end of file
diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql
index f66fbcf5e79..476b3d9fb40 100644
--- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql
+++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql
@@ -27,6 +27,7 @@ CREATE TABLE llx_opensurvey_sondage (
mailsonde varchar(2) DEFAULT '0',
survey_link_visible integer DEFAULT 1,
canedit integer DEFAULT 0,
+ allow_comments TINYINT(1) unsigned NOT NULL DEFAULT 1,
origin VARCHAR(64),
tms TIMESTAMP,
sujet TEXT
diff --git a/htdocs/langs/en_US/opensurvey.lang b/htdocs/langs/en_US/opensurvey.lang
index db1140097a7..88308711fc6 100644
--- a/htdocs/langs/en_US/opensurvey.lang
+++ b/htdocs/langs/en_US/opensurvey.lang
@@ -66,6 +66,7 @@ AddEndHour=Add end hour
votes=vote(s)
NoCommentYet=No comments have been posted for this poll yet
CanEditVotes=Can change vote of others
+CanComment=Users can comment in the poll
SelectDayDesc=For each selected day, you can choose, or not, meeting hours in the following format : - empty, - "8h", "8H" or "8:00" to give a meeting's start hour, - "8-11", "8h-11h", "8H-11H" or "8:00-11:00" to give a meeting's start and end hour, - "8h15-11h15", "8H15-11H15" or "8:15-11:15" for the same thing but with minutes.
BackToCurrentMonth=Back to current month
PublicLinkToCreateSurvey=Public link to allow everybody to create a survey
diff --git a/htdocs/opensurvey/adminstuds.php b/htdocs/opensurvey/adminstuds.php
index 2700ea5c518..c98b3ad376e 100644
--- a/htdocs/opensurvey/adminstuds.php
+++ b/htdocs/opensurvey/adminstuds.php
@@ -89,6 +89,7 @@ if ($action == 'update')
$object->date_fin = $expiredate;
$object->survey_link_visible = GETPOST('survey_link_visible')=='on'?1:0;
$object->canedit = GETPOST('canedit')=='on'?1:0;
+ $object->allow_comments = GETPOST('cancomment') == 'on' ? true : false;
$res=$object->update($user);
if ($res < 0)
@@ -231,6 +232,15 @@ if ($action == 'edit')
else print yn($object->canedit);
print '';
+// Users can comment
+print '
\n"; +if ($object->allow_comments) { + print '
\n"; -print '
'."\n"; -print $langs->trans("Name") .' : '; -print ' '."\n"; -print '
'."\n"; -print ''."\n"; + print '
'."\n"; + print $langs->trans("Name") .' : '; + print ' '."\n"; + print '
'."\n"; + print ''."\n"; -print '