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
4129e7ab
Commit
4129e7ab
authored
15 years ago
by
Matthew Juhl
Browse files
Options
Downloads
Patches
Plain Diff
Profile editor view fixes
parent
21f3e616
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flexprofile_mj/views/default/profile/edit.php
+3
-3
3 additions, 3 deletions
flexprofile_mj/views/default/profile/edit.php
unl_theme/views/default/page_elements/header.php
+75
-1
75 additions, 1 deletion
unl_theme/views/default/page_elements/header.php
with
78 additions
and
4 deletions
flexprofile_mj/views/default/profile/edit.php
+
3
−
3
View file @
4129e7ab
...
...
@@ -26,10 +26,10 @@ if ($form) {
/* import forms css */
echo
'<style type="text/css">@IMPORT url("/wdn/templates_3.0/css/content/forms.css");</style>'
;
/* add 'cool' class to form */
echo
'<div id="formloading"><img src="http://ucommjuhl.unl.edu/wdn/templates_3.0/css/header/images/colorbox/loading.gif" alt="Loading Form" /></div>'
;
echo
'<form action="'
.
$vars
[
'url'
]
.
'action/flexprofile/edit" method="post" enctype="multipart/form-data" class="cool">'
;
/* add fieldset and legend */
echo
'<fieldset><legend>Edit Profile</legend>'
;
echo
'<fieldset><legend>Edit Profile</legend>
<ol>
'
;
/* mjuhl: remove dynamic form by commenting out the following line: */
echo
'<!--------start copying here------------>'
;
echo
elgg_view
(
'form/forms/display_form_content'
,
array
(
'tab_data'
=>
$tab_data
,
'description'
=>
''
,
'preview'
=>
0
,
'form'
=>
$form
,
'form_data_id'
=>
0
));
...
...
@@ -46,7 +46,7 @@ echo '<!--------stop copying here------------>';
<input
type=
"submit"
value=
"
<?php
echo
elgg_echo
(
"save"
);
?>
"
/>
</p>
</ol>
</form>
<?php
}
else
{
...
...
This diff is collapsed.
Click to expand it.
unl_theme/views/default/page_elements/header.php
+
75
−
1
View file @
4129e7ab
...
...
@@ -49,6 +49,24 @@ echo elgg_view('metatags',$vars);
<?php
if
(
$vars
[
'title'
]
==
"Edit profile"
)
{
?>
<style
type=
"text/css"
>
#maincontent
form
.cool
{
display
:
none
;
}
#maincontent
form
.cool
div
.element
{
margin
:
0
;
}
#maincontent
form
.cool
label
{
vertical-align
:
inherit
!important
;
}
#maincontent
form
.cool
fieldset
li
{
padding-bottom
:
15px
;
}
</style>
<script
type=
"text/javascript"
>
(
function
(){
// Edit Profile Stuff
...
...
@@ -64,12 +82,68 @@ if ($vars['title'] == "Edit profile") {
};
$
(
document
).
ready
(
function
(){
/* SET UP PROFILE EDIT FORM */
// get the dob_year for later use
var
dob_year
=
$
(
"
input[name=form_data_profile_dob_year]
"
).
val
();
// remove the text input. will be replacing with a selector
$
(
"
input[name=form_data_profile_dob_year]
"
).
remove
();
// wrap the fields in
<
li
>
s
$
(
"
form.cool label
"
).
wrap
(
"
<li></li>
"
);
$
(
"
form.cool label br
"
).
remove
();
$
(
"
form.cool p.form-field-description
"
).
each
(
function
(){
$
(
this
).
appendTo
(
$
(
this
).
prev
()).
css
({
marginLeft
:
"
162px
"
,
fontSize
:
"
75%
"
,
color
:
"
#1091D1
"
});
});
$
(
"
form.cool fieldset input, form.cool fieldset select
"
).
wrap
(
'
<div class="element"></div>
'
);
$
(
"
form.cool label div
"
).
each
(
function
(){
$
(
this
).
insertAfter
(
$
(
this
).
parent
());
});
var
selYear
=
document
.
createElement
(
"
select
"
);
selYear
.
name
=
"
form_data_profile_dob_year
"
;
var
x
=
1900
,
html
=
""
;
while
(
x
++
<
(
new
Date
()).
getFullYear
())
{
html
+=
'
<option
'
;
if
(
x
==
dob_year
)
{
html
+=
'
selected="selected"
'
}
html
+=
'
>
'
+
x
+
'
</option>
'
;
}
selYear
.
innerHTML
=
html
;
$
(
"
select[name=form_data_profile_dob_month]
"
).
parent
().
append
(
selYear
);
$
(
"
select[name=form_data_profile_dob_day]
"
).
insertBefore
(
$
(
"
select[name=form_data_profile_dob_year]
"
));
// don't display the latitude/longitude fields
$
(
"
input[name=form_data_latitude],input[name=form_data_longitude]
"
).
parent
().
hide
();
$
(
"
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],input[name=form_data_profile_state],input[name=form_data_profile_country]
"
).
change
(
function
(){
updateLL
();
});
$
(
"
form.cool label
"
).
each
(
function
(){
if
(
this
.
innerHTML
.
match
(
/day/i
)
||
this
.
innerHTML
.
match
(
/year
\s
*$/i
)
){
$
(
this
).
parent
().
remove
();
}
else
if
(
this
.
innerHTML
.
match
(
/month/i
))
{
this
.
innerHTML
=
"
Birthday
"
;
}
});
$
(
"
#formloading
"
).
remove
();
$
(
"
#maincontent form.cool
"
).
show
();
});
})();
</script>
...
...
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