mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 21:40:28 +03:00
disable feature checkboxes for non-admin
This commit is contained in:
parent
d308977a00
commit
d61a9d30f7
@ -54,10 +54,11 @@ if (isset($_POST['sent'])) {
|
|||||||
header("Location: $webimroot/operator/features.php?stored");
|
header("Location: $webimroot/operator/features.php?stored");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
$errors[] = "Not an administrator.";
|
$errors[] = "Not an administrator";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$page['canmodify'] = is_capable($can_administrate, $operator);
|
||||||
$page['stored'] = isset($_GET['stored']);
|
$page['stored'] = isset($_GET['stored']);
|
||||||
foreach($options as $opt) {
|
foreach($options as $opt) {
|
||||||
$page["form$opt"] = $params[$opt] == "1";
|
$page["form$opt"] = $params[$opt] == "1";
|
||||||
|
@ -58,7 +58,7 @@ $(function(){
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
function tpl_content() { global $page, $webimroot;
|
function tpl_content() { global $page, $webimroot, $errors;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php echo getlocal("page_settings.intro") ?>
|
<?php echo getlocal("page_settings.intro") ?>
|
||||||
@ -81,7 +81,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.usercanchangename') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.usercanchangename') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="usercanchangename" value="on"<?php echo form_value_cb('usercanchangename') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="usercanchangename" value="on"<?php echo form_value_cb('usercanchangename') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.usercanchangename.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.usercanchangename.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -90,7 +90,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.enablessl') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.enablessl') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input id="enablessl" 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\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.enablessl.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.enablessl.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -98,7 +98,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="subfield underssl">
|
<div class="subfield underssl">
|
||||||
<div class="flabel"><?php echo getlocal('settings.forcessl') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.forcessl') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="forcessl" value="on"<?php echo form_value_cb('forcessl') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="forcessl" value="on"<?php echo form_value_cb('forcessl') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.forcessl.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.forcessl.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -108,7 +108,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.enablegroups') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.enablegroups') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="enablegroups" value="on"<?php echo form_value_cb('enablegroups') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="enablegroups" value="on"<?php echo form_value_cb('enablegroups') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.enablegroups.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.enablegroups.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -117,7 +117,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.enablestatistics') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.enablestatistics') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="enablestatistics" value="on"<?php echo form_value_cb('enablestatistics') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="enablestatistics" value="on"<?php echo form_value_cb('enablestatistics') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.enablestatistics.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.enablestatistics.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -126,7 +126,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.enablejabber') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.enablejabber') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="enablejabber" value="on"<?php echo form_value_cb('enablejabber') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="enablejabber" value="on"<?php echo form_value_cb('enablejabber') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.enablejabber.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.enablejabber.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -135,7 +135,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.enableban') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.enableban') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="enableban" value="on"<?php echo form_value_cb('enableban') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="enableban" value="on"<?php echo form_value_cb('enableban') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.enableban.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.enableban.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -144,7 +144,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.enablepresurvey') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.enablepresurvey') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input id="enablepresurvey" type="checkbox" name="enablepresurvey" value="on"<?php echo form_value_cb('enablepresurvey') ? " checked=\"checked\"" : "" ?>/>
|
<input id="enablepresurvey" type="checkbox" name="enablepresurvey" value="on"<?php echo form_value_cb('enablepresurvey') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.enablepresurvey.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.enablepresurvey.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -152,7 +152,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="subfield undersurvey">
|
<div class="subfield undersurvey">
|
||||||
<div class="flabel"><?php echo getlocal('settings.survey.askmail') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.survey.askmail') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="surveyaskmail" value="on"<?php echo form_value_cb('surveyaskmail') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="surveyaskmail" value="on"<?php echo form_value_cb('surveyaskmail') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.survey.askmail.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.survey.askmail.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -161,7 +161,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="subfield undersurvey">
|
<div class="subfield undersurvey">
|
||||||
<div class="flabel"><?php echo getlocal('settings.survey.askgroup') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.survey.askgroup') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="surveyaskgroup" value="on"<?php echo form_value_cb('surveyaskgroup') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="surveyaskgroup" value="on"<?php echo form_value_cb('surveyaskgroup') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.survey.askgroup.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.survey.askgroup.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -170,7 +170,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="subfield undersurvey">
|
<div class="subfield undersurvey">
|
||||||
<div class="flabel"><?php echo getlocal('settings.survey.askmessage') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.survey.askmessage') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="surveyaskmessage" value="on"<?php echo form_value_cb('surveyaskmessage') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="surveyaskmessage" value="on"<?php echo form_value_cb('surveyaskmessage') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.survey.askmessage.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.survey.askmessage.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -180,7 +180,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.popup_notification') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.popup_notification') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="enablepopupnotification" value="on"<?php echo form_value_cb('enablepopupnotification') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="enablepopupnotification" value="on"<?php echo form_value_cb('enablepopupnotification') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.popup_notification.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.popup_notification.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -189,7 +189,7 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.show_online_operators') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.show_online_operators') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="showonlineoperators" value="on"<?php echo form_value_cb('showonlineoperators') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="showonlineoperators" value="on"<?php echo form_value_cb('showonlineoperators') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.show_online_operators.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.show_online_operators.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
@ -198,16 +198,17 @@ require_once('inc_errors.php');
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="flabel"><?php echo getlocal('settings.leavemessage_captcha') ?></div>
|
<div class="flabel"><?php echo getlocal('settings.leavemessage_captcha') ?></div>
|
||||||
<div class="fvalue">
|
<div class="fvalue">
|
||||||
<input type="checkbox" name="enablecaptcha" value="on"<?php echo form_value_cb('enablecaptcha') ? " checked=\"checked\"" : "" ?>/>
|
<input type="checkbox" name="enablecaptcha" value="on"<?php echo form_value_cb('enablecaptcha') ? " checked=\"checked\"" : "" ?><?php echo $page['canmodify'] ? "" : " disabled=\"disabled\"" ?>/>
|
||||||
</div>
|
</div>
|
||||||
<div class="fdescr"> — <?php echo getlocal('settings.leavemessage_captcha.description') ?></div>
|
<div class="fdescr"> — <?php echo getlocal('settings.leavemessage_captcha.description') ?></div>
|
||||||
<br clear="all"/>
|
<br clear="all"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if($page['canmodify']) { ?>
|
||||||
<div class="fbutton">
|
<div class="fbutton">
|
||||||
<input type="image" name="save" value="" src='<?php echo $webimroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
|
<input type="image" name="save" value="" src='<?php echo $webimroot.getlocal("image.button.save") ?>' alt='<?php echo getlocal("button.save") ?>'/>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><div class="formbottom"><div class="formbottomi"></div></div></div>
|
</div><div class="formbottom"><div class="formbottomi"></div></div></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user