From 4be98656b74907dd3294a126f041e7d1feae4a39 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 21 Mar 2010 10:29:19 +0000
Subject: [PATCH] Show traffic quota eceeded message when a website has been
 deactivated.

---
 interface/web/sites/lib/lang/en_web_domain.lng    | 1 +
 interface/web/sites/templates/web_domain_edit.htm | 2 +-
 interface/web/sites/web_domain_edit.php           | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/interface/web/sites/lib/lang/en_web_domain.lng b/interface/web/sites/lib/lang/en_web_domain.lng
index 3be17ee69b..b26014db98 100644
--- a/interface/web/sites/lib/lang/en_web_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_domain.lng
@@ -57,4 +57,5 @@ $wb["ssl_country_error_regex"] = 'Invalid SSL Country. Valid characters are: A-Z
 $wb["limit_traffic_quota_free_txt"] = 'Max. available Traffic Quota';
 $wb["redirect_error_regex"] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/';
 $wb["php_open_basedir_txt"] = 'PHP open_basedir';
+$wb["traffic_quota_exceeded_txt"] = 'Traffic quota exceeded';
 ?>
diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm
index 3ea0603f21..c2c48f6719 100644
--- a/interface/web/sites/templates/web_domain_edit.htm
+++ b/interface/web/sites/templates/web_domain_edit.htm
@@ -51,7 +51,7 @@
 			</div>
       <div class="ctrlHolder">
       	<label for="traffic_quota">{tmpl_var name='traffic_quota_txt'}</label>
-        <input name="traffic_quota" id="traffic_quota" value="{tmpl_var name='traffic_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB
+        <input name="traffic_quota" id="traffic_quota" value="{tmpl_var name='traffic_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB <tmpl_var name='traffic_quota_exceeded_txt'>
 			</div>
       <div class="ctrlHolder">
 				<p class="label">{tmpl_var name='cgi_txt'}</p>
diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 7c7829a4a6..ec422d74ad 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -203,6 +203,9 @@ class page_action extends tform_actions {
 			$app->tpl->setVar("edit_disabled", 0);
 		}
 		
+		$tmp_txt = ($this->dataRecord['traffic_quota_lock'] == 'y')?'<b>('.$app->tform->lng('traffic_quota_exceeded_txt').')</b>':'';
+		$app->tpl->setVar("traffic_quota_exceeded_txt", $tmp_txt);
+		
 		parent::onShowEnd();
 	}
 	
-- 
GitLab