Skip to content
Snippets Groups Projects
Commit 232a7fff authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

move profile edit JS to the head

parent 6c2cc772
No related branches found
No related tags found
No related merge requests found
......@@ -46,45 +46,34 @@ if (isset($pickerinuse) && $pickerinuse == true) { ?>
echo $feedref;
echo elgg_view('metatags',$vars);
?>
<?php
if (preg_match('/friend/', $vars['title'])) { // if on a friends page, interst link to allow user to browse the whole social network
echo '
<?php if (preg_match('/friend/', $vars['title'])) { ?>
<script type="text/javascript">
WDN.jQuery(document).ready(function(){
WDN.jQuery("#content_area_user_title h2").after("<p><a href=\'' . $CONFIG->url .'mod/members/\'>Browse all the Planet Red users</a> to find your Husker friends!</p>");
WDN.jQuery("#content_area_user_title h2").after('<p><a href="<?php echo $CONFIG->url;?>mod/members/">Browse all the Planet Red users</a> to find your Husker friends!</p>');
});
</script>';
} // end if on a friends page
?>
</script>
<?php } ?>
<?php
if (!isloggedin()) { //The styles for the information box to be displayed if a non-authenticated user has arrived.
?>
<?php if (!isloggedin()) { //The styles for the information box to be displayed if a non-authenticated user has arrived. ?>
<script type="text/javascript" src="<?php echo $vars['url'] .'mod/unl_theme/scripts/JS/actionNotice.js'?>"></script>
<?php
} //end if not logged in
?>
<?php } ?>
<?php
if ($vars['title'] == "Edit profile") { //CSS and JS for only the profile form page.
?>
<style type="text/css">
#profileEditor input[name$="city"] {
text-transform: capitalize;
}
input[name=form_data_profile_city], select[name=form_data_profile_state], select[name=form_data_profile_country],
input[name=form_data_profile_homecity], select[name=form_data_profile_homestate], select[name=form_data_profile_homecountry],
select[name=form_data_profile_dob_month], select[name=form_data_profile_dob_day], select[name=form_data_profile_dob_year] {
width: auto !important;
margin-right: 4px;
}
</style>
<?php
} // end if on edit profile page
<?php if ($vars['title'] == "Edit profile") { //CSS and JS for only the profile edit form page.
require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/unl_theme/scripts/JS/enhanceProfileForm.php');
?>
<style type="text/css">
#profileEditor input[name$="city"] {
text-transform: capitalize;
}
input[name=form_data_profile_city], select[name=form_data_profile_state], select[name=form_data_profile_country],
input[name=form_data_profile_homecity], select[name=form_data_profile_homestate], select[name=form_data_profile_homecountry],
select[name=form_data_profile_dob_month], select[name=form_data_profile_dob_day], select[name=form_data_profile_dob_year] {
width: auto !important;
margin-right: 4px;
}
</style>
<?php } ?>
......@@ -13,7 +13,6 @@
// Load flexprofile model
require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/flexprofile/models/model.php");
require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/unl_theme/scripts/JS/enhanceProfileForm.php');
$user = $vars['entity'];
$form = flexprofile_get_profile_form($user);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment