From: Friendika <info@friendika.com>
Date: Fri, 11 Feb 2011 12:32:38 +0000 (-0800)
Subject: disable network toggles when ACL's are entered
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5e02519a1311cb62d7aaa2f8dc947fd0affd454c;p=friendica.git

disable network toggles when ACL's are entered
---

diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index 2a5715b2e0..93e7962c33 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -143,7 +143,7 @@ function facebook_jot_nets(&$a,&$b) {
 	if(intval($fb_post) == 1) {
 		$fb_defpost = get_pconfig(local_user(),'facebook','post_by_default');
 		$selected = ((intval($fb_defpost == 1)) ? ' selected="selected" ' : '');
-		$b .= '<div class="profile-jot-net"><input type="checkbox" name="facebook_enable" $selected value="1" /> ' 
+		$b .= '<div class="profile-jot-net"><input type="checkbox" name="facebook_enable"' . $selected . 'value="1" /> ' 
 			. t('Post to Facebook') . '</div>';	
 	}
 }
diff --git a/addon/twitter/twitter.php b/addon/twitter/twitter.php
index 6a0365e09d..0b706f9b18 100644
--- a/addon/twitter/twitter.php
+++ b/addon/twitter/twitter.php
@@ -63,7 +63,7 @@ function twitter_jot_nets(&$a,&$b) {
 	if(intval($tw_post) == 1) {
 		$tw_defpost = get_pconfig(local_user(),'twitter','post_by_default');
 		$selected = ((intval($tw_defpost == 1)) ? ' selected="selected" ' : '');
-		$b .= '<div class="profile-jot-net"><input type="checkbox" name="twitter_enable" $selected value="1" /> ' 
+		$b .= '<div class="profile-jot-net"><input type="checkbox" name="twitter_enable"' . $selected . 'value="1" /> ' 
 			. t('Post to Twitter') . '</div>';	
 	}
 
diff --git a/view/de/jot-header.tpl b/view/de/jot-header.tpl
index 41abdf0f36..58403f1ba6 100644
--- a/view/de/jot-header.tpl
+++ b/view/de/jot-header.tpl
@@ -75,10 +75,12 @@ tinyMCE.init({
 			$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
 				selstr = $(this).text();
 				$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
-
+				$('.profile-jot-net input').attr('disabled', 'disabled');
 			});
-			if(selstr == null)
+			if(selstr == null) {
 				$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
+				$('.profile-jot-net input').attr('disabled', false);
+			}
 
 		}).trigger('change');
 
diff --git a/view/en/jot-header.tpl b/view/en/jot-header.tpl
index d0c956a020..fe818410e5 100644
--- a/view/en/jot-header.tpl
+++ b/view/en/jot-header.tpl
@@ -75,10 +75,12 @@ tinyMCE.init({
 			$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
 				selstr = $(this).text();
 				$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
-
+				$('.profile-jot-net input').attr('disabled', 'disabled');
 			});
-			if(selstr == null)
+			if(selstr == null) { 
 				$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
+				$('.profile-jot-net input').attr('disabled', false);
+			}
 
 		}).trigger('change');
 
diff --git a/view/fr/jot-header.tpl b/view/fr/jot-header.tpl
index d0c956a020..ff7e543a5e 100644
--- a/view/fr/jot-header.tpl
+++ b/view/fr/jot-header.tpl
@@ -75,11 +75,12 @@ tinyMCE.init({
 			$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
 				selstr = $(this).text();
 				$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
-
+				$('.profile-jot-net input').attr('disabled', 'disabled');
 			});
-			if(selstr == null)
+			if(selstr == null) {
 				$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
-
+				$('.profile-jot-net input').attr('disabled', false);
+			}
 		}).trigger('change');
 
 	});
diff --git a/view/it/jot-header.tpl b/view/it/jot-header.tpl
index e55a357e8c..117cd16511 100644
--- a/view/it/jot-header.tpl
+++ b/view/it/jot-header.tpl
@@ -75,10 +75,12 @@ tinyMCE.init({
 			$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
 				selstr = $(this).text();
 				$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
-
+				$('.profile-jot-net input').attr('disabled', 'disabled');
 			});
-			if(selstr == null)
+			if(selstr == null) {
 				$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
+				$('.profile-jot-net input').attr('disabled', false);
+			}
 
 		}).trigger('change');