From 8d0c359e014afaf79bfb2e574662721285066f84 Mon Sep 17 00:00:00 2001 From: mcramer Date: Tue, 18 Sep 2012 12:56:25 +0000 Subject: [PATCH] Bugfix: domain module check on client editing websites Added: bank account owner field for client --- install/sql/incremental/upd_0041.sql | 4 ++++ install/sql/ispconfig3.sql | 1 + interface/web/client/form/client.tform.php | 11 +++++++++++ interface/web/client/lib/lang/de_client.lng | 1 + interface/web/client/lib/lang/en_client.lng | 1 + .../web/client/templates/client_edit_address.htm | 4 ++++ interface/web/mail/mail_domain_edit.php | 2 +- interface/web/sites/web_aliasdomain_edit.php | 2 +- interface/web/sites/web_domain_edit.php | 2 +- interface/web/sites/web_vhost_subdomain_edit.php | 2 +- 10 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 install/sql/incremental/upd_0041.sql diff --git a/install/sql/incremental/upd_0041.sql b/install/sql/incremental/upd_0041.sql new file mode 100644 index 0000000000..ba8ee6436b --- /dev/null +++ b/install/sql/incremental/upd_0041.sql @@ -0,0 +1,4 @@ + +-- Add bank account owner +ALTER TABLE `client` ADD `bank_account_owner` varchar(255) DEFAULT NULL AFTER `notes`; + diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 77ea80c124..782705dcd3 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -160,6 +160,7 @@ CREATE TABLE `client` ( `internet` varchar(255) NOT NULL, `icq` varchar(16) DEFAULT NULL, `notes` text, + `bank_account_owner` varchar(255) DEFAULT NULL, `bank_account_number` varchar(255) DEFAULT NULL, `bank_code` varchar(255) DEFAULT NULL, `bank_name` varchar(255) DEFAULT NULL, diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 32a31fb762..20c46c2b69 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -339,6 +339,17 @@ $form["tabs"]['address'] = array ( 'rows' => '', 'cols' => '' ), + 'bank_account_owner' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' + ), 'bank_account_number' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng index a6425b311a..d9b5f83620 100644 --- a/interface/web/client/lib/lang/de_client.lng +++ b/interface/web/client/lib/lang/de_client.lng @@ -120,6 +120,7 @@ $wb['web_php_options_notempty'] = 'Keine PHP-Option ausgewählt. Wähle mindeste $wb['ssh_chroot_notempty'] = 'Keine SSH chroot-Option ausgewählt. Wähle mindestens eine SSH-Option.'; $wb['username_error_collision'] = 'Der Benutzername sollte nicht mit dem Wort -web- oder -web- gefolgt von einer Nummer anfangen.'; $wb['bank_account_number_txt'] = 'Kontonr.'; +$wb["bank_account_owner_txt"] = 'Kontoinhaber'; $wb['bank_code_txt'] = 'BLZ'; $wb['bank_name_txt'] = 'Bank'; $wb['bank_account_iban_txt'] = 'IBAN'; diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng index adc41c6090..b8712908f5 100644 --- a/interface/web/client/lib/lang/en_client.lng +++ b/interface/web/client/lib/lang/en_client.lng @@ -123,6 +123,7 @@ $wb["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least on $wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.'; $wb["username_error_collision"] = 'The username may not start with the word -web- or -web- followed by a number.'; $wb["bank_account_number_txt"] = 'Bank account no.'; +$wb["bank_account_owner_txt"] = 'Bank account owner'; $wb["bank_code_txt"] = 'Bank code'; $wb["bank_name_txt"] = 'Bank name'; $wb["bank_account_iban_txt"] = 'IBAN'; diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm index c03827e9f1..9387944dee 100644 --- a/interface/web/client/templates/client_edit_address.htm +++ b/interface/web/client/templates/client_edit_address.htm @@ -102,6 +102,10 @@ +
+ + +
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 1690a25594..ce5e7cc257 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -193,7 +193,7 @@ class page_action extends tform_actions { $sql = "SELECT domain_id, domain FROM domain WHERE domain_id = " . $app->functions->intval($this->dataRecord['domain']); if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $sql .= "AND sys_groupid =" . $client_group_id; + $sql .= " AND sys_groupid =" . $client_group_id; } $domain_check = $app->db->queryOneRecord($sql); if(!$domain_check) { diff --git a/interface/web/sites/web_aliasdomain_edit.php b/interface/web/sites/web_aliasdomain_edit.php index b928c92ca0..47fdf4cac7 100644 --- a/interface/web/sites/web_aliasdomain_edit.php +++ b/interface/web/sites/web_aliasdomain_edit.php @@ -128,7 +128,7 @@ class page_action extends tform_actions { $sql = "SELECT domain_id, domain FROM domain WHERE domain_id = " . $app->functions->intval($this->dataRecord['domain']); if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $sql .= "AND sys_groupid =" . $client_group_id; + $sql .= " AND sys_groupid =" . $client_group_id; } $domain_check = $app->db->queryOneRecord($sql); if(!$domain_check) { diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php index b8db757e32..ca57df34bc 100644 --- a/interface/web/sites/web_domain_edit.php +++ b/interface/web/sites/web_domain_edit.php @@ -467,7 +467,7 @@ class page_action extends tform_actions { $sql = "SELECT domain_id, domain FROM domain WHERE domain_id = " . $app->functions->intval($this->dataRecord['domain']); if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $sql .= "AND sys_groupid =" . $client_group_id; + $sql .= " AND sys_groupid =" . $client_group_id; } $domain_check = $app->db->queryOneRecord($sql); if(!$domain_check) { diff --git a/interface/web/sites/web_vhost_subdomain_edit.php b/interface/web/sites/web_vhost_subdomain_edit.php index c96c69c1b2..62e351aed5 100644 --- a/interface/web/sites/web_vhost_subdomain_edit.php +++ b/interface/web/sites/web_vhost_subdomain_edit.php @@ -304,7 +304,7 @@ class page_action extends tform_actions { $sql = "SELECT domain_id, domain FROM domain WHERE domain_id = " . $app->functions->intval($this->dataRecord['sel_domain']); if ($_SESSION["s"]["user"]["typ"] != 'admin') { - $sql .= "AND sys_groupid =" . $client_group_id; + $sql .= " AND sys_groupid =" . $client_group_id; } $domain_check = $app->db->queryOneRecord($sql); if(!$domain_check) { -- GitLab