Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PlanetRed
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Experience Group
PlanetRed
Commits
1b1d8273
Commit
1b1d8273
authored
15 years ago
by
Matthew Juhl
Browse files
Options
Downloads
Patches
Plain Diff
More profile editor awesomeness.
parent
2114e1c1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
unl_theme/views/default/page_elements/header.php
+23
-6
23 additions, 6 deletions
unl_theme/views/default/page_elements/header.php
with
23 additions
and
6 deletions
unl_theme/views/default/page_elements/header.php
+
23
−
6
View file @
1b1d8273
...
...
@@ -71,7 +71,7 @@ if ($vars['title'] == "Edit profile") {
(
function
(){
// Edit Profile Stuff
function
updateLL
()
{
var
city
=
$
(
"
input[name=form_data_profile_city]
"
).
val
(),
state
=
$
(
"
inpu
t[name=form_data_profile_state]
"
).
val
(),
country
=
$
(
"
inpu
t[name=form_data_profile_country]
"
).
val
();
var
city
=
$
(
"
input[name=form_data_profile_city]
"
).
val
(),
state
=
$
(
"
selec
t[name=form_data_profile_state]
"
).
val
(),
country
=
$
(
"
selec
t[name=form_data_profile_country]
"
).
val
();
$
.
get
(
"
<?php
echo
$vars
[
'url'
];
?>
mod/unl_theme/scripts/latlon.php
"
,{
city
:
city
,
state
:
state
,
country
:
country
},
function
(
response
){
try
{
var
data
=
eval
(
response
);
...
...
@@ -81,10 +81,21 @@ if ($vars['title'] == "Edit profile") {
});
};
function
updateLLhome
()
{
var
city
=
$
(
"
input[name=form_data_profile_homecity]
"
).
val
(),
state
=
$
(
"
select[name=form_data_profile_homestate]
"
).
val
(),
country
=
$
(
"
select[name=form_data_profile_homecountry]
"
).
val
();
$
.
get
(
"
<?php
echo
$vars
[
'url'
];
?>
mod/unl_theme/scripts/latlon.php
"
,{
city
:
city
,
state
:
state
,
country
:
country
},
function
(
response
){
try
{
var
data
=
eval
(
response
);
$
(
"
input[name=form_data_hometown_latitude]
"
).
val
(
data
.
latitude
);
$
(
"
input[name=form_data_hometown_longitude]
"
).
val
(
data
.
longitude
);
}
catch
(
e
)
{}
});
};
$
(
document
).
ready
(
function
(){
/* SET UP PROFILE EDIT FORM */
$
(
"
form.cool fieldset:first-child
"
).
css
(
"
margin-top
"
,
"
0
"
);
$
(
"
p.form-description
"
).
remove
();
// get the year and country values for later use
var
dob_year
=
$
(
"
input[name=form_data_profile_dob_year]
"
).
val
();
...
...
@@ -131,8 +142,8 @@ if ($vars['title'] == "Edit profile") {
var
to_parent
=
$
(
"
input[name=form_data_profile_attended_to]
"
).
parent
();
$
(
"
input[name=form_data_profile_attended_to]
"
).
remove
();
country_
parent
.
parent
().
css
(
"
border-bottom
"
,
"
#CCC 1px dotted
"
);
$
(
"
input[name=form_data_profile_city]
"
).
parent
().
parent
().
css
(
"
border-top
"
,
"
#CCC 1px dotted
"
);
$
(
"
input[name=form_data_map_explanation]
"
).
parent
()
.
parent
().
css
(
"
border-bottom
"
,
"
#CCC 1px dotted
"
);
$
(
"
input[name=form_data_profile_city]
"
).
parent
().
parent
().
prepend
(
'
<h6 style="width:150px;margin:0;text-align:right;"><strong>Your Map Location</strong></h6>
'
);
/* set up various year inputs */
...
...
@@ -454,10 +465,16 @@ if ($vars['title'] == "Edit profile") {
// don't display the latitude/longitude fields
$
(
"
input[name=form_data_latitude],input[name=form_data_longitude]
"
).
parent
().
parent
().
hide
();
// update the lat/long automatically whenever current location is changed
$
(
"
input[name=form_data_profile_city],
inpu
t[name=form_data_profile_state],
inpu
t[name=form_data_profile_country]
"
).
change
(
function
(){
$
(
"
input[name=form_data_profile_city],
selec
t[name=form_data_profile_state],
selec
t[name=form_data_profile_country]
"
).
change
(
function
(){
updateLL
();
});
$
(
"
input[name=form_data_hometown_latitude],input[name=form_data_hometown_longitude]
"
).
parent
().
parent
().
hide
();
// update the lat/long automatically whenever current location is changed
$
(
"
input[name=form_data_profile_homecity],select[name=form_data_profile_homestate],select[name=form_data_profile_homecountry]
"
).
change
(
function
(){
updateLLhome
();
});
$
(
"
form.cool label
"
).
each
(
function
(){
if
(
this
.
innerHTML
.
match
(
/day/i
)
||
this
.
innerHTML
.
match
(
/year
\s
*$/i
)
){
$
(
this
).
parent
().
remove
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment