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
7f16456c
authored
2011-01-29 18:03:31 +0000
by
Kevin Burton
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
new drop downs for province/country
1 parent
0d72c06e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
95 deletions
com/HTML/HTML.php
com/UserManager/views/edit_user_overview.php
com/UserManager/views/edit_user_profile.php
com/HTML/HTML.php
View file @
7f16456
This diff is collapsed.
Click to expand it.
com/UserManager/views/edit_user_overview.php
View file @
7f16456
...
...
@@ -17,17 +17,19 @@ use WP_User, WP_Roles;
$uid
=
$user
->
ID
;
$account
=
new
User\Account
(
$uid
);
$pp
=
get_user_meta
(
$uid
,
'profile_preference'
,
true
)
.
'_'
;
$first_name
=
get_user_meta
(
$uid
,
'first_name'
,
true
);
$last_name
=
get_user_meta
(
$uid
,
'last_name'
,
true
);
// contact info.
$country
=
get_user_meta
(
$uid
,
'country'
,
true
);
$country
=
get_user_meta
(
$uid
,
$pp
.
'country'
,
true
);
$mobile
=
get_user_meta
(
$uid
,
'mobile'
,
true
);
$email
=
$user
->
user_email
;
//get_user_meta($uid, 'email', true);
// professional stuff
$title
=
get_user_meta
(
$uid
,
'title'
,
true
);
$company
=
get_user_meta
(
$uid
,
'company'
,
true
);
$company
=
get_user_meta
(
$uid
,
'company
_name
'
,
true
);
// status
$status
=
get_user_meta
(
$uid
,
'status'
,
true
);
...
...
@@ -80,54 +82,7 @@ use WP_User, WP_Roles;
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$address
))
:
?>
<tr>
<th>
Address:
</th>
<td>
<?php
echo
$address
;
if
(
!
empty
(
$address2
))
{
echo
"<br />"
.
$address2
;
}
?>
</td>
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$city
))
:
?>
<tr>
<th>
City:
</th>
<td>
<?php
echo
$city
;
?>
</td>
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$province
))
:
?>
<tr>
<th>
Province:
</th>
<td>
<?php
echo
$province
;
?>
</td>
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$country
))
:
?>
<tr>
<th>
Country:
</th>
<td>
<?php
echo
$country
;
?>
</td>
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$phone
))
:
?>
<tr>
<th>
Phone:
</th>
<td>
<?php
echo
$phone
;
?>
</td>
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$fax
))
:
?>
<tr>
<th>
Fax:
</th>
<td>
<?php
echo
$fax
;
?>
</td>
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$mobile
))
:
?>
<tr>
<th>
Mobile:
</th>
<td>
<?php
echo
$mobile
;
?>
</td>
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$email
))
:
?>
<tr>
...
...
@@ -136,12 +91,7 @@ use WP_User, WP_Roles;
</tr>
<?php
endif
;
?>
<?php
if
(
!
empty
(
$website
))
:
?>
<tr>
<th>
Website:
</th>
<td>
<?php
echo
$website
;
?>
</td>
</tr>
<?php
endif
;
?>
</tbody>
</table>
...
...
com/UserManager/views/edit_user_profile.php
View file @
7f16456
...
...
@@ -131,32 +131,18 @@ $preference = get_user_meta($user->ID, 'email_address_preference', true);
<td><input
type=
"text"
name=
"home_city"
value=
"
<?php
echo
get_user_meta
(
$_GET
[
'uid'
],
'home_city'
,
true
);
?>
"
/></td>
</tr>
<tr>
<th>
Country:
</th>
<td>
<?php
echo
HTML\form_dropdown
(
'home_country'
,
HTML\Vars
::
$countries
,
get_user_meta
(
$_GET
[
'uid'
],
'home_country'
,
true
),
"id='home_country'"
);
?>
</td>
</tr>
<tr>
<th>
State/Province:
</th>
<td>
<select
name=
"home_province"
>
<option
disabled
value=
""
>
Select a State/Province
</option>
<optgroup
label=
"Canada"
>
<?php
HTML\select_opts_provinces
(
get_user_meta
(
$_GET
[
'uid'
],
'home_province'
,
true
));
?>
</optgroup>
<optgroup
label=
"United States"
>
<?php
HTML\select_opts_states
(
get_user_meta
(
$_GET
[
'uid'
],
'home_province'
,
true
));
?>
</optgroup>
</select>
</td>
<td>
<?php
echo
HTML\form_linked_dropdown
(
'home_province'
,
'home_country'
,
HTML\Vars
::
$provinces
,
get_user_meta
(
$_GET
[
'uid'
],
'home_country'
,
true
),
get_user_meta
(
$_GET
[
'uid'
],
'home_province'
,
true
));
?>
</td>
</tr>
<tr>
<th>
Postal:
</th>
<td><input
type=
"text"
name=
"home_postal"
value=
"
<?php
echo
get_user_meta
(
$_GET
[
'uid'
],
'home_postal'
,
true
);
?>
"
/></td>
</tr>
<tr>
<th>
Country:
</th>
<td>
<select
name=
"home_country"
>
<?php
HTML\select_opts_countries
(
get_user_meta
(
$_GET
[
'uid'
],
'home_country'
,
true
));
?>
</select>
</td>
</tr>
<tr>
<th>
Phone:
</th>
<td><input
type=
"text"
name=
"home_phone"
value=
"
<?php
echo
get_user_meta
(
$_GET
[
'uid'
],
'home_phone'
,
true
);
?>
"
rel=
"mask-phone"
/></td>
...
...
@@ -200,32 +186,19 @@ $preference = get_user_meta($user->ID, 'email_address_preference', true);
<td><input
type=
"text"
name=
"work_city"
value=
"
<?php
echo
get_user_meta
(
$_GET
[
'uid'
],
'work_city'
,
true
);
?>
"
/></td>
</tr>
<tr>
<th>
Country:
</th>
<td>
<?php
echo
HTML\form_dropdown
(
'work_country'
,
HTML\Vars
::
$countries
,
get_user_meta
(
$_GET
[
'uid'
],
'work_country'
,
true
),
"id='work_country'"
);
?>
</td>
</tr>
<tr>
<th>
State/Province:
</th>
<td>
<select
name=
"work_province"
>
<option
disabled
value=
""
>
Select a State/Province
</option>
<optgroup
label=
"Canada"
>
<?php
HTML\select_opts_provinces
(
get_user_meta
(
$_GET
[
'uid'
],
'work_province'
,
true
));
?>
</optgroup>
<optgroup
label=
"United States"
>
<?php
HTML\select_opts_states
(
get_user_meta
(
$_GET
[
'uid'
],
'work_province'
,
true
));
?>
</optgroup>
</select>
</td>
<td>
<?php
echo
HTML\form_linked_dropdown
(
'work_province'
,
'work_country'
,
HTML\Vars
::
$provinces
,
get_user_meta
(
$_GET
[
'uid'
],
'work_country'
,
true
),
get_user_meta
(
$_GET
[
'uid'
],
'work_province'
,
true
));
?>
</td>
</tr>
<tr>
<th>
Postal:
</th>
<td><input
type=
"text"
name=
"work_postal"
value=
"
<?php
echo
get_user_meta
(
$_GET
[
'uid'
],
'work_postal'
,
true
);
?>
"
/></td>
</tr>
<tr>
<th>
Country:
</th>
<td>
<select
name=
"work_country"
>
<?php
HTML\select_opts_countries
(
get_user_meta
(
$_GET
[
'uid'
],
'work_country'
,
true
));
?>
</select>
</td>
</tr>
<tr>
<th>
Phone:
</th>
<td><input
type=
"text"
name=
"work_phone"
value=
"
<?php
echo
get_user_meta
(
$_GET
[
'uid'
],
'work_phone'
,
true
);
?>
"
rel=
"mask-phone"
/></td>
...
...
Please
register
or
sign in
to post a comment