aboutsummaryrefslogtreecommitdiff
path: root/views/default/forms
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-09-29 18:16:03 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-09-29 18:16:03 -0700
commitbfdb9bb8a87a29038ba1ae25355684ae19678fdd (patch)
treea074e2d6bfa19c17b284c3950b4555cf584eabe2 /views/default/forms
parent7be23080f34a8f92ca1f8d49c3aa0e6ce3472f4c (diff)
parenta458ae4e0f8e5b19884860fead6e5f901b95eca4 (diff)
downloadelgg-bfdb9bb8a87a29038ba1ae25355684ae19678fdd.tar.gz
elgg-bfdb9bb8a87a29038ba1ae25355684ae19678fdd.tar.bz2
Merge branch 'master' of github.com:brettp/Elgg
Diffstat (limited to 'views/default/forms')
-rw-r--r--views/default/forms/account/settings.php2
-rw-r--r--views/default/forms/admin/plugins/change_state.php4
-rw-r--r--views/default/forms/admin/plugins/filter.php2
-rw-r--r--views/default/forms/admin/plugins/sort.php2
-rw-r--r--views/default/forms/admin/site/update_advanced.php16
-rw-r--r--views/default/forms/avatar/crop.php2
-rw-r--r--views/default/forms/login.php24
-rw-r--r--views/default/forms/plugins/settings/save.php2
-rw-r--r--views/default/forms/plugins/usersettings/save.php9
-rw-r--r--views/default/forms/profile/fields/add.php8
-rw-r--r--views/default/forms/profile/fields/reset.php2
-rw-r--r--views/default/forms/register.php2
-rw-r--r--views/default/forms/usersettings/save.php8
13 files changed, 54 insertions, 29 deletions
diff --git a/views/default/forms/account/settings.php b/views/default/forms/account/settings.php
index 824b2280b..3967207ce 100644
--- a/views/default/forms/account/settings.php
+++ b/views/default/forms/account/settings.php
@@ -5,4 +5,6 @@
* 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/plugins/change_state.php b/views/default/forms/admin/plugins/change_state.php
index ba5d873e7..730c8ff32 100644
--- a/views/default/forms/admin/plugins/change_state.php
+++ b/views/default/forms/admin/plugins/change_state.php
@@ -9,6 +9,7 @@
$guids = elgg_extract('guids', $vars, array());
$guids = implode(',', $guids);
+echo '<div>';
echo elgg_view('input/hidden', array(
'name' => 'guids',
'value' => $guids,
@@ -16,5 +17,6 @@ echo elgg_view('input/hidden', array(
echo elgg_view('input/submit', array(
'value' => elgg_echo("admin:plugins:{$vars['action']}_all"),
- 'class' => 'elgg-button elgg-button-action'
+ '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
index d00906e6a..fd1b618bc 100644
--- a/views/default/forms/admin/plugins/filter.php
+++ b/views/default/forms/admin/plugins/filter.php
@@ -7,6 +7,7 @@
* @uses $vvars['sort']
*/
+echo '<div>';
echo elgg_view('input/dropdown', array(
'name' => 'category',
'options_values' => $vars['category_options'],
@@ -22,3 +23,4 @@ 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
index 284e085e6..7f2246bad 100644
--- a/views/default/forms/admin/plugins/sort.php
+++ b/views/default/forms/admin/plugins/sort.php
@@ -7,6 +7,7 @@
* @uses $vars['category']
*/
+echo '<div class="mtm">';
echo elgg_view('input/dropdown', array(
'name' => 'sort',
'options_values' => $vars['sort_options'],
@@ -22,3 +23,4 @@ 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/update_advanced.php b/views/default/forms/admin/site/update_advanced.php
index fa253967c..e12764092 100644
--- a/views/default/forms/admin/site/update_advanced.php
+++ b/views/default/forms/admin/site/update_advanced.php
@@ -17,26 +17,26 @@ foreach (array('wwwroot', 'path', 'dataroot') as $field) {
}
$form_body .= "<div>" . elgg_echo('admin:site:access:warning') . "<br />";
-$form_body .= elgg_echo('installation:sitepermissions');
+$form_body .= "<label>" . elgg_echo('installation:sitepermissions') . "</label>";
$form_body .= elgg_view('input/access', array(
'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')),
+ 'options' => array(elgg_echo('installation:allow_user_default_access:label') => elgg_echo('installation:allow_user_default_access:label')),
'name' => 'allow_user_default_access',
'value' => (elgg_get_config('allow_user_default_access') ? elgg_echo('installation:allow_user_default_access:label') : ""),
)) . "</div>";
$form_body .= "<div>" . elgg_echo('installation:simplecache:description') . "<br />";
$form_body .= elgg_view("input/checkboxes", array(
- 'options' => array(elgg_echo('installation:simplecache:label')),
+ 'options' => array(elgg_echo('installation:simplecache:label') => elgg_echo('installation:simplecache:label')),
'name' => 'simplecache_enabled',
'value' => (elgg_get_config('simplecache_enabled') ? elgg_echo('installation:simplecache:label') : ""),
)) . "</div>";
$form_body .= "<div>" . elgg_echo('installation:viewpathcache:description') . "<br />";
$form_body .= elgg_view("input/checkboxes", array(
- 'options' => array(elgg_echo('installation:viewpathcache:label')),
+ 'options' => array(elgg_echo('installation:viewpathcache:label') => elgg_echo('installation:viewpathcache:label')),
'name' => 'viewpath_cache_enabled',
'value' => (elgg_get_config('viewpath_cache_enabled') ? elgg_echo('installation:viewpathcache:label') : ""),
)) . "</div>";
@@ -52,7 +52,7 @@ $form_body .= '</div>';
// control new user registration
$options = array(
- 'options' => array(elgg_echo('installation:registration:label')),
+ 'options' => array(elgg_echo('installation:registration:label') => elgg_echo('installation:registration:label')),
'name' => 'allow_registration',
'value' => elgg_get_config('allow_registration') ? elgg_echo('installation:registration:label') : '',
);
@@ -62,7 +62,7 @@ $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')),
+ 'options' => array(elgg_echo('installation:walled_garden:label') => elgg_echo('installation:walled_garden:label')),
'name' => 'walled_garden',
'value' => $walled_garden ? elgg_echo('installation:walled_garden:label') : '',
);
@@ -71,7 +71,7 @@ $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')),
+ 'options' => array(elgg_echo('installation:httpslogin:label') => elgg_echo('installation:httpslogin:label')),
'name' => 'https_login',
'value' => (elgg_get_config('https_login') ? elgg_echo('installation:httpslogin:label') : "")
)) . "</div>";
@@ -83,7 +83,7 @@ if ($disable_api) {
$on = (disable_api ? "" : elgg_echo('installation:disableapi:label'));
}
$form_body .= elgg_view("input/checkboxes", array(
- 'options' => array(elgg_echo('installation:disableapi:label')),
+ 'options' => array(elgg_echo('installation:disableapi:label') => elgg_echo('installation:disableapi:label')),
'name' => 'api',
'value' => $on,
));
diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php
index dc5e3d77f..9fcae25c4 100644
--- a/views/default/forms/avatar/crop.php
+++ b/views/default/forms/avatar/crop.php
@@ -5,7 +5,7 @@
* @uses $vars['entity']
*/
-$master_image = $vars['entity']->getIcon('master');
+$master_image = $vars['entity']->getIconUrl('master');
?>
<div class="clearfix">
diff --git a/views/default/forms/login.php b/views/default/forms/login.php
index 5cfdcd4c6..91e9cda42 100644
--- a/views/default/forms/login.php
+++ b/views/default/forms/login.php
@@ -18,7 +18,7 @@
<?php echo elgg_view('login/extend'); ?>
-<div>
+<div class="elgg-foot">
<?php echo elgg_view('input/submit', array('value' => elgg_echo('login'))); ?>
<label class="right mtm">
@@ -31,15 +31,15 @@
echo elgg_view('input/hidden', array('name' => 'returntoreferer', 'value' => 'true'));
}
?>
-</div>
-<ul class="elgg-menu elgg-menu-footer">
-<?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="forgotten_password_link" href="<?php echo elgg_get_site_url(); ?>forgotpassword">
- <?php echo elgg_echo('user:password:lost'); ?>
- </a></li>
-</ul> \ No newline at end of file
+ <ul class="elgg-menu elgg-menu-footer 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 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/plugins/settings/save.php b/views/default/forms/plugins/settings/save.php
index c3d8f231f..dc7b2fef7 100644
--- a/views/default/forms/plugins/settings/save.php
+++ b/views/default/forms/plugins/settings/save.php
@@ -1,6 +1,6 @@
<?php
/**
- * Used to show plugin user settings.
+ * Used to show plugin settings for both users and admins.
*
* @package Elgg.Core
* @subpackage Plugins
diff --git a/views/default/forms/plugins/usersettings/save.php b/views/default/forms/plugins/usersettings/save.php
index bf243ae6b..ced88f818 100644
--- a/views/default/forms/plugins/usersettings/save.php
+++ b/views/default/forms/plugins/usersettings/save.php
@@ -1,4 +1,13 @@
<?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
diff --git a/views/default/forms/profile/fields/add.php b/views/default/forms/profile/fields/add.php
index 7961037e6..c1d07d2ce 100644
--- a/views/default/forms/profile/fields/add.php
+++ b/views/default/forms/profile/fields/add.php
@@ -1,8 +1,6 @@
<?php
/**
- * Elgg profile index
- *
- * @package ElggProfile
+ * Add a new field to the set of custom profile fields
*/
$label_text = elgg_echo('profile:label');
@@ -20,9 +18,9 @@ $type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_val
$submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add')));
$formbody = <<< END
- <p>$label_text: $label_control
+ <div class="elgg-foot">$label_text: $label_control
$type_text: $type_control
- $submit_control</p>
+ $submit_control</div>
END;
echo autop(elgg_echo('profile:explainchangefields'));
diff --git a/views/default/forms/profile/fields/reset.php b/views/default/forms/profile/fields/reset.php
index 4e0f51dc6..c0bb1b7f4 100644
--- a/views/default/forms/profile/fields/reset.php
+++ b/views/default/forms/profile/fields/reset.php
@@ -3,8 +3,10 @@
* Reset profile fields form
*/
+echo '<div class="elgg-foot">';
$params = array(
'value' => elgg_echo('profile:resetdefault'),
'class' => 'elgg-button-cancel',
);
echo elgg_view('input/submit', $params);
+echo '</div>';
diff --git a/views/default/forms/register.php b/views/default/forms/register.php
index 4e0a521ab..6e18cd53d 100644
--- a/views/default/forms/register.php
+++ b/views/default/forms/register.php
@@ -70,9 +70,11 @@ echo elgg_view('register/extend');
// Add captcha hook
echo elgg_view('input/captcha');
+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>';
?>
<script type="text/javascript">
$(function() {
diff --git a/views/default/forms/usersettings/save.php b/views/default/forms/usersettings/save.php
index ea53f2571..71323083f 100644
--- a/views/default/forms/usersettings/save.php
+++ b/views/default/forms/usersettings/save.php
@@ -1,5 +1,11 @@
<?php
-$form_body = elgg_view("forms/account/settings");
+/**
+ * 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')));