mirror of
https://github.com/Mibew/design.git
synced 2024-11-15 17:34:12 +03:00
add several options
git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@449 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
parent
1fb7d5e7f9
commit
2e1a271acf
@ -533,9 +533,14 @@ $settings = array(
|
||||
|
||||
'enableban' => '0',
|
||||
'enablessl' => '0',
|
||||
'forcessl' => '0',
|
||||
'usercanchangename' => '1',
|
||||
'enablegroups' => '0',
|
||||
'enablestatistics' => '1',
|
||||
'enablepresurvey' => '1',
|
||||
'surveyaskmail' => '0',
|
||||
'surveyaskgroup' => '1',
|
||||
'surveyaskmessage' => '0',
|
||||
);
|
||||
$settingsloaded = false;
|
||||
$settings_in_db = array();
|
||||
|
@ -21,7 +21,7 @@ $operator = check_login();
|
||||
$page = array('agentId' => '');
|
||||
$errors = array();
|
||||
|
||||
$options = array('enableban', 'usercanchangename', 'enablessl', 'enablegroups', 'enablestatistics');
|
||||
$options = array('enableban', 'usercanchangename', 'enablessl', 'enablegroups', 'enablestatistics', 'enablepresurvey', 'surveyaskmail', 'surveyaskgroup', 'surveyaskmessage', 'forcessl');
|
||||
|
||||
loadsettings();
|
||||
$params = array();
|
||||
|
@ -16,6 +16,40 @@ require_once("inc_menu.php");
|
||||
$page['title'] = getlocal("settings.title");
|
||||
$page['menuid'] = "settings";
|
||||
|
||||
function tpl_header() { global $page, $webimroot;
|
||||
?>
|
||||
<script type="text/javascript" language="javascript" src="<?php echo $webimroot ?>/js/jquery-1.3.2.min.js"></script>
|
||||
<script type="text/javascript" language="javascript">
|
||||
function updateSurvey() {
|
||||
if($("#enablepresurvey").is(":checked")) {
|
||||
$(".undersurvey").show();
|
||||
} else {
|
||||
$(".undersurvey").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function updateSSL() {
|
||||
if($("#enablessl").is(":checked")) {
|
||||
$(".underssl").show();
|
||||
} else {
|
||||
$(".underssl").hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$("#enablepresurvey").change(function() {
|
||||
updateSurvey();
|
||||
});
|
||||
$("#enablessl").change(function() {
|
||||
updateSSL();
|
||||
});
|
||||
updateSurvey();
|
||||
updateSSL();
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
function tpl_content() { global $page, $webimroot;
|
||||
?>
|
||||
|
||||
@ -52,14 +86,23 @@ require_once('inc_errors.php');
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.usercanchangename.description') ?></div>
|
||||
<br clear="left"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('settings.enablessl') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="enablessl" value="on"<?php echo form_value_cb('enablessl') ? " checked=\"checked\"" : "" ?>/>
|
||||
<input id="enablessl" type="checkbox" name="enablessl" value="on"<?php echo form_value_cb('enablessl') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.enablessl.description') ?></div>
|
||||
<br clear="left"/>
|
||||
|
||||
<div class="subfield underssl">
|
||||
<div class="flabel"><?php echo getlocal('settings.forcessl') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="forcessl" value="on"<?php echo form_value_cb('forcessl') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.forcessl.description') ?></div>
|
||||
<br clear="left"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
@ -89,6 +132,42 @@ require_once('inc_errors.php');
|
||||
<br clear="left"/>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="flabel"><?php echo getlocal('settings.enablepresurvey') ?></div>
|
||||
<div class="fvalue">
|
||||
<input id="enablepresurvey" type="checkbox" name="enablepresurvey" value="on"<?php echo form_value_cb('enablepresurvey') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.enablepresurvey.description') ?></div>
|
||||
<br clear="left"/>
|
||||
|
||||
<div class="subfield undersurvey">
|
||||
<div class="flabel"><?php echo getlocal('settings.survey.askmail') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="surveyaskmail" value="on"<?php echo form_value_cb('surveyaskmail') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.survey.askmail.description') ?></div>
|
||||
<br clear="left"/>
|
||||
</div>
|
||||
|
||||
<div class="subfield undersurvey">
|
||||
<div class="flabel"><?php echo getlocal('settings.survey.askgroup') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="surveyaskgroup" value="on"<?php echo form_value_cb('surveyaskgroup') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.survey.askgroup.description') ?></div>
|
||||
<br clear="left"/>
|
||||
</div>
|
||||
|
||||
<div class="subfield undersurvey">
|
||||
<div class="flabel"><?php echo getlocal('settings.survey.askmessage') ?></div>
|
||||
<div class="fvalue">
|
||||
<input type="checkbox" name="surveyaskmessage" value="on"<?php echo form_value_cb('surveyaskmessage') ? " checked=\"checked\"" : "" ?>/>
|
||||
</div>
|
||||
<div class="fdescr"> — <?php echo getlocal('settings.survey.askmessage.description') ?></div>
|
||||
<br clear="left"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fbutton">
|
||||
<input type="image" name="save" value="" src='<?php echo $webimroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user