aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/forms')
-rw-r--r--views/default/forms/account/settings.php10
-rw-r--r--views/default/forms/admin/menu/save.php102
-rw-r--r--views/default/forms/admin/plugins/change_state.php22
-rw-r--r--views/default/forms/admin/plugins/filter.php26
-rw-r--r--views/default/forms/admin/plugins/sort.php26
-rw-r--r--views/default/forms/admin/site/regenerate_secret.php24
-rw-r--r--views/default/forms/admin/site/update_advanced.php101
-rw-r--r--views/default/forms/admin/site/update_basic.php31
-rw-r--r--views/default/forms/avatar/crop.php42
-rw-r--r--views/default/forms/avatar/upload.php16
-rw-r--r--views/default/forms/comments/add.php32
-rw-r--r--views/default/forms/comments/inline.php15
-rw-r--r--views/default/forms/friends/collectionfields.php15
-rw-r--r--views/default/forms/friends/collections/add.php53
-rw-r--r--views/default/forms/friends/edit.php53
-rw-r--r--views/default/forms/likes/display.php23
-rw-r--r--views/default/forms/likes/edit.php45
-rw-r--r--views/default/forms/likes/link.php17
-rw-r--r--views/default/forms/login.php56
-rw-r--r--views/default/forms/members/name_search.php3
-rw-r--r--views/default/forms/members/tag_search.php3
-rw-r--r--views/default/forms/plugins/settings/save.php31
-rw-r--r--views/default/forms/plugins/usersettings/save.php14
-rw-r--r--views/default/forms/profile/edit.php81
-rw-r--r--views/default/forms/profile/fields/add.php29
-rw-r--r--views/default/forms/register.php103
-rw-r--r--views/default/forms/user/passwordreset.php20
-rw-r--r--views/default/forms/user/requestnewpassword.php26
-rw-r--r--views/default/forms/useradd.php81
-rw-r--r--views/default/forms/usersettings/save.php14
-rw-r--r--views/default/forms/widgets/save.php41
31 files changed, 880 insertions, 275 deletions
diff --git a/views/default/forms/account/settings.php b/views/default/forms/account/settings.php
new file mode 100644
index 000000000..3967207ce
--- /dev/null
+++ b/views/default/forms/account/settings.php
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Account settings form used for user settings
+ *
+ * This form is extended by Elgg with the views in core/settings/account.
+ * Plugins can additionally extend it and then register for the
+ * 'usersettings:save', 'user' plugin hook.
+ *
+ * This view is included by "forms/usersettings/save"
+ */
diff --git a/views/default/forms/admin/menu/save.php b/views/default/forms/admin/menu/save.php
new file mode 100644
index 000000000..1a67ffcc4
--- /dev/null
+++ b/views/default/forms/admin/menu/save.php
@@ -0,0 +1,102 @@
+<?php
+/**
+ * Form body for setting up site menu
+ */
+
+// @todo Could probably make this number configurable
+$num_featured_items = 6;
+
+// get site menu items
+$menu = elgg_get_config('menus');
+$menu = $menu['site'];
+$builder = new ElggMenuBuilder($menu);
+$menu = $builder->getMenu('name');
+$menu_items = $menu['default'];
+
+$featured_menu_names = elgg_get_config('site_featured_menu_names');
+
+$dropdown_values = array();
+foreach ($menu_items as $item) {
+ $dropdown_values[$item->getName()] = $item->getText();
+}
+$dropdown_values[' '] = elgg_echo('none');
+
+?>
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
+ <h3><?php echo elgg_echo('admin:menu_items:configure'); ?></h3>
+ </div>
+ <div class="elgg-body">
+<?php
+echo elgg_view('output/longtext', array(
+ 'value' => elgg_echo("admin:menu_items:description")
+));
+
+for ($i=0; $i<$num_featured_items; $i++) {
+ if ($featured_menu_names && array_key_exists($i, $featured_menu_names)) {
+ $current_value = $featured_menu_names[$i];
+ } else {
+ $current_value = ' ';
+ }
+
+ echo elgg_view('input/dropdown', array(
+ 'options_values' => $dropdown_values,
+ 'name' => 'featured_menu_names[]',
+ 'value' => $current_value
+ ));
+}
+?>
+ </div>
+</div>
+
+<div class="elgg-module elgg-module-inline">
+ <div class="elgg-head">
+ <h3><?php echo elgg_echo('admin:add_menu_item'); ?></h3>
+ </div>
+ <div class="elgg-body">
+<?php
+echo elgg_view('output/longtext', array(
+ 'value' => elgg_echo("admin:add_menu_item:description")
+));
+
+$custom_items = elgg_get_config('site_custom_menu_items');
+
+$name_str = elgg_echo('name');
+$url_str = elgg_echo('admin:plugins:label:website');
+
+echo '<ul class="elgg-list elgg-list-simple">';
+
+if (is_array($custom_items)) {
+ foreach ($custom_items as $title => $url) {
+ $name_input = elgg_view('input/text', array(
+ 'name' => 'custom_menu_titles[]',
+ 'value' => $title
+ ));
+
+ $url_input = elgg_view('input/text', array(
+ 'name' => 'custom_menu_urls[]',
+ 'value' => $url
+ ));
+
+ echo "<li>$name_str: $name_input $url_str: $url_input $delete</li>";
+ }
+}
+
+$new = elgg_echo('new');
+$name_input = elgg_view('input/text', array(
+ 'name' => 'custom_menu_titles[]',
+));
+
+$url_input = elgg_view('input/text', array(
+ 'name' => 'custom_menu_urls[]',
+));
+
+echo "<li class='custom_menuitem'>$name_str: $name_input $url_str: $url_input</li>
+</ul>";
+
+?>
+ </div>
+</div>
+<?php
+
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
diff --git a/views/default/forms/admin/plugins/change_state.php b/views/default/forms/admin/plugins/change_state.php
new file mode 100644
index 000000000..730c8ff32
--- /dev/null
+++ b/views/default/forms/admin/plugins/change_state.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Activate/deactive all plugins specified by guids array
+ *
+ * @uses $vars['guids'] Array of GUIDs
+ * @uses $vars['action'] 'activate' or 'deactivate'
+ */
+
+$guids = elgg_extract('guids', $vars, array());
+$guids = implode(',', $guids);
+
+echo '<div>';
+echo elgg_view('input/hidden', array(
+ 'name' => 'guids',
+ 'value' => $guids,
+));
+
+echo elgg_view('input/submit', array(
+ 'value' => elgg_echo("admin:plugins:{$vars['action']}_all"),
+ 'class' => 'elgg-button elgg-button-action mrm'
+));
+echo '</div>';
diff --git a/views/default/forms/admin/plugins/filter.php b/views/default/forms/admin/plugins/filter.php
new file mode 100644
index 000000000..fd1b618bc
--- /dev/null
+++ b/views/default/forms/admin/plugins/filter.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Category filter for plugins
+ *
+ * @uses $vars['category']
+ * @uses $vars['category_options']
+ * @uses $vvars['sort']
+ */
+
+echo '<div>';
+echo elgg_view('input/dropdown', array(
+ 'name' => 'category',
+ 'options_values' => $vars['category_options'],
+ 'value' => $vars['category'],
+));
+
+echo elgg_view('input/hidden', array(
+ 'name' => 'sort',
+ 'value' => $vars['sort'],
+));
+
+echo elgg_view('input/submit', array(
+ 'value' => elgg_echo('filter'),
+ 'class' => 'elgg-button elgg-button-action',
+));
+echo '</div>';
diff --git a/views/default/forms/admin/plugins/sort.php b/views/default/forms/admin/plugins/sort.php
new file mode 100644
index 000000000..7f2246bad
--- /dev/null
+++ b/views/default/forms/admin/plugins/sort.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Sort plugins form body
+ *
+ * @uses $vars['sort']
+ * @uses $vars['sort_options']
+ * @uses $vars['category']
+ */
+
+echo '<div class="mtm">';
+echo elgg_view('input/dropdown', array(
+ 'name' => 'sort',
+ 'options_values' => $vars['sort_options'],
+ 'value' => $vars['sort'],
+));
+
+echo elgg_view('input/hidden', array(
+ 'name' => 'category',
+ 'value' => $vars['category'],
+));
+
+echo elgg_view('input/submit', array(
+ 'value' => elgg_echo('sort'),
+ 'class' => 'elgg-button elgg-button-action'
+));
+echo '</div>';
diff --git a/views/default/forms/admin/site/regenerate_secret.php b/views/default/forms/admin/site/regenerate_secret.php
new file mode 100644
index 000000000..af269b801
--- /dev/null
+++ b/views/default/forms/admin/site/regenerate_secret.php
@@ -0,0 +1,24 @@
+<?php
+
+$strength = $vars['strength'];
+
+?>
+<p><?php echo elgg_echo('admin:site:secret:intro'); ?></p>
+
+<table class="elgg-table">
+ <tr>
+ <th><?php echo elgg_echo('site_secret:current_strength'); ?></th>
+ <td class="elgg-strength-<?php echo $strength; ?>">
+ <h4><?php echo elgg_echo("site_secret:strength:$strength"); ?></h4>
+ <div><?php echo elgg_echo("site_secret:strength_msg:$strength"); ?></div>
+ </td>
+ </tr>
+</table>
+
+<div class="elgg-foot">
+ <?php echo elgg_view('input/submit', array(
+ 'value' => elgg_echo('admin:site:secret:regenerate'),
+ 'class' => 'elgg-requires-confirmation elgg-button elgg-button-submit',
+ )); ?>
+ <p class="elgg-text-help mts"><?php echo elgg_echo('admin:site:secret:regenerate:help'); ?></p>
+</div>
diff --git a/views/default/forms/admin/site/update_advanced.php b/views/default/forms/admin/site/update_advanced.php
new file mode 100644
index 000000000..14b74e4f9
--- /dev/null
+++ b/views/default/forms/admin/site/update_advanced.php
@@ -0,0 +1,101 @@
+<?php
+/**
+ * @todo cleanup
+ */
+$form_body = "";
+
+foreach (array('wwwroot', 'path', 'dataroot') as $field) {
+ $form_body .= "<div>";
+ $form_body .= elgg_echo('installation:' . $field) . "<br />";
+ $warning = elgg_echo('installation:warning:' . $field);
+ if ($warning != 'installation:warning:' . $field) {
+ echo "<b>" . $warning . "</b><br />";
+ }
+ $value = elgg_get_config($field);
+ $form_body .= elgg_view("input/text",array('name' => $field, 'value' => $value));
+ $form_body .= "</div>";
+}
+
+$form_body .= "<div>" . elgg_echo('admin:site:access:warning') . "<br />";
+$form_body .= "<label>" . elgg_echo('installation:sitepermissions') . "</label>";
+$form_body .= elgg_view('input/access', array(
+ 'options_values' => array(
+ ACCESS_PRIVATE => elgg_echo("PRIVATE"),
+ ACCESS_FRIENDS => elgg_echo("access:friends:label"),
+ ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"),
+ ACCESS_PUBLIC => elgg_echo("PUBLIC")
+ ),
+ 'name' => 'default_access',
+ 'value' => elgg_get_config('default_access'),
+)) . "</div>";
+$form_body .= "<div>" . elgg_echo('installation:allow_user_default_access:description') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:allow_user_default_access:label') => 1),
+ 'name' => 'allow_user_default_access',
+ 'value' => (elgg_get_config('allow_user_default_access') ? 1 : 0),
+)) . "</div>";
+$form_body .= "<div>" . elgg_echo('installation:simplecache:description') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:simplecache:label') => 1),
+ 'name' => 'simplecache_enabled',
+ 'value' => (elgg_get_config('simplecache_enabled') ? 1 : 0),
+)) . "</div>";
+$form_body .= "<div>" . elgg_echo('installation:systemcache:description') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:systemcache:label') => 1),
+ 'name' => 'system_cache_enabled',
+ 'value' => (elgg_get_config('system_cache_enabled') ? 1 : 0),
+)) . "</div>";
+
+$debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice'));
+$form_body .= "<div>" . elgg_echo('installation:debug');
+$form_body .= elgg_view('input/dropdown', array(
+ 'options_values' => $debug_options,
+ 'name' => 'debug',
+ 'value' => elgg_get_config('debug'),
+));
+$form_body .= '</div>';
+
+// control new user registration
+$options = array(
+ 'options' => array(elgg_echo('installation:registration:label') => 1),
+ 'name' => 'allow_registration',
+ 'value' => elgg_get_config('allow_registration') ? 1 : 0,
+);
+$form_body .= '<div>' . elgg_echo('installation:registration:description');
+$form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</div>';
+
+// control walled garden
+$walled_garden = elgg_get_config(walled_garden);
+$options = array(
+ 'options' => array(elgg_echo('installation:walled_garden:label') => 1),
+ 'name' => 'walled_garden',
+ 'value' => $walled_garden ? 1 : 0,
+);
+$form_body .= '<div>' . elgg_echo('installation:walled_garden:description');
+$form_body .= '<br />' . elgg_view('input/checkboxes', $options) . '</div>';
+
+$form_body .= "<div>" . elgg_echo('installation:httpslogin') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:httpslogin:label') => 1),
+ 'name' => 'https_login',
+ 'value' => (elgg_get_config('https_login') ? 1 : 0)
+)) . "</div>";
+
+$form_body .= "<div>" . elgg_echo('installation:disableapi') . "<br />";
+$disable_api = elgg_get_config('disable_api');
+$on = $disable_api ? 0 : 1;
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:disableapi:label') => 1),
+ 'name' => 'api',
+ 'value' => $on,
+));
+$form_body .= "</div>";
+
+$form_body .= elgg_view('input/hidden', array('name' => 'settings', 'value' => 'go'));
+
+$form_body .= '<div class="elgg-foot">';
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
+$form_body .= '</div>';
+
+echo $form_body;
diff --git a/views/default/forms/admin/site/update_basic.php b/views/default/forms/admin/site/update_basic.php
new file mode 100644
index 000000000..88870bc60
--- /dev/null
+++ b/views/default/forms/admin/site/update_basic.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @todo cleanup
+ */
+$form_body = "";
+
+foreach (array('sitename','sitedescription', 'siteemail') as $field) {
+ $form_body .= "<div>";
+ $form_body .= elgg_echo('installation:' . $field) . "<br />";
+ $warning = elgg_echo('installation:warning:' . $field);
+ if ($warning != 'installation:warning:' . $field) {
+ echo "<b>" . $warning . "</b><br />";
+ }
+ $value = elgg_get_config($field);
+ $form_body .= elgg_view("input/text",array('name' => $field, 'value' => $value));
+ $form_body .= "</div>";
+}
+
+$languages = get_installed_translations();
+$form_body .= "<div>" . elgg_echo('installation:language');
+$form_body .= elgg_view("input/dropdown", array(
+ 'name' => 'language',
+ 'value' => elgg_get_config('language'),
+ 'options_values' => $languages,
+)) . "</div>";
+
+$form_body .= '<div class="elgg-foot">';
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
+$form_body .= '</div>';
+
+echo $form_body; \ No newline at end of file
diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php
new file mode 100644
index 000000000..3e798cb27
--- /dev/null
+++ b/views/default/forms/avatar/crop.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Avatar crop form
+ *
+ * @uses $vars['entity']
+ */
+
+elgg_load_js('jquery.imgareaselect');
+elgg_load_js('elgg.avatar_cropper');
+elgg_load_css('jquery.imgareaselect');
+
+$master_img = elgg_view('output/img', array(
+ 'src' => $vars['entity']->getIconUrl('master'),
+ 'alt' => elgg_echo('avatar'),
+ 'class' => 'mrl',
+ 'id' => 'user-avatar-cropper',
+));
+
+$preview_img = elgg_view('output/img', array(
+ 'src' => $vars['entity']->getIconUrl('master'),
+ 'alt' => elgg_echo('avatar'),
+));
+
+?>
+<div class="clearfix">
+ <?php echo $master_img; ?>
+ <div id="user-avatar-preview-title"><label><?php echo elgg_echo('avatar:preview'); ?></label></div>
+ <div id="user-avatar-preview"><?php echo $preview_img; ?></div>
+</div>
+<div class="elgg-foot">
+<?php
+$coords = array('x1', 'x2', 'y1', 'y2');
+foreach ($coords as $coord) {
+ echo elgg_view('input/hidden', array('name' => $coord, 'value' => $vars['entity']->$coord));
+}
+
+echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid));
+
+echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create')));
+
+?>
+</div>
diff --git a/views/default/forms/avatar/upload.php b/views/default/forms/avatar/upload.php
new file mode 100644
index 000000000..d91e8575e
--- /dev/null
+++ b/views/default/forms/avatar/upload.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Avatar upload form
+ *
+ * @uses $vars['entity']
+ */
+
+?>
+<div>
+ <label><?php echo elgg_echo("avatar:upload"); ?></label><br />
+ <?php echo elgg_view("input/file",array('name' => 'avatar')); ?>
+</div>
+<div class="elgg-foot">
+ <?php echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid)); ?>
+ <?php echo elgg_view('input/submit', array('value' => elgg_echo('upload'))); ?>
+</div>
diff --git a/views/default/forms/comments/add.php b/views/default/forms/comments/add.php
index 74ee5ba4b..9acabf3ea 100644
--- a/views/default/forms/comments/add.php
+++ b/views/default/forms/comments/add.php
@@ -4,20 +4,34 @@
*
* @package Elgg
*
- * @uses $vars['entity']
+ * @uses ElggEntity $vars['entity'] The entity to comment on
+ * @uses bool $vars['inline'] Show a single line version of the form?
*/
-if (isset($vars['entity']) && isloggedin()) {
+
+if (isset($vars['entity']) && elgg_is_logged_in()) {
+
+ $inline = elgg_extract('inline', $vars, false);
+
+ if ($inline) {
+ echo elgg_view('input/text', array('name' => 'generic_comment'));
+ echo elgg_view('input/submit', array('value' => elgg_echo('comment')));
+ } else {
?>
-<p class="mbn">
- <label><?php echo elgg_echo("generic_comments:text"); ?></label>
- <?php echo elgg_view('input/longtext', array('internalname' => 'generic_comment')); ?>
-</p>
+ <div>
+ <label><?php echo elgg_echo("generic_comments:add"); ?></label>
+ <?php echo elgg_view('input/longtext', array('name' => 'generic_comment')); ?>
+ </div>
+ <div class="elgg-foot">
<?php
-
+ echo elgg_view('input/submit', array('value' => elgg_echo("generic_comments:post")));
+?>
+ </div>
+<?php
+ }
+
echo elgg_view('input/hidden', array(
- 'internalname' => 'entity_guid',
+ 'name' => 'entity_guid',
'value' => $vars['entity']->getGUID()
));
- echo elgg_view('input/submit', array('value' => elgg_echo("generic_comments:post")));
}
diff --git a/views/default/forms/comments/inline.php b/views/default/forms/comments/inline.php
deleted file mode 100644
index ee5883435..000000000
--- a/views/default/forms/comments/inline.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * Inline comment form body
- *
- * @uses $vars['entity']
- */
-
-if (isset($vars['entity']) && isloggedin()) {
- echo elgg_view('input/text', array('internalname' => 'generic_comment'));
- echo elgg_view('input/hidden', array(
- 'internalname' => 'entity_guid',
- 'value' => $vars['entity']->getGUID()
- ));
- echo elgg_view('input/submit', array('value' => elgg_echo('comment')));
-}
diff --git a/views/default/forms/friends/collectionfields.php b/views/default/forms/friends/collectionfields.php
deleted file mode 100644
index 35db3a962..000000000
--- a/views/default/forms/friends/collectionfields.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * Elgg friend collections required hidden fields for js friends picker form
- *
- * @package Elgg
- * @subpackage Core
- */
-
-if (isset($vars['collection'])) {
-?>
-
- <input type="hidden" name="collection_id" value="<?php echo $vars['collection']->id; ?>" />
-
-<?php
-} \ No newline at end of file
diff --git a/views/default/forms/friends/collections/add.php b/views/default/forms/friends/collections/add.php
new file mode 100644
index 000000000..04c87346b
--- /dev/null
+++ b/views/default/forms/friends/collections/add.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Form body for editing or adding a friend collection
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['collection'] Optionally, the collection to edit
+ */
+
+// Set title, form destination
+if (isset($vars['collection'])) {
+ $title = $vars['collection']->name;
+ $highlight = 'default';
+} else {
+ $title = "";
+ $highlight = 'all';
+}
+
+echo "<div class=\"mtm\"><label>" . elgg_echo("friends:collectionname") . "<br/>";
+echo elgg_view("input/text", array(
+ "name" => "collection_name",
+ "value" => $title,
+ ));
+echo "</label></div>";
+
+echo "<div>";
+if ($vars['collection_members']) {
+ echo elgg_echo("friends:collectionfriends") . "<br />";
+ foreach ($vars['collection_members'] as $mem) {
+ echo elgg_view_entity_icon($mem, 'tiny');
+ echo $mem->name;
+ }
+}
+echo "</div>";
+
+echo "<div><label>" . elgg_echo("friends:addfriends") . "</label>";
+echo elgg_view('input/friendspicker', array(
+ 'entities' => $vars['friends'],
+ 'name' => 'friends_collection',
+ 'highlight' => $highlight,
+));
+echo "</div>";
+
+echo '<div class="elgg-foot">';
+if (isset($vars['collection'])) {
+ echo elgg_view('input/hidden', array(
+ 'name' => 'collection_id',
+ 'value' => $vars['collection']->id,
+ ));
+}
+echo elgg_view('input/submit', array('name' => 'submit', 'value' => elgg_echo('save')));
+echo '</div>';
diff --git a/views/default/forms/friends/edit.php b/views/default/forms/friends/edit.php
deleted file mode 100644
index 16bb32fd9..000000000
--- a/views/default/forms/friends/edit.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * Elgg friend collections add/edit
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['object'] Optionally, the collection edit
- */
-
-// var_export($vars['collection'][0]->id);
-
-// Set title, form destination
-if (isset($vars['collection'])) {
- $action = "friends/editcollection";
- $title = $vars['collection'][0]->name;
- $highlight = 'default';
-} else {
- $action = "friends/addcollection";
- $title = "";
- $highlight = 'all';
-}
-
-
-$form_body = "<div class='contentWrapper'><p><label>" . elgg_echo("friends:collectionname") . "<br />" .
- elgg_view("input/text", array(
- "internalname" => "collection_name",
- "value" => $title,
- )) . "</label></p>";
-
-$form_body .= "<p>";
-
-if($vars['collection_members']){
- $form_body .= elgg_echo("friends:collectionfriends") . "<br />";
- foreach($vars['collection_members'] as $mem){
- $form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny'));
- $form_body .= $mem->name;
- }
-}
-
-$form_body .= "</p>";
-
-$form_body .= "<p><label>" . elgg_echo("friends:addfriends") . "</label>".
- elgg_view('core/friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "</p>";
-
-$form_body .= "<p>";
-if (isset($vars['collection'])) {
- $form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}"));
-}
-$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save')));
-$form_body .= "</p></div>";
-
-echo elgg_view('input/form', array('body' => $form_body, 'action' => "action/$action")); \ No newline at end of file
diff --git a/views/default/forms/likes/display.php b/views/default/forms/likes/display.php
deleted file mode 100644
index 36e2cddc2..000000000
--- a/views/default/forms/likes/display.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * Elgg likes - display users liked link/text
- *
- * @package Elgg
- *
- * @uses $vars['entity']
- */
-
-if (isset($vars['entity']) && isloggedin()) {
-
- //display the number of likes
- $numoflikes = elgg_count_likes($vars['entity']);
- if ($numoflikes != 0) {
- if ($numoflikes == 1) {
- $user_string = elgg_echo('likes:userlikedthis');
- } else {
- $user_string = elgg_echo('likes:userslikedthis');
- }
-
- echo "<a class='river_more_comments off likes_user_list_button link'>" . elgg_count_likes($vars['entity']) . " " . $user_string . "</a>";
- }
-} \ No newline at end of file
diff --git a/views/default/forms/likes/edit.php b/views/default/forms/likes/edit.php
deleted file mode 100644
index 33527b53a..000000000
--- a/views/default/forms/likes/edit.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- * Elgg likes add form
- *
- * @package Elgg
- *
- * @uses $vars['entity']
- */
-
-if (isset($vars['entity']) && isloggedin()) {
- $guid = $vars['entity']->getGuid();
- $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/likes/add?guid={$guid}");
-
- echo "<span class='likes-list-holder'>";
- //check to see if the user has already liked
- if (!elgg_annotation_exists($guid, 'likes') ) {
- echo "<a class='user-like link' title='".elgg_echo('likes:likethis')."' href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a>";
- $likes_classname = "not-liked";
- $likes_titletag = "";
- } else {
- $likes_titletag = "title='".elgg_echo('likes:remove')."'";
- }
- //display the number of likes
- $numoflikes = elgg_count_likes($vars['entity']);
- if ($numoflikes != 0) {
- if ($numoflikes == 1) {
- $user_string = elgg_echo('likes:userlikedthis');
- } else {
- $user_string = elgg_echo('likes:userslikedthis');
- }
-
- echo "<a class='likes-list-button link {$likes_classname}' {$likes_titletag}>" . elgg_count_likes($vars['entity']) . " " . $user_string . "</a>";
-
- //show the users who liked the object
- echo "<div class='likes-list hidden clearfix'>";
- echo list_annotations($vars['entity']->getGUID(), 'likes', 99);
- echo "</div>";
- }
- echo "</span>";
-}
-
-
-
-
-
diff --git a/views/default/forms/likes/link.php b/views/default/forms/likes/link.php
deleted file mode 100644
index decb4aa7f..000000000
--- a/views/default/forms/likes/link.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Elgg likes link form - used on riverdashboard where we want the likes link separate from the list of users that liked the object
- *
- * @package Elgg
- *
- * @uses $vars['entity']
- */
-
-if (isset($vars['entity']) && isloggedin()) {
- $guid = $vars['entity']->getGuid();
- $url = elgg_add_action_tokens_to_url(elgg_get_site_url() . "action/likes/add?guid={$guid}");
- //check to see if the user has already liked
- if (!elgg_annotation_exists($guid, 'likes') ) {
- echo "<span class='river_link_divider'> | </span><a class='river_user-like_button link' href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a>";
- }
-} \ No newline at end of file
diff --git a/views/default/forms/login.php b/views/default/forms/login.php
index 87dd6d5ad..d2c6e6221 100644
--- a/views/default/forms/login.php
+++ b/views/default/forms/login.php
@@ -7,29 +7,43 @@
*/
?>
-<p class='loginbox'>
+<div>
<label><?php echo elgg_echo('loginusername'); ?></label>
- <?php echo elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')); ?>
+ <?php echo elgg_view('input/text', array(
+ 'name' => 'username',
+ 'class' => 'elgg-autofocus',
+ ));
+ ?>
+</div>
+<div>
<label><?php echo elgg_echo('password'); ?></label>
- <?php echo elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')); ?>
+ <?php echo elgg_view('input/password', array('name' => 'password')); ?>
+</div>
- <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?>
-
- <span class='rememberme'>
- <label>
- <input type="checkbox" name="persistent" value="true" />
- <?php echo elgg_echo('user:persistent'); ?>
- </label>
- </span>
+<?php echo elgg_view('login/extend', $vars); ?>
- <?php echo elgg_view('login/extend'); ?>
-
-<?php
- if ($CONFIG->allow_registration) {
- echo '<a class="registration_link" href="' . elgg_get_site_url() . 'pg/register/">' . elgg_echo('register') . '</a> | ';
+<div class="elgg-foot">
+ <label class="mtm float-alt">
+ <input type="checkbox" name="persistent" value="true" />
+ <?php echo elgg_echo('user:persistent'); ?>
+ </label>
+
+ <?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?>
+
+ <?php
+ if (isset($vars['returntoreferer'])) {
+ echo elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true'));
}
-?>
- <a class="forgotten_password_link" href="<?php echo elgg_get_site_url(); ?>pages/account/forgotten_password.php">
- <?php echo elgg_echo('user:password:lost'); ?>
- </a>
-</p> \ No newline at end of file
+ ?>
+
+ <ul class="elgg-menu elgg-menu-general mtm">
+ <?php
+ if (elgg_get_config('allow_registration')) {
+ echo '<li><a class="registration_link" href="' . elgg_get_site_url() . 'register">' . elgg_echo('register') . '</a></li>';
+ }
+ ?>
+ <li><a class="forgot_link" href="<?php echo elgg_get_site_url(); ?>forgotpassword">
+ <?php echo elgg_echo('user:password:lost'); ?>
+ </a></li>
+ </ul>
+</div>
diff --git a/views/default/forms/members/name_search.php b/views/default/forms/members/name_search.php
index 265290fc9..5f6b9a4b6 100644
--- a/views/default/forms/members/name_search.php
+++ b/views/default/forms/members/name_search.php
@@ -1,7 +1,8 @@
<?php
$params = array(
- 'internalname' => 'name',
+ 'name' => 'name',
+ 'class' => 'mbm',
);
echo elgg_view('input/text', $params);
diff --git a/views/default/forms/members/tag_search.php b/views/default/forms/members/tag_search.php
index 1a281963d..4fe9bb32a 100644
--- a/views/default/forms/members/tag_search.php
+++ b/views/default/forms/members/tag_search.php
@@ -4,7 +4,8 @@
*/
$params = array(
- 'internalname' => 'tag',
+ 'name' => 'tag',
+ 'class' => 'mbm',
);
echo elgg_view('input/text', $params);
diff --git a/views/default/forms/plugins/settings/save.php b/views/default/forms/plugins/settings/save.php
new file mode 100644
index 000000000..116529905
--- /dev/null
+++ b/views/default/forms/plugins/settings/save.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Used to show plugin settings for both users and admins.
+ *
+ * @package Elgg.Core
+ * @subpackage Plugins
+ */
+
+$plugin = $vars['entity'];
+$plugin_id = $plugin->getID();
+$user_guid = elgg_extract('user_guid', $vars, elgg_get_logged_in_user_guid());
+
+// Do we want to show admin settings or user settings
+$type = elgg_extract('type', $vars, '');
+
+if ($type != 'user') {
+ $type = '';
+}
+
+if (elgg_view_exists("plugins/$plugin_id/{$type}settings")) {
+ echo elgg_view("plugins/$plugin_id/{$type}settings", $vars);
+} elseif (elgg_view_exists("{$type}settings/$plugin_id/edit")) {
+ elgg_deprecated_notice("{$type}settings/$plugin_id/edit was deprecated in favor of plugins/$plugin_id/{$type}settings", 1.8);
+ echo elgg_view("{$type}settings/$plugin_id/edit", $vars);
+}
+
+echo '<div class="elgg-foot">';
+echo elgg_view('input/hidden', array('name' => 'plugin_id', 'value' => $plugin_id));
+echo elgg_view('input/hidden', array('name' => 'user_guid', 'value' => $user_guid));
+echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+echo '</div>';
diff --git a/views/default/forms/plugins/usersettings/save.php b/views/default/forms/plugins/usersettings/save.php
new file mode 100644
index 000000000..ced88f818
--- /dev/null
+++ b/views/default/forms/plugins/usersettings/save.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Plugin user settings
+ *
+ * Calls the plugin admin settings form body with type set to 'user'
+ *
+ * @package Elgg.Core
+ * @subpackage Plugins
+ */
+
+$vars['type'] = 'user';
+
+// Can't use elgg_view_form() because it overrides the $vars['action'] parameter
+echo elgg_view('forms/plugins/settings/save', $vars); \ No newline at end of file
diff --git a/views/default/forms/profile/edit.php b/views/default/forms/profile/edit.php
new file mode 100644
index 000000000..cb0a37ca4
--- /dev/null
+++ b/views/default/forms/profile/edit.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Edit profile form
+ *
+ * @uses vars['entity']
+ */
+
+?>
+
+<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,
+ 'limit' => false
+ ));
+ if ($metadata) {
+ if (is_array($metadata)) {
+ $value = '';
+ foreach ($metadata as $md) {
+ if (!empty($value)) {
+ $value .= ', ';
+ }
+ $value .= $md->value;
+ $access_id = $md->access_id;
+ }
+ } else {
+ $value = $metadata->value;
+ $access_id = $metadata->access_id;
+ }
+ } else {
+ $value = '';
+ $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>
+ <label><?php echo elgg_echo("profile:{$shortname}") ?></label>
+ <?php
+ $params = array(
+ 'name' => $shortname,
+ 'value' => $value,
+ );
+ echo elgg_view("input/{$valtype}", $params);
+ $params = array(
+ 'name' => "accesslevel[$shortname]",
+ 'value' => $access_id,
+ );
+ echo elgg_view('input/access', $params);
+ ?>
+</div>
+<?php
+ }
+}
+
+elgg_clear_sticky_form('profile:edit');
+
+?>
+<div class="elgg-foot">
+<?php
+ echo elgg_view('input/hidden', array('name' => 'guid', 'value' => $vars['entity']->guid));
+ echo elgg_view('input/submit', array('value' => elgg_echo('save')));
+?>
+</div>
diff --git a/views/default/forms/profile/fields/add.php b/views/default/forms/profile/fields/add.php
new file mode 100644
index 000000000..2087ec299
--- /dev/null
+++ b/views/default/forms/profile/fields/add.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Add a new field to the set of custom profile fields
+ */
+
+$label_text = elgg_echo('profile:label');
+$type_text = elgg_echo('profile:type');
+
+$label_control = elgg_view('input/text', array('name' => 'label'));
+$type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_values' => array(
+ 'text' => elgg_echo('profile:field:text'),
+ 'longtext' => elgg_echo('profile:field:longtext'),
+ 'tags' => elgg_echo('profile:field:tags'),
+ 'url' => elgg_echo('profile:field:url'),
+ 'email' => elgg_echo('profile:field:email'),
+ 'location' => elgg_echo('profile:field:location'),
+ 'date' => elgg_echo('profile:field:date'),
+)));
+
+$submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add')));
+
+$formbody = <<< END
+ <div>$label_text: $label_control</div>
+ <div class="elgg-foot">$type_text: $type_control
+ $submit_control</div>
+END;
+
+echo elgg_autop(elgg_echo('profile:explainchangefields'));
+echo $formbody;
diff --git a/views/default/forms/register.php b/views/default/forms/register.php
index 93e2585d8..c0ee66f76 100644
--- a/views/default/forms/register.php
+++ b/views/default/forms/register.php
@@ -6,60 +6,75 @@
* @subpackage Core
*/
+elgg_load_js('elgg.register');
+
+$password = $password2 = '';
$username = get_input('u');
$email = get_input('e');
$name = get_input('n');
-$admin_option = false;
-if (isadminloggedin() && isset($vars['show_admin'])) {
- $admin_option = true;
+if (elgg_is_sticky_form('register')) {
+ extract(elgg_get_sticky_values('register'));
+ elgg_clear_sticky_form('register');
}
?>
-<p class="mtm">
- <label><?php echo elgg_echo('name'); ?></label>
- <br />
- <?php echo elgg_view('input/text', array('internalname' => 'name', 'value' => $name)); ?>
-</p>
-<p>
- <label><?php echo elgg_echo('email'); ?></label>
- <br />
- <?php echo elgg_view('input/text', array('internalname' => 'email', 'value' => $email)); ?>
-</p>
-<p>
- <label><?php echo elgg_echo('username'); ?></label>
- <br />
- <?php echo elgg_view('input/text', array('internalname' => 'username', 'value' => $username)); ?>
-</p>
-<p>
- <label><?php echo elgg_echo('password'); ?></label>
- <br />
- <?php echo elgg_view('input/password', array('internalname' => 'password')); ?>
-</p>
-<p>
- <label><?php echo elgg_echo('passwordagain'); ?></label>
- <br />
- <?php echo elgg_view('input/password', array('internalname' => 'password2')); ?>
-</p>
+<div class="mtm">
+ <label><?php echo elgg_echo('name'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'name',
+ 'value' => $name,
+ 'class' => 'elgg-autofocus',
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('email'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'email',
+ 'value' => $email,
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('username'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'username',
+ 'value' => $username,
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('password'); ?></label><br />
+ <?php
+ echo elgg_view('input/password', array(
+ 'name' => 'password',
+ 'value' => $password,
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('passwordagain'); ?></label><br />
+ <?php
+ echo elgg_view('input/password', array(
+ 'name' => 'password2',
+ 'value' => $password2,
+ ));
+ ?>
+</div>
<?php
// view to extend to add more fields to the registration form
-echo elgg_view('register/extend');
+echo elgg_view('register/extend', $vars);
// Add captcha hook
-echo elgg_view('input/captcha');
-
-if ($admin_option) {
- echo elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
-}
-
-echo elgg_view('input/hidden', array('internalname' => 'friend_guid', 'value' => $vars['friend_guid']));
-echo elgg_view('input/hidden', array('internalname' => 'invitecode', 'value' => $vars['invitecode']));
-echo elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register')));
-?>
+echo elgg_view('input/captcha', $vars);
-<script type="text/javascript">
- $(document).ready(function() {
- $('input[name=name]').focus();
- });
-</script> \ No newline at end of file
+echo '<div class="elgg-foot">';
+echo elgg_view('input/hidden', array('name' => 'friend_guid', 'value' => $vars['friend_guid']));
+echo elgg_view('input/hidden', array('name' => 'invitecode', 'value' => $vars['invitecode']));
+echo elgg_view('input/submit', array('name' => 'submit', 'value' => elgg_echo('register')));
+echo '</div>';
diff --git a/views/default/forms/user/passwordreset.php b/views/default/forms/user/passwordreset.php
new file mode 100644
index 000000000..5946fa7c0
--- /dev/null
+++ b/views/default/forms/user/passwordreset.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Reset user password form
+ */
+
+echo elgg_autop(elgg_echo('user:resetpassword:reset_password_confirm'));
+
+echo elgg_view('input/hidden', array(
+ 'name' => 'u',
+ 'value' => $vars['guid'],
+));
+
+echo elgg_view('input/hidden', array(
+ 'name' => 'c',
+ 'value' => $vars['code'],
+));
+
+echo elgg_view('input/submit', array(
+ 'value' => elgg_echo('resetpassword')
+));
diff --git a/views/default/forms/user/requestnewpassword.php b/views/default/forms/user/requestnewpassword.php
index a235f2cc6..c90971eaf 100644
--- a/views/default/forms/user/requestnewpassword.php
+++ b/views/default/forms/user/requestnewpassword.php
@@ -7,20 +7,18 @@
*/
?>
-<p class="mtm">
+<div class="mtm">
<?php echo elgg_echo('user:password:text'); ?>
-</p>
-<p>
- <label><?php echo elgg_echo('username'); ?></label>
- <?php echo elgg_view('input/text', array('internalname' => 'username')); ?>
-</p>
+</div>
+<div>
+ <label><?php echo elgg_echo('loginusername'); ?></label><br />
+ <?php echo elgg_view('input/text', array(
+ 'name' => 'username',
+ 'class' => 'elgg-autofocus',
+ ));
+ ?>
+</div>
<?php echo elgg_view('input/captcha'); ?>
-<p>
+<div class="elgg-foot">
<?php echo elgg_view('input/submit', array('value' => elgg_echo('request'))); ?>
-</p>
-
-<script type="text/javascript">
- $(document).ready(function() {
- $('input[name=username]').focus();
- });
-</script> \ No newline at end of file
+</div>
diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php
index 7c1969f1b..4f337e4e4 100644
--- a/views/default/forms/useradd.php
+++ b/views/default/forms/useradd.php
@@ -4,28 +4,75 @@
*
* @package Elgg
* @subpackage Core
+ *
*/
-$admin_option = false;
-if ((get_loggedin_user()->isAdmin()) && ($vars['show_admin'])) {
- $admin_option = true;
-}
-
-$form_body = "<p><label>" . elgg_echo('name') . "<br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</label></p>";
-$form_body .= "<p><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</label></p>";
-$form_body .= "<p><label>" . elgg_echo('email') . "<br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</label></p>";
-$form_body .= "<p><label>" . elgg_echo('password') . "<br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</label></p>";
-$form_body .= "<p><label>" . elgg_echo('passwordagain') . "<br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</label></p>";
-$form_body .= "<p>";
+$name = $username = $email = $password = $password2 = $admin = '';
-if ($admin_option) {
- $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option'))));
+if (elgg_is_sticky_form('useradd')) {
+ extract(elgg_get_sticky_values('useradd'));
+ elgg_clear_sticky_form('useradd');
+ if (is_array($admin)) {
+ $admin = $admin[0];
+ }
}
-$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>";
?>
+<div>
+ <label><?php echo elgg_echo('name');?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'name',
+ 'value' => $name,
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('username'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'username',
+ 'value' => $username,
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('email'); ?></label><br />
+ <?php
+ echo elgg_view('input/text', array(
+ 'name' => 'email',
+ 'value' => $email,
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('password'); ?></label><br />
+ <?php
+ echo elgg_view('input/password', array(
+ 'name' => 'password',
+ 'value' => $password,
+ ));
+ ?>
+</div>
+<div>
+ <label><?php echo elgg_echo('passwordagain'); ?></label><br />
+ <?php
+ echo elgg_view('input/password', array(
+ 'name' => 'password2',
+ 'value' => $password2,
+ ));
+ ?>
+</div>
+<div>
+<?php
+ echo elgg_view('input/checkboxes', array(
+ 'name' => "admin",
+ 'options' => array(elgg_echo('admin_option') => 1),
+ 'value' => $admin,
+ ));
+?>
+</div>
-<div class="admin_settings add-user">
- <h3><?php echo elgg_echo('adduser'); ?></h3>
- <?php echo elgg_view('input/form', array('action' => "action/useradd", 'body' => $form_body)) ?>
+<div class="elgg-foot">
+ <?php echo elgg_view('input/submit', array('value' => elgg_echo('register'))); ?>
</div> \ No newline at end of file
diff --git a/views/default/forms/usersettings/save.php b/views/default/forms/usersettings/save.php
new file mode 100644
index 000000000..71323083f
--- /dev/null
+++ b/views/default/forms/usersettings/save.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * User account settings.
+ *
+ * Plugins should extend "forms/account/settings" to add to the settings.
+ */
+
+$form_body = elgg_view("forms/account/settings", $vars);
+
+$form_body .= '<div class="elgg-foot">';
+$form_body .= elgg_view('input/submit', array('value' => elgg_echo('save')));
+$form_body .= '</div>';
+
+echo $form_body; \ No newline at end of file
diff --git a/views/default/forms/widgets/save.php b/views/default/forms/widgets/save.php
new file mode 100644
index 000000000..6959b2a82
--- /dev/null
+++ b/views/default/forms/widgets/save.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Elgg widget edit settings
+ *
+ * @uses $vars['widget']
+ * @uses $vars['show_access']
+ */
+
+$widget = $vars['widget'];
+$show_access = elgg_extract('show_access', $vars, true);
+
+$edit_view = "widgets/$widget->handler/edit";
+$custom_form_section = elgg_view($edit_view, array('entity' => $widget));
+
+$access = '';
+if ($show_access) {
+ $access = elgg_echo('access') . ': ' . elgg_view('input/access', array(
+ 'name' => 'params[access_id]',
+ 'value' => $widget->access_id,
+ ));
+}
+
+if (!$custom_form_section && !$access) {
+ return true;
+}
+
+$hidden = elgg_view('input/hidden', array('name' => 'guid', 'value' => $widget->guid));
+$submit = elgg_view('input/submit', array('value' => elgg_echo('save')));
+
+$body = <<<___END
+ $custom_form_section
+ <div>
+ $access
+ </div>
+ <div class="elgg-foot">
+ $hidden
+ $submit
+ </div>
+___END;
+
+echo $body;