mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-23 05:40:30 +03:00
service "Jabber notifications", hide operator jabber options when service is off, fix css
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@718 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
958423ef35
commit
d98d0e04d8
@ -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;
|
||||
}
|
||||
|
@ -583,6 +583,7 @@ $settings = array(
|
||||
'usercanchangename' => '1',
|
||||
'enablegroups' => '0',
|
||||
'enablestatistics' => '1',
|
||||
'enablejabber' => '0',
|
||||
'enablepresurvey' => '1',
|
||||
'surveyaskmail' => '0',
|
||||
'surveyaskgroup' => '1',
|
||||
|
@ -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 <a href="http://mibew.org/download.php">Mibew Jabber</a> 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.
|
||||
|
@ -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',
|
||||
|
@ -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);
|
||||
|
@ -45,6 +45,10 @@ require_once('inc_errors.php');
|
||||
<?php if( $page['opid'] || $page['canmodify'] ) { ?>
|
||||
<form name="agentForm" method="post" action="<?php echo $webimroot ?>/operator/operator.php">
|
||||
<input type="hidden" name="opid" value="<?php echo $page['opid'] ?>"/>
|
||||
<?php if(!$page['showjabber']) { ?>
|
||||
<input type="hidden" name="jabber" value="<?php echo form_value('jabber') ?>"/>
|
||||
<?php if(form_value_cb('jabbernotify')) { ?><input type="hidden" name="jabbernotify" value="on"/><?php } ?>
|
||||
<?php } ?>
|
||||
<div>
|
||||
<?php print_tabbar(); ?>
|
||||
<div class="mform"><div class="formtop"><div class="formtopi"></div></div><div class="forminner">
|
||||
@ -104,6 +108,7 @@ require_once('inc_errors.php');
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
|
||||
<?php if($page['showjabber']) { ?>
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('form.field.jabber') ?></div>
|
||||
<div class="fvalue">
|
||||
@ -121,6 +126,7 @@ require_once('inc_errors.php');
|
||||
<div class="fdescr"> — <?php echo getlocal('form.field.jabbernotify.description') ?></div>
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if($page['canmodify']) { ?>
|
||||
<div class="fbutton">
|
||||
|
@ -105,15 +105,6 @@ require_once('inc_errors.php');
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('settings.enableban') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="enableban" value="on"<?php echo form_value_cb('enableban') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.enableban.description') ?></div>
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('settings.enablegroups') ?></div>
|
||||
<div class="fvalue">
|
||||
@ -132,6 +123,24 @@ require_once('inc_errors.php');
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('settings.enablejabber') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="enablejabber" value="on"<?php echo form_value_cb('enablejabber') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.enablejabber.description') ?></div>
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('settings.enableban') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="enableban" value="on"<?php echo form_value_cb('enableban') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.enableban.description') ?></div>
|
||||
<br clear="all"/>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('settings.enablepresurvey') ?></div>
|
||||
<div class="fvalue">
|
||||
|
Loading…
Reference in New Issue
Block a user