aboutsummaryrefslogtreecommitdiff
path: root/actions/profile/fields/edit.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-07 05:10:11 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-07 05:10:11 +0000
commitea28c2c55c689be25a2212dfbdffd840c88921aa (patch)
treedf452e639f62dbf3994bcf81c5622bd82d79016b /actions/profile/fields/edit.php
parent59ae2874efb59aeb48265c16b785756025221fb8 (diff)
downloadelgg-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/edit.php')
-rw-r--r--actions/profile/fields/edit.php20
1 files changed, 20 insertions, 0 deletions
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