aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms/plugins
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-10 22:09:40 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-10 22:09:40 +0000
commitbbc0e0206b9c93a16b84cb68271d10eadef13e25 (patch)
tree3c24758d5cd79470cbee55f7bb7eb5631a94fa48 /views/default/forms/plugins
parent2a7e79685a609344bd8a09612727ea691f36c279 (diff)
downloadelgg-bbc0e0206b9c93a16b84cb68271d10eadef13e25.tar.gz
elgg-bbc0e0206b9c93a16b84cb68271d10eadef13e25.tar.bz2
Plugin settings forms now use the forms/ directory
git-svn-id: http://code.elgg.org/elgg/trunk@8093 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/forms/plugins')
-rw-r--r--views/default/forms/plugins/settings/save.php27
-rw-r--r--views/default/forms/plugins/usersettings/save.php4
2 files changed, 31 insertions, 0 deletions
diff --git a/views/default/forms/plugins/settings/save.php b/views/default/forms/plugins/settings/save.php
new file mode 100644
index 000000000..b2d818e87
--- /dev/null
+++ b/views/default/forms/plugins/settings/save.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Used to show plugin user settings.
+ *
+ * @package Elgg.Core
+ * @subpackage Plugins
+ */
+
+$plugin = $vars['plugin'];
+$plugin_id = $plugin->getID();
+$user_guid = elgg_get_array_value('user_guid', $vars, elgg_get_logged_in_user_guid());
+
+// Do we want to show admin settings or user settings
+$type = elgg_get_array_value('type', $vars, '');
+
+if ($type != 'user') {
+ $type = '';
+}
+
+echo elgg_view("{$type}settings/{$plugin_id}/edit", $vars);
+
+echo "<p>";
+echo elgg_view('input/hidden', array('internalname' => 'plugin_id', 'value' => $plugin_id));
+echo elgg_view('input/hidden', array('internalname' => 'user_guid', 'value' => $user_guid));
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+echo "</p>";
+
diff --git a/views/default/forms/plugins/usersettings/save.php b/views/default/forms/plugins/usersettings/save.php
new file mode 100644
index 000000000..8532cdfd1
--- /dev/null
+++ b/views/default/forms/plugins/usersettings/save.php
@@ -0,0 +1,4 @@
+<?php
+$vars['type'] = 'user';
+
+echo elgg_view('forms/plugins/settings/save', $vars); \ No newline at end of file