From 7443faf4490b257e846619b0bb1cf4c1138b54d2 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Tue, 22 Feb 2011 00:22:36 +0100 Subject: [PATCH] disable feature checkboxes for non-admin --- src/messenger/webim/operator/features.php | 3 ++- src/messenger/webim/view/features.php | 31 ++++++++++++----------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/messenger/webim/operator/features.php b/src/messenger/webim/operator/features.php index ba316643..e3527b7b 100644 --- a/src/messenger/webim/operator/features.php +++ b/src/messenger/webim/operator/features.php @@ -50,10 +50,11 @@ if (isset($_POST['sent'])) { header("Location: $webimroot/operator/features.php?stored"); exit; } else { - $errors[] = "Not an administrator."; + $errors[] = "Not an administrator"; } } +$page['canmodify'] = is_capable($can_administrate, $operator); $page['stored'] = isset($_GET['stored']); foreach($options as $opt) { $page["form$opt"] = $params[$opt] == "1"; diff --git a/src/messenger/webim/view/features.php b/src/messenger/webim/view/features.php index 211e0c79..2e18ad67 100644 --- a/src/messenger/webim/view/features.php +++ b/src/messenger/webim/view/features.php @@ -57,7 +57,7 @@ $(function(){ @@ -88,7 +88,7 @@ require_once('inc_errors.php');
- /> + />

@@ -97,7 +97,7 @@ require_once('inc_errors.php');
- /> + />

@@ -105,7 +105,7 @@ require_once('inc_errors.php');
- /> + />

@@ -115,7 +115,7 @@ require_once('inc_errors.php');
- /> + />

@@ -124,7 +124,7 @@ require_once('inc_errors.php');
- /> + />

@@ -133,7 +133,7 @@ require_once('inc_errors.php');
- /> + />

@@ -142,7 +142,7 @@ require_once('inc_errors.php');
- /> + />

@@ -150,7 +150,7 @@ require_once('inc_errors.php');
- /> + />

@@ -159,7 +159,7 @@ require_once('inc_errors.php');
- /> + />

@@ -168,7 +168,7 @@ require_once('inc_errors.php');
- /> + />

@@ -178,7 +178,7 @@ require_once('inc_errors.php');
- /> + />

@@ -187,7 +187,7 @@ require_once('inc_errors.php');
- /> + />

@@ -196,16 +196,17 @@ require_once('inc_errors.php');
- /> + />

+
- +