diff options
author | heper <heper@users.noreply.github.com> | 2015-11-09 20:39:50 +0100 |
---|---|---|
committer | heper <heper@users.noreply.github.com> | 2015-11-09 20:39:50 +0100 |
commit | 408d0882851c206974e79a42e75483a7d6a55542 (patch) | |
tree | ebde58947e726e321932dc9c9bb4eb3902e9c0d7 /src/usr/local/www/system_usermanager.php | |
parent | 2c1a58b64f65621697dcb8028fd5ef6d8c1f1ca4 (diff) | |
download | pfsense-408d0882851c206974e79a42e75483a7d6a55542.zip pfsense-408d0882851c206974e79a42e75483a7d6a55542.tar.gz |
partial fix Bug #5389
Diffstat (limited to 'src/usr/local/www/system_usermanager.php')
-rw-r--r-- | src/usr/local/www/system_usermanager.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php index 7674ad7..353768e 100644 --- a/src/usr/local/www/system_usermanager.php +++ b/src/usr/local/www/system_usermanager.php @@ -268,9 +268,11 @@ if ($_POST['save']) { input_errors2Ajax($input_errors); exit; } - + echo "privid: "; + echo $_POST['privid']; if (!$input_errors) { // This used to be a separate act=delpriv + if ($a_user[$id] && !empty($_POST['privid'])) { foreach ($_POST['privid'] as $i) unset($a_user[$id]['priv'][$i]); @@ -390,6 +392,7 @@ function build_priv_table() { $privhtml .= '<td>' . htmlspecialchars($priv['group']) . '</td>'; $privhtml .= '<td>' . htmlspecialchars($priv['name']) . '</td>'; $privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>'; + $privhtml .= '<td><a class="fa fa-trash" title="'.gettext('Delete Privilege').'" id="delprivid' .$i. '"></a></td>'; $privhtml .= '</tr>'; } @@ -893,6 +896,15 @@ events.push(function(){ $('form').submit(); } }); + $('[id^=delprivid]').click(function(event) { + if(confirm(event.target.title)) { + $('#privid).val(event.target.id.match(/\d+$/)[0]); + $('#userid').val('<?=$id;?>'); + $('#act').val('delprivid'); + $('form').submit(); + } + }); + // ---------- On initial page load ------------------------------------------------------------ |