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
d13f995c
Commit
d13f995c
authored
15 years ago
by
Matthew Juhl
Browse files
Options
Downloads
Patches
Plain Diff
Initial work on mobile profile editor.
parent
e1cbbbe0
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
plugins/mobile_unl/views/mobile/form/forms/display_form_content.php
+61
-0
61 additions, 0 deletions
...bile_unl/views/mobile/form/forms/display_form_content.php
plugins/mobile_unl/views/mobile/profile/edit.php
+73
-0
73 additions, 0 deletions
plugins/mobile_unl/views/mobile/profile/edit.php
with
134 additions
and
0 deletions
plugins/mobile_unl/views/mobile/form/forms/display_form_content.php
0 → 100644
+
61
−
0
View file @
d13f995c
<?php
/**
* Elgg form display
*
* @package Elgg
* @subpackage Form
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Kevin Jardine <kevin@radagast.biz>
* @copyright Radagast Solutions 2008
* @link http://radagast.biz/
*/
$tab_data
=
$vars
[
'tab_data'
];
$form
=
$vars
[
'form'
];
$preview
=
$vars
[
'preview'
];
$form_data_id
=
$vars
[
'form_data_id'
];
if
(
isset
(
$vars
[
'description'
]))
{
$description
=
$vars
[
'description'
];
}
else
{
$description
=
form_t
(
$form
,
'description'
);
}
if
(
$preview
)
{
$body
=
'<p class="form-description">'
.
elgg_echo
(
'form:preview_description'
)
.
'</p>'
;
}
else
{
$body
=
''
;
}
$body
.
=
elgg_view
(
'input/hidden'
,
array
(
'internalname'
=>
'form_id'
,
'value'
=>
$form
->
getGUID
()));
$body
.
=
elgg_view
(
'input/hidden'
,
array
(
'internalname'
=>
'preview'
,
'value'
=>
$preview
));
$body
.
=
elgg_view
(
'input/hidden'
,
array
(
'internalname'
=>
'form_data_id'
,
'value'
=>
$form_data_id
));
$body
.
=
"<p class=
\"
form-description
\"
>
$description
</p>"
;
if
(
count
(
$tab_data
)
>
1
)
{
$body
.
=
<<<
END
<
script
type
=
"text/javascript"
src
=
"
{
$CONFIG
->
wwwroot
}
mod/form/tabber/tabber.js"
></
script
>
<
link
rel
=
"stylesheet"
href
=
"
{
$CONFIG
->
wwwroot
}
mod/form/tabber/example.css"
type
=
"text/css"
media
=
"screen"
/>
END
;
$body
.
=
'<div class="tabber">'
;
$body
.
=
'<div class="tabberloading" ></div>'
;
foreach
(
$tab_data
as
$tab
=>
$html
)
{
if
(
$html
)
{
$body
.
=
"<div class=
\"
tabbertab
\"
title=
\"
$tab
\"
>"
;
$body
.
=
$html
;
$body
.
=
"</div>
\n
"
;
}
}
$body
.
=
'</div>'
;
}
else
if
(
count
(
$tab_data
)
==
1
)
{
foreach
(
$tab_data
as
$tab
=>
$html
)
{
$body
.
=
$html
;
}
}
echo
$body
;
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
plugins/mobile_unl/views/mobile/profile/edit.php
0 → 100644
+
73
−
0
View file @
d13f995c
<?php
/**
* Elgg flex profile edit form
* Modified for UNL mobile planetred
* Allows user to edit profile
*
* @package Elgg
* @subpackage Form
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Kevin Jardine <kevin@radagast.biz>
* @copyright Radagast Solutions 2008
* @link http://radagast.biz/
*/
// Load flexprofile model
require_once
(
dirname
(
dirname
(
dirname
(
dirname
(
dirname
(
__FILE__
)))))
.
"/flexprofile/models/model.php"
);
$user
=
$vars
[
'entity'
];
$form
=
flexprofile_get_profile_form
(
$user
);
if
(
$form
)
{
$tab_data
=
flexprofile_get_data_for_edit_form
(
$form
,
$user
);
/* mjuhl: begin modification for UNL */
// nope, remove this:
//echo '<div class="contentWrapper">';
if
(
$_GET
[
'firstlogin'
]
==
'yes'
){
?>
<div
class=
"zenbox soothing"
>
<h3>
Thanks for joining Planet Red!
</h3>
<p>
You're just a few quick steps from putting yourself on the map. Start by filling out your profile information.
</p>
</div>
<?php
}
/* 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="/wdn/templates_3.0/css/header/images/colorbox/loading.gif" alt="Loading Form" /><noscript>Please enable JavaScript to use the profile editor.</noscript></div>';
echo
'<form style="margin-top: 24px" action="'
.
$vars
[
'url'
]
.
'action/flexprofile/edit" method="post" enctype="multipart/form-data" class="cool">'
;
/* add fieldset and legend */
echo
'<fieldset><legend>Edit Information</legend><ol>'
;
echo
elgg_view
(
'form/forms/display_form_content'
,
array
(
'tab_data'
=>
$tab_data
,
'description'
=>
''
,
'preview'
=>
0
,
'form'
=>
$form
,
'form_data_id'
=>
0
));
if
(
$_GET
[
'firstlogin'
]
==
'yes'
){
?>
<input
type=
"hidden"
name=
"firstlogin"
value=
"yes"
/>
<?php
}
?>
<input
type=
"hidden"
name=
"form_id"
value=
"104"
/>
<input
type=
"hidden"
name=
"preview"
value=
"0"
/>
<input
type=
"hidden"
name=
"form_data_id"
value=
"0"
/>
<input
type=
"hidden"
name=
"username"
value=
"
<?php
echo
page_owner_entity
()
->
username
;
?>
"
/>
</fieldset>
<?php
?>
<p
class=
"submit"
>
<input
type=
"submit"
value=
"
<?php
echo
elgg_echo
(
"save"
);
?>
"
/>
</p>
</ol>
</form>
<?php
}
else
{
echo
elgg_echo
(
'form:error_no_profile_form'
);
}
// once again, nope:
//echo '</div>';
/* mjuhl: end modification */
?>
\ No newline at end of file
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