Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f8bfb124
authored
2010-12-16 00:17:56 +0000
by
Kevin Burton
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updates to the User Manager
1 parent
9ed22bd4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
8 deletions
com/UserManager/UserManager.js
com/UserManager/UserManager.php
com/UserManager/views/create_user.php
com/UserManager/views/display_users.php
com/UserManager/views/partials/edit_cehour.php
com/UserManager/views/partials/edit_event.php
com/UserManager/UserManager.js
View file @
f8bfb12
...
...
@@ -20,6 +20,28 @@ jQuery(function() {
}
);
}
jQuery
(
'.remove-user'
).
colorbox
({
onComplete
:
function
()
{
/*
var cb = this;
var options = {
beforeSubmit: function() {}
, success: function(data) {
if (data.refresh == "true") {
document.location.href = document.location.href;
} else {
jQuery.colorbox.close();
}
}
, data: ({ajax:"yes", action: 'update_registration'})
, dataType: 'json'
, url: '/wp-admin/admin-ajax.php'
};
jQuery('#edit-event-form').ajaxForm(options);
*/
}});
jQuery
(
'#admin-edit-user-profile'
).
ajaxForm
({
url
:
'/wp-admin/admin-ajax.php'
...
...
com/UserManager/UserManager.php
View file @
f8bfb12
...
...
@@ -389,6 +389,14 @@ function run_validation() {
class
Actions
{
public
static
function
wp_ajax_build_user_remove
()
{
ob_start
();
require_once
(
__DIR__
.
DIRECTORY_SEPARATOR
.
'views'
.
DIRECTORY_SEPARATOR
.
'partials'
.
DIRECTORY_SEPARATOR
.
'remove_user.php'
);
$content
=
ob_get_contents
();
ob_end_clean
();
die
(
$content
);
}
public
static
function
wp_ajax_admin_create_user
()
{
run_validation
();
...
...
com/UserManager/views/create_user.php
View file @
f8bfb12
...
...
@@ -110,7 +110,7 @@ unset($rc, $roles['administrator']);
</td>
</tr>
<tr
id=
"create_member_id"
>
<th>
Member ID:
</th>
<th
class=
"member_id_label"
>
Member ID:
</th>
<td><input
type=
"text"
name=
"member_id"
id=
"member_id"
readonly=
"readonly"
/></td>
</tr>
<tr><td
colspan=
"2"
>
</td></tr>
...
...
@@ -146,12 +146,18 @@ unset($rc, $roles['administrator']);
var
$role_selector
=
$
(
'#create_user_role'
);
var
$member_id_container
=
$
(
'#create_member_id'
);
var
$member_id_label
=
$
(
'.member_id_label'
);
var
$member_id_field
=
$
(
'#member_id'
);
var
$form
=
$
(
'#admin-new-user-form'
);
var
$last_name_field
=
$
(
'#create_last_name'
);
function
changedUserRole
()
{
if
(
$role_selector
.
val
()
==
"member"
)
{
if
(
$role_selector
.
val
()
==
"member"
||
$role_selector
.
val
()
==
"student"
)
{
if
(
$role_selector
.
val
()
==
"member"
)
{
$member_id_label
.
html
(
'Member ID:'
);
}
else
{
$member_id_label
.
html
(
'Student ID:'
);
}
updateMemberID
();
$member_id_container
.
show
();
}
else
{
...
...
com/UserManager/views/display_users.php
View file @
f8bfb12
...
...
@@ -86,6 +86,9 @@ if ($filter_role) {
<th
scope=
"col"
width=
"250"
class=
"manage-column"
>
Email
</th>
<th
scope=
"col"
width=
"200"
class=
"manage-column"
>
Role
</th>
<th
scope=
"col"
width=
"100"
class=
"manage-column"
>
Status
</th>
<!--
<th scope="col" width="100" class="manage-column"> </th>
-->
</tr>
</thead>
<tbody>
...
...
@@ -99,6 +102,9 @@ if ($filter_role) {
<td>
<?php
echo
$user
[
'email'
]
?>
</td>
<td>
<?php
echo
$user
[
'role'
]
?>
</td>
<td>
<?php
echo
ucwords
(
$user
[
'status'
]);
?>
</td>
<!--
<td><a href="/wp-admin/admin-ajax.php?ajax=yes&action=build_user_remove&uid=
<?php
echo
$user
[
'uid'
];
?>
" class="remove-user" rel="
<?php
echo
$user
[
'uid'
];
?>
">Remove User</a></td>
-->
</tr>
<?php
endforeach
;
?>
</body>
...
...
com/UserManager/views/partials/edit_cehour.php
View file @
f8bfb12
...
...
@@ -9,7 +9,7 @@
<style
type=
"text/css"
>
html
,
body
{
margin
:
0px
;
padding
:
0
;}
h3
{
.title-link
{
color
:
#f7bd55
;
font-size
:
12px
;
font-weight
:
bold
;
...
...
@@ -19,7 +19,7 @@
border
:
solid
1px
#FFF
;
border-bottom
:
solid
1px
#999
;
cursor
:
default
;
padding
:
0em
;
padding
:
3px
5
px
3px
10px
;
padding
:
0em
;
padding
:
3px
10
px
3px
10px
;
margin
:
0em
;
}
...
...
@@ -34,7 +34,7 @@
<body>
<
h3>
Edit
<?php
echo
$name
;
?>
's CE Hours:
</h3
>
<
div
class=
"title-link"
>
Edit
<?php
echo
$name
;
?>
's CE Hours:
</div
>
<form
method=
"post"
action=
""
id=
"edit-cehours-form"
>
<input
type=
"hidden"
name=
"uid"
value=
"
<?php
echo
$uid
;
?>
"
/>
...
...
com/UserManager/views/partials/edit_event.php
View file @
f8bfb12
...
...
@@ -9,7 +9,7 @@
<style
type=
"text/css"
>
html
,
body
{
margin
:
0px
;
padding
:
0
;}
h3
{
.title-link
{
color
:
#f7bd55
;
font-size
:
12px
;
font-weight
:
bold
;
...
...
@@ -19,7 +19,7 @@
border
:
solid
1px
#FFF
;
border-bottom
:
solid
1px
#999
;
cursor
:
default
;
padding
:
0em
;
padding
:
3px
5
px
3px
10px
;
padding
:
0em
;
padding
:
3px
10
px
3px
10px
;
margin
:
0em
;
}
...
...
@@ -34,7 +34,7 @@
<body>
<
h3>
<?php
echo
$post
->
post_title
;
?>
</h3
>
<
div
class=
"title-link"
>
<?php
echo
$post
->
post_title
;
?>
</div
>
<?php
$extras
=
$user_event_meta
[
'extras'
];
...
...
Please
register
or
sign in
to post a comment