aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms/profile
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/forms/profile')
-rw-r--r--views/default/forms/profile/edit.php24
-rw-r--r--views/default/forms/profile/fields/add.php2
2 files changed, 20 insertions, 6 deletions
diff --git a/views/default/forms/profile/edit.php b/views/default/forms/profile/edit.php
index 46b77a95b..cb0a37ca4 100644
--- a/views/default/forms/profile/edit.php
+++ b/views/default/forms/profile/edit.php
@@ -7,18 +7,21 @@
?>
-<div class="elgg-module elgg-module-info"><div class="elgg-head">
- <h3><?php echo elgg_echo('user:name:label'); ?></h3></div>
+<div>
+ <label><?php echo elgg_echo('user:name:label'); ?></label>
<?php echo elgg_view('input/text', array('name' => 'name', 'value' => $vars['entity']->name)); ?>
</div>
<?php
+$sticky_values = elgg_get_sticky_values('profile:edit');
+
$profile_fields = elgg_get_config('profile_fields');
if (is_array($profile_fields) && count($profile_fields) > 0) {
foreach ($profile_fields as $shortname => $valtype) {
$metadata = elgg_get_metadata(array(
'guid' => $vars['entity']->guid,
- 'metadata_name' => $shortname
+ 'metadata_name' => $shortname,
+ 'limit' => false
));
if ($metadata) {
if (is_array($metadata)) {
@@ -39,9 +42,17 @@ if (is_array($profile_fields) && count($profile_fields) > 0) {
$access_id = ACCESS_DEFAULT;
}
+ // sticky form values take precedence over saved ones
+ if (isset($sticky_values[$shortname])) {
+ $value = $sticky_values[$shortname];
+ }
+ if (isset($sticky_values['accesslevel'][$shortname])) {
+ $access_id = $sticky_values['accesslevel'][$shortname];
+ }
+
?>
-<div class="elgg-module elgg-module-info"><div class="elgg-head">
- <h3><?php echo elgg_echo("profile:{$shortname}") ?></h3>
+<div>
+ <label><?php echo elgg_echo("profile:{$shortname}") ?></label>
<?php
$params = array(
'name' => $shortname,
@@ -58,6 +69,9 @@ if (is_array($profile_fields) && count($profile_fields) > 0) {
<?php
}
}
+
+elgg_clear_sticky_form('profile:edit');
+
?>
<div class="elgg-foot">
<?php
diff --git a/views/default/forms/profile/fields/add.php b/views/default/forms/profile/fields/add.php
index 1ea9c57a9..2087ec299 100644
--- a/views/default/forms/profile/fields/add.php
+++ b/views/default/forms/profile/fields/add.php
@@ -25,5 +25,5 @@ $formbody = <<< END
$submit_control</div>
END;
-echo autop(elgg_echo('profile:explainchangefields'));
+echo elgg_autop(elgg_echo('profile:explainchangefields'));
echo $formbody;