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.php37
-rw-r--r--views/default/forms/friends/collections/add.php53
-rw-r--r--views/default/forms/login.php49
-rw-r--r--views/default/forms/members/name_search.php9
-rw-r--r--views/default/forms/members/tag_search.php12
-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.php80
-rw-r--r--views/default/forms/user/passwordreset.php20
-rw-r--r--views/default/forms/user/requestnewpassword.php24
-rw-r--r--views/default/forms/useradd.php78
-rw-r--r--views/default/forms/usersettings/save.php14
-rw-r--r--views/default/forms/videolist/browsetube.php251
-rw-r--r--views/default/forms/videolist/edit.php52
-rw-r--r--views/default/forms/videolist/labels/googlevideos.php27
-rw-r--r--views/default/forms/videolist/labels/metacafe.php27
-rw-r--r--views/default/forms/videolist/labels/vimeo.php27
-rw-r--r--views/default/forms/videolist/labels/youtube.php27
-rw-r--r--views/default/forms/widgets/save.php41
31 files changed, 972 insertions, 411 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
new file mode 100644
index 000000000..9acabf3ea
--- /dev/null
+++ b/views/default/forms/comments/add.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Elgg comments add form
+ *
+ * @package Elgg
+ *
+ * @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']) && 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 {
+?>
+ <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(
+ 'name' => 'entity_guid',
+ 'value' => $vars['entity']->getGUID()
+ ));
+}
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/login.php b/views/default/forms/login.php
new file mode 100644
index 000000000..d2c6e6221
--- /dev/null
+++ b/views/default/forms/login.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Elgg login form
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+?>
+
+<div>
+ <label><?php echo elgg_echo('loginusername'); ?></label>
+ <?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('name' => 'password')); ?>
+</div>
+
+<?php echo elgg_view('login/extend', $vars); ?>
+
+<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'));
+ }
+ ?>
+
+ <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
new file mode 100644
index 000000000..5f6b9a4b6
--- /dev/null
+++ b/views/default/forms/members/name_search.php
@@ -0,0 +1,9 @@
+<?php
+
+$params = array(
+ 'name' => 'name',
+ 'class' => 'mbm',
+);
+echo elgg_view('input/text', $params);
+
+echo elgg_view('input/submit', array('value' => elgg_echo('search')));
diff --git a/views/default/forms/members/tag_search.php b/views/default/forms/members/tag_search.php
new file mode 100644
index 000000000..4fe9bb32a
--- /dev/null
+++ b/views/default/forms/members/tag_search.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Simple members search by tag form
+ */
+
+$params = array(
+ 'name' => 'tag',
+ 'class' => 'mbm',
+);
+echo elgg_view('input/text', $params);
+
+echo elgg_view('input/submit', array('value' => elgg_echo('search')));
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
new file mode 100644
index 000000000..c0ee66f76
--- /dev/null
+++ b/views/default/forms/register.php
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Elgg register form
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+elgg_load_js('elgg.register');
+
+$password = $password2 = '';
+$username = get_input('u');
+$email = get_input('e');
+$name = get_input('n');
+
+if (elgg_is_sticky_form('register')) {
+ extract(elgg_get_sticky_values('register'));
+ elgg_clear_sticky_form('register');
+}
+
+?>
+<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', $vars);
+
+// Add captcha hook
+echo elgg_view('input/captcha', $vars);
+
+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
new file mode 100644
index 000000000..c90971eaf
--- /dev/null
+++ b/views/default/forms/user/requestnewpassword.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Elgg forgotten password.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+?>
+
+<div class="mtm">
+ <?php echo elgg_echo('user:password:text'); ?>
+</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'); ?>
+<div class="elgg-foot">
+ <?php echo elgg_view('input/submit', array('value' => elgg_echo('request'))); ?>
+</div>
diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php
new file mode 100644
index 000000000..4f337e4e4
--- /dev/null
+++ b/views/default/forms/useradd.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Elgg add user form.
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+
+$name = $username = $email = $password = $password2 = $admin = '';
+
+if (elgg_is_sticky_form('useradd')) {
+ extract(elgg_get_sticky_values('useradd'));
+ elgg_clear_sticky_form('useradd');
+ if (is_array($admin)) {
+ $admin = $admin[0];
+ }
+}
+
+?>
+<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="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/videolist/browsetube.php b/views/default/forms/videolist/browsetube.php
deleted file mode 100644
index bbe2b8935..000000000
--- a/views/default/forms/videolist/browsetube.php
+++ /dev/null
@@ -1,251 +0,0 @@
-<?php
-
-/**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - load the browse view
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
-$getcontainer_guid = get_input("container");
-$container_guid = explode(":", $getcontainer_guid);
-if($container_guid[0] == "group"){
- $container = $container_guid[1];
-} else{
- $container = $getcontainer_guid;
-}
-$error = array(
- 'no-search' => 1
- );
-$error_msg = array(
- 'no-search' => "Please enter a valid search term"
- );
-$browseCat = get_input('q');
-if(empty($browseCat) || !isset($browseCat)) {
- $browseCat = "youtube";
-}
-
-$confirm_action = get_input('video_action');
-
-if(isset($confirm_action) && ($confirm_action == 'search_video')) {
- if(isset($title_search) && ($title_search != '')) {
- $error['no-search'] = 0;
- } else {
- $error['no-search'] = 1;
- }
-}
-
-//Load youtube menu
-$body .= "<div class='elgg_horizontal_tabbed_nav margin_top'>";
-$body .= "<ul id='videonav'>";
-$body .= "<li class='selected' id='YT'>";
-$body .= "<a href=\"".$vars['url']."videolist/browse/".$getcontainer_guid."?q=youtube\">YouTube</a>";
-$body .= "</li>";
-$body .= "<li id='MC'>";
-$body .= "<a href=\"".$vars['url']."videolist/browse/".$getcontainer_guid."?q=metacafe\">Metacafe</a>";
-$body .= "</li>";
-$body .= "<li id='VM'>";
-$body .= "<a href=\"".$vars['url']."videolist/browse/".$getcontainer_guid."?q=vimeo\">Vimeo</a>";
-$body .= "</li>";
-$body .= "</ul>";
-$body .= "</div>";
-
-$body .= '<form action="javascript:sendSearchRequest(1);" method="get" id="browse_video_form">';
-$body .= elgg_view('input/hidden',array('internalname'=>'video_action', 'value'=>'search_video'));
-$body .= elgg_view('input/hidden',array('internalname'=>'guid', 'value'=>$vars['guid']));
-
-switch($browseCat) {
- case "youtube" :
- $body .= elgg_view('forms/labels/youtube');
- break;
- case "metacafe" :
- $body .= elgg_view('forms/labels/metacafe');
- break;
- case "vimeo" :
- $body .= elgg_view('forms/labels/vimeo');
- break;
- case "googlevideos" :
- $body .= elgg_view('forms/labels/googlevideos');
- break;
- default :
- $body .= elgg_view('forms/labels/youtube');
- break;
-}
-$body .= elgg_view('input/hidden',array('internalname'=>'page', 'value'=>$browseCat));
-$body .= '</form>';
-
-$body .= '<div id="loading_search_results"></div>';
-$body .= '<div id="responseSearch" align="center"></div>';
-
-print $body;
-
-
-?>
-
-<script type="text/javascript">
-var page = "<?php echo $browseCat;?>";
-var container = "<?php echo $container;?>";
-$('#videonav li').removeClass();
-switch(page) {
-case "youtube" : $('#YT').removeClass().addClass('selected');
- break;
-case "metacafe" : $('#MC').removeClass().addClass('selected');
- break;
-case "vimeo" : $('#VM').removeClass().addClass('selected');
- break;
-/*
-case "googlevideos" : $('#GV').removeClass().addClass('active');
- break;
-*/
-default : $('#YT').removeClass().addClass('selected');
- break;
-}
-
-function sendSearchRequest(p){
-var queryFeed = $("#title_search").val();
-if(trim(queryFeed) != '') {
- $("#loading_search_results").html("<div class='ajax_loader'></div>");
- var elggTS = "<?php echo time(); ?>";
- var elggToken = "<?php echo generate_action_token(time()); ?>";
- $.ajax({
- type: "GET",
- url: "<?php echo $vars['url']; ?>"+"action/videolist/tubesearch",
- data: "bustcache="+new Date().getTime()+"&__elgg_ts="+elggTS+"&__elgg_token="+elggToken+"&page="+page+"&q="+queryFeed+"&start_index="+p+"&container="+container,
- success: function(html){
- $("#loading_search_results").html("");
- $("#responseSearch").html('');
- $("#responseSearch").html(html);
- }
- });
-}
-else{}
-}
-
-function showV_idFeed(param, param2){
-var arg = param;
-var embed_video = "<div class='close_video'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0' width='475' height='350'>"+
- "<param name='movie' value='"+arg+"&amp;autoplay=1'>"+
- "<param name='quality' value='high'>"+
- "<param name='bgcolor' value='#000000'>"+
- "<!--[if !IE]> <-->"+
- "<object data='"+arg+"&amp;autoplay=1' width='475' height='350' autoplay=1 type='application/x-shockwave-flash'>"+
- "<param name='quality' value='high'>"+
- "<param name='bgcolor' value='#000000'>"+
- "<param name='pluginurl' value='http://www.adobe.com/go/getflashplayer'>"+
- "FAIL (the browser should render some flash content, not this)."+
- "</object>"+
- "<!--> <![endif]-->"+
- "</object>";
-disableScreen(embed_video, param2);
-}
-
-function showV_idFeedMetacafe(param, param2){
- var argArray = param.split("/");
- var arg = argArray[0]+"/"+argArray[1]+".swf";
- var embed_video = "<div class='close_video'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object width=\"475\" height=\"350\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"Metacafe_"+argArray[0]+"\" value=\"http://www.metacafe.com/fplayer/"+arg+"&amp;autoplay=1\" /><embed src=\"http://www.metacafe.com/fplayer/"+arg+"&amp;autoplay=1\" type=\"application/x-shockwave-flash\" name=\"Metacafe_"+argArray[0]+"\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"475\" height=\"350\"></embed></object>";
-
- disableScreen(embed_video, param2);
-}
-
-function showV_idFeedVimeo(param, param2){
- var arg = param;
- var embed_video = "<div class='close_video'><a href='javascript:void(0);' onclick='javascript:closeit("+param2+");'>close</a></div><object width=\"475\" height=\"350\"><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"movie\" value=\"http://vimeo.com/moogaloop.swf?clip_id="+arg+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" /><embed src=\"http://vimeo.com/moogaloop.swf?clip_id="+arg+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" width=\"475\" height=\"350\"></embed></object>";
- disableScreen(embed_video, param2);
-}
-
-
-function getPageScroll() {
- var xScroll, yScroll;
- if (self.pageYOffset) {
- yScroll = self.pageYOffset;
- xScroll = self.pageXOffset;
- } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
- yScroll = document.documentElement.scrollTop;
- xScroll = document.documentElement.scrollLeft;
- } else if (document.body) {// all other Explorers
- yScroll = document.body.scrollTop;
- xScroll = document.body.scrollLeft;
- }
- return new Array(xScroll,yScroll)
-}
-
-function getPageHeight() {
- var windowHeight
- if (self.innerHeight) { // all except Explorer
- windowHeight = self.innerHeight;
- } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
- windowHeight = document.documentElement.clientHeight;
- } else if (document.body) { // other Explorers
- windowHeight = document.body.clientHeight;
- }
- return windowHeight
-}
-
-function getPageWidth() {
- var windowWidth;
- if( typeof( window.innerWidth ) == 'number' ) {
- windowWidth = window.innerWidth; //Non-IE
- } else if( document.documentElement && ( document.documentElement.clientWidth ) ) {
- windowWidth = document.documentElement.clientWidth; //IE 6+ in 'standards compliant mode'
- } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
- windowWidth = document.body.clientWidth; //IE 4 compatible
- }
- return windowWidth
-}
-
-function disableScreen(embed_video, param2) {
- var getContainer = "#vidContainer"+param2;
- $('body').append("<div id='page_overlay'/>");
- $('#page_overlay').css({
- backgroundColor: "#000000",
- opacity: "0.7"
- }).fadeIn();
-
- $(getContainer).css({
- top: getPageScroll()[1] + (getPageHeight() / 10),
- left: ((getPageWidth() / 2) - (400)),
- height: "0px"
- }).animate( {height:"390px"}, 600 );
-
- document.getElementById("vidContainer"+param2).innerHTML = embed_video;
-}
-
-function trim(stringToTrim){
- return ltrim(rtrim(stringToTrim));
-}
-
-function ltrim(stringToTrim) {
- return stringToTrim.replace(/^\s+/,"");
-}
-
-function rtrim(stringToTrim) {
- return stringToTrim.replace(/\s+$/,"");
-}
-
-function closeit(param){
- document.getElementById("vidContainer"+param).innerHTML = "";
- document.getElementById("vidContainer"+param).style.display = "none";
- $('#page_overlay').remove();
-}
-
-function InsertVideoUrl(param, param2){
- var actionAction = "add_video";
- var access_id = 2;
- var elggTS = "<?php echo time(); ?>";
- var elggToken = "<?php echo generate_action_token(time()); ?>";
- $.ajax({
- type: "GET",
- url: "<?php echo $vars['url']; ?>"+"action/videolist/add",
- data: "bustcache="+new Date().getTime()+"&__elgg_ts="+elggTS+"&__elgg_token="+elggToken+"&video_action="+actionAction+"&title_videourl="+param+"&videolisttags="+param2+"&access_id="+access_id,
- success: function(html){
- $("#loading_search_results").html("");
- $("#responseSearch").html('');
- $("#responseSearch").html(html);
- }
- });
-
-}
-</script>
diff --git a/views/default/forms/videolist/edit.php b/views/default/forms/videolist/edit.php
deleted file mode 100644
index ba6141263..000000000
--- a/views/default/forms/videolist/edit.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/**
- * Videolist edit form body
- *
- * @package ElggVideolist
- */
-
-$variables = elgg_get_config('videolist');
-
-if(empty($vars['guid'])){
- unset($variables['title']);
-}
-
-foreach ($variables as $name => $type) {
-?>
-<div>
- <label><?php echo elgg_echo("videolist:$name") ?></label>
- <?php
- if ($type != 'longtext') {
- echo '<br />';
- }
- ?>
- <?php echo elgg_view("input/$type", array(
- 'name' => $name,
- 'value' => $vars[$name],
- ));
- ?>
-</div>
-<?php
-}
-
-$cats = elgg_view('categories', $vars);
-if (!empty($cats)) {
- echo $cats;
-}
-
-
-echo '<div class="elgg-foot">';
-if ($vars['guid']) {
- echo elgg_view('input/hidden', array(
- 'name' => 'video_guid',
- 'value' => $vars['guid'],
- ));
-}
-echo elgg_view('input/hidden', array(
- 'name' => 'container_guid',
- 'value' => $vars['container_guid'],
-));
-
-echo elgg_view('input/submit', array('value' => elgg_echo('save')));
-
-echo '</div>';
diff --git a/views/default/forms/videolist/labels/googlevideos.php b/views/default/forms/videolist/labels/googlevideos.php
deleted file mode 100644
index 9ce2d607c..000000000
--- a/views/default/forms/videolist/labels/googlevideos.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/**
- * Elgg User Profile Video Plugin
- * This plugin allows users to browse youtube videos
- *
- * @package ElggProfile
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
-$body = '<p class="margin_none"><label>'.elgg_echo("videolist:title_search_tube").'</label></p>';
-$body .= "<div class='search_videos clearfloat'>";
-$body .= "<div style='float:left;'>";
-$body .= "<a href=\"http://video.google.com\"><img src='".$vars['url']."mod/videolist/graphics/logo_videos.png' height='30'/></a>";
-$body .= "</div>";
-$body .= "<div style='float:left;'>";
-$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/>";
-if($error['no-search'] == 0) {
- $body .= '<div class="videolist_error">'.$error_msg['no-search'].'</div>';
-}
-$body .= "</div>";
-$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:vimeo')));
-$body .= "</div>";
-$body .= '<div id="searchcontrol">Loading...</div>';
-print $body; \ No newline at end of file
diff --git a/views/default/forms/videolist/labels/metacafe.php b/views/default/forms/videolist/labels/metacafe.php
deleted file mode 100644
index 0642153f4..000000000
--- a/views/default/forms/videolist/labels/metacafe.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - load metacafe label
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
-$body = '<p class="margin_none"><label>'.elgg_echo("videolist:title_search_tube").'</label></p>';
-$body .= "<div class='search_videos clearfloat'>";
-$body .= "<div style='float:left;'>";
-$body .= "<a href=\"http://www.metacafe.com\"><img src='".$vars['url']."mod/videolist/graphics/metacafe.jpg' height='30'/></a>";
-$body .= "</div>";
-$body .= "<div style='float:left;'>";
-$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/>";
-if($error['no-search'] == 0) {
- $body .= '<div class="videolist_error">'.$error_msg['no-search'].'</div>';
-}
-$body .= "</div>";
-$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:metacafe')));
-$body .= "</div>";
-
-print $body; \ No newline at end of file
diff --git a/views/default/forms/videolist/labels/vimeo.php b/views/default/forms/videolist/labels/vimeo.php
deleted file mode 100644
index 24a49a1ee..000000000
--- a/views/default/forms/videolist/labels/vimeo.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - load vimeo label
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
-$body = '<p class="margin_none"><label>'.elgg_echo("videolist:title_search_tube").'</label></p>';
-$body .= "<div class='search_videos clearfloat'>";
-$body .= "<div style='float:left;'>";
-$body .= "<a href=\"http://www.vimeo.com\"><img src='".$vars['url']."mod/videolist/graphics/vimeo_logo.gif' height='30'/></a>";
-$body .= "</div>";
-$body .= "<div style='float:left;'>";
-$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/>";
-if ($error['no-search'] == 0) {
- $body .= '<div class="videolist_error">'.$error_msg['no-search'].'</div>';
-}
-$body .= "</div>";
-$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos:vimeo')));
-$body .= "</div>";
-
-print $body; \ No newline at end of file
diff --git a/views/default/forms/videolist/labels/youtube.php b/views/default/forms/videolist/labels/youtube.php
deleted file mode 100644
index 4c824f6f3..000000000
--- a/views/default/forms/videolist/labels/youtube.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/**
- * Elgg Video Plugin
- * This plugin allows users to create a library of youtube/vimeo/metacafe videos
- * @file - load youtube label
- * @package Elgg
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Prateek Choudhary <synapticfield@gmail.com>
- * @copyright Prateek Choudhary
- */
-
-$body = '<p class="margin_none"><label>'.elgg_echo("videolist:title_search_tube").'</label></p>';
-$body .= "<div class='search_videos clearfloat'>";
-$body .= "<div style='float:left;'>";
-$body .= "<a href=\"http://www.youtube.com\"><img src='".$vars['url']."mod/videolist/graphics/badge3.gif' height='30'/></a>";
-$body .= "</div>";
-$body .= "<div style='float:left;'>";
-$body .= "<input type=\"text\" name=\"title_search\" value=\"\" id=\"title_search\" size=\"30\"/>";
-if($error['no-search'] == 0) {
- $body .= '<div class="videolist_error">'.$error_msg['no-search'].'</div>';
-}
-$body .= "</div>";
-$body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('videolist:searchTubeVideos')));
-$body .= "</div>";
-
-print $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;