diff --git a/admin_admins.php b/admin_admins.php index cf42c1b9..c4f61d59 100644 --- a/admin_admins.php +++ b/admin_admins.php @@ -93,6 +93,9 @@ if ($page == 'admins' $row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets'); $row = htmlentities_array($row); + + $row['custom_notes'] = ($row['custom_notes'] != '') ? nl2br($row['custom_notes']) : ''; + eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";"); $count++; } diff --git a/admin_customers.php b/admin_customers.php index 5056d4ea..8d5c22bf 100644 --- a/admin_customers.php +++ b/admin_customers.php @@ -128,6 +128,8 @@ if ($page == 'customers' $traffic_percent = 100; } + $row['custom_notes'] = ($row['custom_notes'] != '') ? nl2br($row['custom_notes']) : ''; + eval("\$customers.=\"" . getTemplate("customers/customers_customer") . "\";"); $count++; } diff --git a/install/froxlor.sql b/install/froxlor.sql index adee90ea..e98b690e 100644 --- a/install/froxlor.sql +++ b/install/froxlor.sql @@ -131,6 +131,7 @@ CREATE TABLE `panel_admins` ( `loginfail_count` int(11) unsigned NOT NULL default '0', `reportsent` tinyint(4) unsigned NOT NULL default '0', `theme` varchar(255) NOT NULL default 'Sparkle', + `custom_notes` text, PRIMARY KEY (`adminid`), UNIQUE KEY `loginname` (`loginname`) ) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci; @@ -190,6 +191,7 @@ CREATE TABLE `panel_customers` ( `imap` tinyint(1) NOT NULL default '1', `perlenabled` tinyint(1) NOT NULL default '0', `theme` varchar(255) NOT NULL default 'Sparkle', + `custom_notes` text, PRIMARY KEY (`customerid`), UNIQUE KEY `loginname` (`loginname`) ) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci; @@ -532,7 +534,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'password_alpha_upper', '1'), ('panel', 'password_numeric', '0'), ('panel', 'password_special_char_required', '0'), - ('panel', 'password_special_char', '!?<>§$%&+#=@'), + ('panel', 'password_special_char', '!?<>§$%+#=@'), ('panel', 'version', '0.9.33-rc1'); diff --git a/lib/formfields/admin/admin/formfield.admin_add.php b/lib/formfields/admin/admin/formfield.admin_add.php index 57ba4723..dcb282a7 100644 --- a/lib/formfields/admin/admin/formfield.admin_add.php +++ b/lib/formfields/admin/admin/formfield.admin_add.php @@ -61,6 +61,14 @@ return array( 'label' => $lng['customer']['email'], 'type' => 'text', 'mandatory' => true + ), + 'custom_notes' => array( + 'style' => 'align-top', + 'label' => $lng['usersettings']['custom_notes']['title'], + 'desc' => $lng['usersettings']['custom_notes']['description'], + 'type' => 'textarea', + 'cols' => 60, + 'rows' => 12 ) ) ), diff --git a/lib/formfields/admin/admin/formfield.admin_edit.php b/lib/formfields/admin/admin/formfield.admin_edit.php index eb5dc7ca..aa096b9e 100644 --- a/lib/formfields/admin/admin/formfield.admin_edit.php +++ b/lib/formfields/admin/admin/formfield.admin_edit.php @@ -74,6 +74,15 @@ return array( 'type' => 'text', 'mandatory' => true, 'value' => $result['email'] + ), + 'custom_notes' => array( + 'style' => 'align-top', + 'label' => $lng['usersettings']['custom_notes']['title'], + 'desc' => $lng['usersettings']['custom_notes']['description'], + 'type' => 'textarea', + 'cols' => 60, + 'rows' => 12, + 'value' => $result['custom_notes'] ) ) ), diff --git a/lib/formfields/admin/customer/formfield.customer_add.php b/lib/formfields/admin/customer/formfield.customer_add.php index 50ac5436..fb239e32 100644 --- a/lib/formfields/admin/customer/formfield.customer_add.php +++ b/lib/formfields/admin/customer/formfield.customer_add.php @@ -122,6 +122,14 @@ return array( 'customernumber' => array( 'label' => $lng['customer']['customernumber'], 'type' => 'text' + ), + 'custom_notes' => array( + 'style' => 'align-top', + 'label' => $lng['usersettings']['custom_notes']['title'], + 'desc' => $lng['usersettings']['custom_notes']['description'], + 'type' => 'textarea', + 'cols' => 60, + 'rows' => 12 ) ) ), diff --git a/lib/formfields/admin/customer/formfield.customer_edit.php b/lib/formfields/admin/customer/formfield.customer_edit.php index 6d829598..a9fc5bf5 100644 --- a/lib/formfields/admin/customer/formfield.customer_edit.php +++ b/lib/formfields/admin/customer/formfield.customer_edit.php @@ -130,6 +130,15 @@ return array( 'label' => $lng['customer']['customernumber'], 'type' => 'text', 'value' => $result['customernumber'] + ), + 'custom_notes' => array( + 'style' => 'align-top', + 'label' => $lng['usersettings']['custom_notes']['title'], + 'desc' => $lng['usersettings']['custom_notes']['description'], + 'type' => 'textarea', + 'cols' => 60, + 'rows' => 12, + 'value' => $result['custom_notes'] ) ) ), diff --git a/lng/english.lng.php b/lng/english.lng.php index dad9683e..253377bd 100644 --- a/lng/english.lng.php +++ b/lng/english.lng.php @@ -1833,3 +1833,5 @@ $lng['success']['domain_import_successfully'] = 'Successfully imported %s domain $lng['error']['domain_import_error'] = 'Following error occurred while importing domains: %s'; $lng['admin']['note'] = 'Note'; $lng['domains']['import_description'] = 'Detailed information about the structure of the import-file and how to import successfully, please visit http://redmine.froxlor.org/projects/froxlor/wiki/DomainBulkActionDoc'; +$lng['usersettings']['custom_notes']['title'] = 'Custom notes'; +$lng['usersettings']['custom_notes']['description'] = 'Feel free to put any notes you want/need in here. They will show up in the admin/customer overview for the corresponding user.'; diff --git a/lng/german.lng.php b/lng/german.lng.php index accc2b60..bba6e5d1 100644 --- a/lng/german.lng.php +++ b/lng/german.lng.php @@ -1560,3 +1560,5 @@ $lng['success']['domain_import_successfully'] = 'Erfolgreich %s Domains importie $lng['error']['domain_import_error'] = 'Der folgende Fehler trat beim Importieren der Domains auf: %s'; $lng['admin']['note'] = 'Hinweis'; $lng['domains']['import_description'] = 'Detaillierte Informationen über den Aufbau der Importdatei und einen erfolgreichen Import gibt es hier: http://redmine.froxlor.org/projects/froxlor/wiki/DomainBulkActionDoc (englisch)'; +$lng['usersettings']['custom_notes']['title'] = 'Eigene Notizen'; +$lng['usersettings']['custom_notes']['description'] = 'Hier können Notizen je nach Lust und Laune eingetragen werden. Diese werden in der Administrator/Kunden-Übersicht bei dem jeweiligen Benutzer angezeigt.'; diff --git a/templates/Sparkle/admin/admins/admins_admin.tpl b/templates/Sparkle/admin/admins/admins_admin.tpl index 4dd5b0ab..480d612a 100644 --- a/templates/Sparkle/admin/admins/admins_admin.tpl +++ b/templates/Sparkle/admin/admins/admins_admin.tpl @@ -60,5 +60,15 @@ {$lng['panel']['delete']} + +  {$lng['usersettings']['custom_notes']['title']} + + + + + {$row['custom_notes']} + + + diff --git a/templates/Sparkle/admin/customers/customers_customer.tpl b/templates/Sparkle/admin/customers/customers_customer.tpl index 7847d947..cf92462f 100644 --- a/templates/Sparkle/admin/customers/customers_customer.tpl +++ b/templates/Sparkle/admin/customers/customers_customer.tpl @@ -66,12 +66,21 @@   {$lng['panel']['delete']} -   - - - {$lng['panel']['unlock']} + +   + {$lng['panel']['unlock']} + + + +  {$lng['usersettings']['custom_notes']['title']} - + + + + {$row['custom_notes']} + + + diff --git a/templates/Sparkle/assets/css/main.css b/templates/Sparkle/assets/css/main.css index 536ab331..5ab796fe 100644 --- a/templates/Sparkle/assets/css/main.css +++ b/templates/Sparkle/assets/css/main.css @@ -1401,3 +1401,7 @@ table thead th.tablesorter-headerDesc { border: 1px solid #ccc; padding: 4px; } + +.notes_block { + display: none; +} diff --git a/templates/Sparkle/assets/js/main.js b/templates/Sparkle/assets/js/main.js index e1116631..3845df30 100644 --- a/templates/Sparkle/assets/js/main.js +++ b/templates/Sparkle/assets/js/main.js @@ -40,6 +40,10 @@ $(document).ready(function() { $(".tipper").tipper({ direction: "right" }); + // Enable notes + $(".notes").click(function() { + $("#notes_" + $(this).attr("data-id")).toggle("slow"); + }) // Enable reset search click $(".resetsearch").click(function() { $(".searchtext").val("");