diff --git a/src/messenger/webim/default.css b/src/messenger/webim/default.css index f622ccd2..203c415e 100644 --- a/src/messenger/webim/default.css +++ b/src/messenger/webim/default.css @@ -325,7 +325,7 @@ div.errinfo { font-weight: bold; } -.field .subfield .fieldinrow { +.field .subfield { padding-left: 30px; background: url(images/subitem.gif) no-repeat 10px 2px; } diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index 3a5ca4ff..f0128c0d 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -583,6 +583,7 @@ $settings = array( 'usercanchangename' => '1', 'enablegroups' => '0', 'enablestatistics' => '1', + 'enablejabber' => '0', 'enablepresurvey' => '1', 'surveyaskmail' => '0', 'surveyaskgroup' => '1', diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties index 4dedc906..ea5026ae 100644 --- a/src/messenger/webim/locales/en/properties +++ b/src/messenger/webim/locales/en/properties @@ -414,6 +414,8 @@ settings.enableban.description=Using it you can block attacks from specific IPs settings.enableban=Enable feature "Malicious Visitors" settings.enablegroups.description=Use it to have separate queues for different questions. settings.enablegroups=Enable "Groups" +settings.enablejabber.description=Instant notification of new visitor (require Mibew Jabber software) +settings.enablejabber=Enable "Jabber notifications" settings.enablepresurvey.description=Forces user to fill out a special form to start chat. settings.enablepresurvey=Enable "Pre-chat survey" settings.enablessl.description=Please, note that your web server should be configured to support https requests. diff --git a/src/messenger/webim/operator/features.php b/src/messenger/webim/operator/features.php index cdfc6d12..cffe33c5 100644 --- a/src/messenger/webim/operator/features.php +++ b/src/messenger/webim/operator/features.php @@ -29,7 +29,7 @@ $page = array('agentId' => ''); $errors = array(); $options = array( - 'enableban', 'usercanchangename', 'enablegroups', 'enablestatistics', + 'enableban', 'usercanchangename', 'enablegroups', 'enablestatistics', 'enablejabber', 'enablessl', 'forcessl', 'enablepresurvey', 'surveyaskmail', 'surveyaskgroup', 'surveyaskmessage', 'enablepopupnotification', diff --git a/src/messenger/webim/operator/operator.php b/src/messenger/webim/operator/operator.php index 07fcfe85..6ca34a3f 100644 --- a/src/messenger/webim/operator/operator.php +++ b/src/messenger/webim/operator/operator.php @@ -29,6 +29,7 @@ $page = array('opid' => ''); $errors = array(); $opId = ''; +loadsettings(); if( isset($_POST['login']) && isset($_POST['password']) ) { $opId = verifyparam( "opid", "/^(\d{1,9})?$/", ""); $login = getparam('login'); @@ -58,8 +59,13 @@ if( isset($_POST['login']) && isset($_POST['password']) ) { if($jabber != '' && !is_valid_email($jabber)) $errors[] = wrong_field("form.field.jabber"); - if($jabbernotify && $jabber == '') - $errors[] = no_field("form.field.jabber"); + if($jabbernotify && $jabber == '') { + if( $settings['enablejabber'] == "1" ) { + $errors[] = no_field("form.field.jabber"); + } else { + $jabbernotify = false; + } + } if( !$opId && !$password ) $errors[] = no_field("form.field.password"); @@ -125,6 +131,7 @@ $canmodify = ($opId == $operator['operatorid'] && is_capable($can_modifyprofile, $page['stored'] = isset($_GET['stored']); $page['canmodify'] = $canmodify ? "1" : ""; +$page['showjabber'] = $settings['enablejabber'] == "1"; prepare_menu($operator); setup_operator_settings_tabs($opId,0); diff --git a/src/messenger/webim/view/agent.php b/src/messenger/webim/view/agent.php index edaa67a7..f834574d 100644 --- a/src/messenger/webim/view/agent.php +++ b/src/messenger/webim/view/agent.php @@ -45,6 +45,10 @@ require_once('inc_errors.php');