mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
add custom-notes field to admins and customers, fixes #1471
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
parent
4e9b2d0e97
commit
7b8885c05e
@ -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++;
|
||||
}
|
||||
|
@ -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++;
|
||||
}
|
||||
|
@ -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');
|
||||
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -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']
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -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
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -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']
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -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 <a href="http://redmine.froxlor.org/projects/froxlor/wiki/DomainBulkActionDoc" target="_blank">http://redmine.froxlor.org/projects/froxlor/wiki/DomainBulkActionDoc</a>';
|
||||
$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.';
|
||||
|
@ -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: <a href="http://redmine.froxlor.org/projects/froxlor/wiki/DomainBulkActionDoc" target="_blank">http://redmine.froxlor.org/projects/froxlor/wiki/DomainBulkActionDoc</a> (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.';
|
||||
|
10
templates/Sparkle/admin/admins/admins_admin.tpl
vendored
10
templates/Sparkle/admin/admins/admins_admin.tpl
vendored
@ -60,5 +60,15 @@
|
||||
<a href="{$linker->getLink(array('section' => 'admins', 'page' => $page, 'action' => 'delete', 'id' => $row['adminid']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="{$lng['panel']['delete']}" title="{$lng['panel']['delete']}" />
|
||||
</a>
|
||||
<if $row['custom_notes'] != ''>
|
||||
<img src="templates/{$theme}/assets/img/icons/info.png" class="notes" data-id="{$row['loginname']}" alt="{$lng['usersettings']['custom_notes']['title']}" title="{$lng['usersettings']['custom_notes']['title']}" />
|
||||
</if>
|
||||
</td>
|
||||
</tr>
|
||||
<if $row['custom_notes'] != ''>
|
||||
<tr class="notes_block" id="notes_{$row['loginname']}">
|
||||
<td colspan="5">
|
||||
{$row['custom_notes']}
|
||||
</td>
|
||||
</tr>
|
||||
</if>
|
||||
|
@ -66,12 +66,21 @@
|
||||
</a>
|
||||
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'delete', 'id' => $row['customerid']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="{$lng['panel']['delete']}" title="{$lng['panel']['delete']}" />
|
||||
</a>
|
||||
<if $islocked == 1>
|
||||
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'unlock', 'id' => $row['customerid']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/unlock.png" alt="{$lng['panel']['unlock']}" title="{$lng['panel']['unlock']}" />
|
||||
</a>
|
||||
<if $islocked == 1>
|
||||
<a href="{$linker->getLink(array('section' => 'customers', 'page' => $page, 'action' => 'unlock', 'id' => $row['customerid']))}">
|
||||
<img src="templates/{$theme}/assets/img/icons/unlock.png" alt="{$lng['panel']['unlock']}" title="{$lng['panel']['unlock']}" />
|
||||
</a>
|
||||
</if>
|
||||
<if $row['custom_notes'] != ''>
|
||||
<img src="templates/{$theme}/assets/img/icons/info.png" class="notes" data-id="{$row['loginname']}" alt="{$lng['usersettings']['custom_notes']['title']}" title="{$lng['usersettings']['custom_notes']['title']}" />
|
||||
</if>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<if $row['custom_notes'] != ''>
|
||||
<tr class="notes_block" id="notes_{$row['loginname']}">
|
||||
<td colspan="6">
|
||||
{$row['custom_notes']}
|
||||
</td>
|
||||
</tr>
|
||||
</if>
|
||||
|
4
templates/Sparkle/assets/css/main.css
vendored
4
templates/Sparkle/assets/css/main.css
vendored
@ -1401,3 +1401,7 @@ table thead th.tablesorter-headerDesc {
|
||||
border: 1px solid #ccc;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.notes_block {
|
||||
display: none;
|
||||
}
|
||||
|
4
templates/Sparkle/assets/js/main.js
vendored
4
templates/Sparkle/assets/js/main.js
vendored
@ -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("");
|
||||
|
Loading…
Reference in New Issue
Block a user