diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php
index 5b511ea2..ca48739d 100644
--- a/src/messenger/webim/libs/chat.php
+++ b/src/messenger/webim/libs/chat.php
@@ -330,6 +330,7 @@ function setup_survey($name, $email, $groupid, $info, $referrer)
$allgroups = get_groups($link, false);
close_connection($link);
$val = "";
+ $groupdescriptions = array();
foreach ($allgroups as $k) {
$groupname = $k['vclocalname'];
if ($k['inumofagents'] == 0) {
@@ -338,14 +339,18 @@ function setup_survey($name, $email, $groupid, $info, $referrer)
if ($k['ilastseen'] !== NULL && $k['ilastseen'] < $settings['online_timeout']) {
if (!$groupid) {
$groupid = $k['groupid']; // select first online group
+ $defaultdescription = $k['vclocaldescription'];
}
} else {
$groupname .= " (offline)";
}
$isselected = $k['groupid'] == $groupid;
$val .= "";
+ $groupdescriptions[] = $k['vclocaldescription'];
}
$page['groups'] = $val;
+ $page['group.descriptions'] = json_encode($groupdescriptions);
+ $page['default.department.description'] = empty($defaultdescription)?' ':$defaultdescription;
}
$page['showemail'] = $settings["surveyaskmail"] == "1" ? "1" : "";
diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties
index 580a0414..835c13fb 100644
--- a/src/messenger/webim/locales/en/properties
+++ b/src/messenger/webim/locales/en/properties
@@ -396,6 +396,7 @@ permission.viewthreads=View another operator's chat thread
permissions.intro=Change restrictions and available features for this operator.
permissions.title=Permissions
presurvey.department=Choose Department:
+presurvey.department.description=Department description:
presurvey.intro=Thank you for contacting us. Please fill out the form below and click the Start Chat button.
presurvey.mail=Email:
presurvey.name=Name:
diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties
index 64825104..e425cd1a 100644
--- a/src/messenger/webim/locales/ru/properties
+++ b/src/messenger/webim/locales/ru/properties
@@ -394,6 +394,7 @@ permission.viewthreads=
permissions.intro=Здесь вы можете управлять возможностями оператора.
permissions.title=Возможности оператора
presurvey.department=Выберите отдел:
+presurvey.department.description=Описание отдела:
presurvey.intro=Спасибо, что связались с нами! Заполните, пожалуйста, небольшую форму и нажмите "Начать диалог".
presurvey.mail=E-mail:
presurvey.name=Ваше имя:
diff --git a/src/messenger/webim/styles/dialogs/default/templates/survey.tpl b/src/messenger/webim/styles/dialogs/default/templates/survey.tpl
index 2520a730..816b0324 100644
--- a/src/messenger/webim/styles/dialogs/default/templates/survey.tpl
+++ b/src/messenger/webim/styles/dialogs/default/templates/survey.tpl
@@ -34,7 +34,9 @@
text-decoration:none;
}
-
+${if:groups}
+
+${endif:groups}
@@ -114,9 +116,13 @@ ${if:groups}
${msg:presurvey.department} |
-
+
|
+
+ ${msg:presurvey.department.description} |
+ ${page:default.department.description} |
+
${endif:groups}
diff --git a/src/messenger/webim/styles/dialogs/original/templates/survey.tpl b/src/messenger/webim/styles/dialogs/original/templates/survey.tpl
index a9ee4b58..1c02f031 100644
--- a/src/messenger/webim/styles/dialogs/original/templates/survey.tpl
+++ b/src/messenger/webim/styles/dialogs/original/templates/survey.tpl
@@ -20,6 +20,9 @@
.isubmit { background-position:0px -39px; width: 40px; height: 35px; }
.isubmitrest { background-position:-31px -39px; width: 10px; height: 35px;}
+${if:groups}
+
+${endif:groups}
@@ -75,10 +78,16 @@ ${if:groups}
${msg:presurvey.department} |
|
-
+
|
|
+
+ ${msg:presurvey.department.description} |
+ |
+ ${page:default.department.description} |
+
+ |
${endif:groups}
diff --git a/src/messenger/webim/styles/dialogs/silver/templates/survey.tpl b/src/messenger/webim/styles/dialogs/silver/templates/survey.tpl
index 13fc61ae..ac3ee6c8 100644
--- a/src/messenger/webim/styles/dialogs/silver/templates/survey.tpl
+++ b/src/messenger/webim/styles/dialogs/silver/templates/survey.tpl
@@ -4,6 +4,9 @@
${msg:presurvey.title}
+ ${if:groups}
+
+ ${endif:groups}
@@ -53,7 +56,11 @@
${if:groups}
${msg:presurvey.department} |
- |
+ |
+
+
+ ${msg:presurvey.department.description} |
+ ${page:default.department.description} |
${endif:groups}
diff --git a/src/messenger/webim/styles/dialogs/simplicity/templates/survey.tpl b/src/messenger/webim/styles/dialogs/simplicity/templates/survey.tpl
index 244d23a4..c3487485 100644
--- a/src/messenger/webim/styles/dialogs/simplicity/templates/survey.tpl
+++ b/src/messenger/webim/styles/dialogs/simplicity/templates/survey.tpl
@@ -4,6 +4,9 @@
${msg:presurvey.title}
+${if:groups}
+
+${endif:groups}
@@ -44,7 +47,11 @@
${if:groups}
${msg:presurvey.department} |
- |
+ |
+
+
+ ${msg:presurvey.department.description} |
+ ${page:default.department.description} |
${endif:groups}