diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-07 05:10:11 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-07 05:10:11 +0000 |
commit | ea28c2c55c689be25a2212dfbdffd840c88921aa (patch) | |
tree | df452e639f62dbf3994bcf81c5622bd82d79016b /actions/profile/fields | |
parent | 59ae2874efb59aeb48265c16b785756025221fb8 (diff) | |
download | elgg-ea28c2c55c689be25a2212dfbdffd840c88921aa.tar.gz elgg-ea28c2c55c689be25a2212dfbdffd840c88921aa.tar.bz2 |
Pulled elgg-icon and elgg-icon-* into the admin css. Pulled out profile field JS into elgg.admin obj. Fixed editing profile field names.
git-svn-id: http://code.elgg.org/elgg/trunk@8061 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/profile/fields')
-rw-r--r-- | actions/profile/fields/add.php | 2 | ||||
-rw-r--r-- | actions/profile/fields/edit.php | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/actions/profile/fields/add.php b/actions/profile/fields/add.php index 15bd7024a..b35df1549 100644 --- a/actions/profile/fields/add.php +++ b/actions/profile/fields/add.php @@ -20,7 +20,7 @@ if (!$fieldlist) { $id = max($fieldlistarray) + 1; } -if (($label) && ($type)){ +if (($label) && ($type)) { if (!empty($fieldlist)) { $fieldlist .= ','; } diff --git a/actions/profile/fields/edit.php b/actions/profile/fields/edit.php new file mode 100644 index 000000000..5fc84ff11 --- /dev/null +++ b/actions/profile/fields/edit.php @@ -0,0 +1,20 @@ +<?php +/** + * Edit a custom profile field + */ + +$id = get_input('id'); +$label = get_input('label'); + +if (!elgg_get_config("admin_defined_profile_$id")) { + register_error(elgg_echo('profile:editdefault:fail')); + forward(REFERER); +} + +if (elgg_save_config("admin_defined_profile_$id", $label)) { + system_message(elgg_echo('profile:editdefault:success')); +} else { + register_error(elgg_echo('profile:editdefault:fail')); +} + +forward(REFERER);
\ No newline at end of file |