Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* Elgg flex profile edit form
* 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(__FILE__)))) . "/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">';
/* 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 '<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>';
/* 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));
echo '<!--------stop copying here------------>';
?>
<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>
</form>
<?php
} else {
echo elgg_echo('form:error_no_profile_form');
}
// once again, nope:
//echo '</div>';
/* mjuhl: end modification */
?>