diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 16:58:10 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 16:58:10 +0000 |
commit | c10f7d3cf0aa68d2325199ba787702e125907c11 (patch) | |
tree | ae1b1a58936f6b177b27708b7eda46cbfa2fdf87 /views | |
parent | e036de6ceab5f57b0f502b8400ab05e32e96562b (diff) | |
download | elgg-c10f7d3cf0aa68d2325199ba787702e125907c11.tar.gz elgg-c10f7d3cf0aa68d2325199ba787702e125907c11.tar.bz2 |
Refs #2032 core forms use divs
git-svn-id: http://code.elgg.org/elgg/trunk@8164 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r-- | views/default/css/admin.php | 6 | ||||
-rw-r--r-- | views/default/forms/admin/site/update_advanced.php | 44 | ||||
-rw-r--r-- | views/default/forms/admin/site/update_basic.php | 12 | ||||
-rw-r--r-- | views/default/forms/avatar/crop.php | 4 | ||||
-rw-r--r-- | views/default/forms/avatar/upload.php | 4 | ||||
-rw-r--r-- | views/default/forms/comments/add.php | 4 | ||||
-rw-r--r-- | views/default/forms/friends/edit.php | 16 | ||||
-rw-r--r-- | views/default/forms/login.php | 4 | ||||
-rw-r--r-- | views/default/forms/plugins/settings/save.php | 4 | ||||
-rw-r--r-- | views/default/forms/profile/edit.php | 12 | ||||
-rw-r--r-- | views/default/forms/register.php | 20 | ||||
-rw-r--r-- | views/default/forms/user/requestnewpassword.php | 12 | ||||
-rw-r--r-- | views/default/forms/useradd.php | 16 | ||||
-rw-r--r-- | views/default/forms/usersettings/save.php | 4 | ||||
-rw-r--r-- | views/default/forms/widgets/save.php | 4 | ||||
-rw-r--r-- | views/default/group/default.php | 1 |
16 files changed, 86 insertions, 81 deletions
diff --git a/views/default/css/admin.php b/views/default/css/admin.php index e30cb4d7a..9aac987d3 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -382,6 +382,12 @@ label { color:#333333; font-size: 110%; } +fieldset > div { + margin-bottom: 15px; +} +fieldset > div:last-child { + margin-bottom: 0; +} input { font: 120% Arial, Helvetica, sans-serif; padding: 5px; diff --git a/views/default/forms/admin/site/update_advanced.php b/views/default/forms/admin/site/update_advanced.php index 3085921d9..2e8021938 100644 --- a/views/default/forms/admin/site/update_advanced.php +++ b/views/default/forms/admin/site/update_advanced.php @@ -5,7 +5,7 @@ $form_body = ""; foreach (array('wwwroot', 'path', 'dataroot', 'view') as $field) { - $form_body .= "<p>"; + $form_body .= "<div>"; $form_body .= elgg_echo('installation:' . $field) . "<br />"; $warning = elgg_echo('installation:warning:' . $field); if ($warning != 'installation:warning:' . $field) { @@ -13,42 +13,42 @@ foreach (array('wwwroot', 'path', 'dataroot', 'view') as $field) { } $value = elgg_get_config($field); $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value)); - $form_body .= "</p>"; + $form_body .= "</div>"; } -$form_body .= "<p>" . elgg_echo('admin:site:access:warning') . "<br />"; +$form_body .= "<div>" . elgg_echo('admin:site:access:warning') . "<br />"; $form_body .= elgg_echo('installation:sitepermissions'); $form_body .= elgg_view('input/access', array( 'internalname' => 'default_access', 'value' => elgg_get_config('default_access'), -)) . "</p>"; -$form_body .= "<p>" . elgg_echo('installation:allow_user_default_access:description') . "<br />"; +)) . "</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')), 'internalname' => 'allow_user_default_access', 'value' => (elgg_get_config('allow_user_default_access') ? elgg_echo('installation:allow_user_default_access:label') : ""), -)) . "</p>"; -$form_body .= "<p>" . elgg_echo('installation:simplecache:description') . "<br />"; +)) . "</div>"; +$form_body .= "<div>" . elgg_echo('installation:simplecache:description') . "<br />"; $form_body .= elgg_view("input/checkboxes", array( 'options' => array(elgg_echo('installation:simplecache:label')), 'internalname' => 'simplecache_enabled', 'value' => (elgg_get_config('simplecache_enabled') ? elgg_echo('installation:simplecache:label') : ""), -)) . "</p>"; -$form_body .= "<p>" . elgg_echo('installation:viewpathcache:description') . "<br />"; +)) . "</div>"; +$form_body .= "<div>" . elgg_echo('installation:viewpathcache:description') . "<br />"; $form_body .= elgg_view("input/checkboxes", array( 'options' => array(elgg_echo('installation:viewpathcache:label')), 'internalname' => 'viewpath_cache_enabled', 'value' => (elgg_get_config('viewpath_cache_enabled') ? elgg_echo('installation:viewpathcache:label') : ""), -)) . "</p>"; +)) . "</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 .= "<p>" . elgg_echo('installation:debug'); +$form_body .= "<div>" . elgg_echo('installation:debug'); $form_body .= elgg_view('input/dropdown', array( 'options_values' => $debug_options, 'internalname' => 'debug', 'value' => elgg_get_config('debug'), )); -$form_body .= '</p>'; +$form_body .= '</div>'; // control new user registration $options = array( @@ -56,8 +56,8 @@ $options = array( 'internalname' => 'allow_registration', 'value' => elgg_get_config('allow_registration') ? elgg_echo('installation:registration:label') : '', ); -$form_body .= '<p>' . elgg_echo('installation:registration:description'); -$form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</p>'; +$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); @@ -66,17 +66,17 @@ $options = array( 'internalname' => 'walled_garden', 'value' => $walled_garden ? elgg_echo('installation:walled_garden:label') : '', ); -$form_body .= '<p>' . elgg_echo('installation:walled_garden:description'); -$form_body .= '<br />' . elgg_view('input/checkboxes', $options) . '</p>'; +$form_body .= '<div>' . elgg_echo('installation:walled_garden:description'); +$form_body .= '<br />' . elgg_view('input/checkboxes', $options) . '</div>'; -$form_body .= "<p>" . elgg_echo('installation:httpslogin') . "<br />"; +$form_body .= "<div>" . elgg_echo('installation:httpslogin') . "<br />"; $form_body .= elgg_view("input/checkboxes", array( 'options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => (elgg_get_config('https_login') ? elgg_echo('installation:httpslogin:label') : "") -)) . "</p>"; +)) . "</div>"; -$form_body .= "<p>" . elgg_echo('installation:disableapi') . "<br />"; +$form_body .= "<div>" . elgg_echo('installation:disableapi') . "<br />"; $on = elgg_echo('installation:disableapi:label'); $disable_api = elgg_get_config('disable_api'); if ($disable_api) { @@ -87,13 +87,13 @@ $form_body .= elgg_view("input/checkboxes", array( 'internalname' => 'api', 'value' => $on, )); -$form_body .= "</p>"; +$form_body .= "</div>"; $form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go')); -$form_body .= '<p class="bta">'; +$form_body .= '<div class="bta">'; $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); -$form_body .= '</p>'; +$form_body .= '</div>'; $form_body = "<div class='admin_settings site_admin'>" . $form_body . "</div>"; echo $form_body;
\ No newline at end of file diff --git a/views/default/forms/admin/site/update_basic.php b/views/default/forms/admin/site/update_basic.php index f8cefaa7c..30d3b6173 100644 --- a/views/default/forms/admin/site/update_basic.php +++ b/views/default/forms/admin/site/update_basic.php @@ -5,7 +5,7 @@ $form_body = ""; foreach (array('sitename','sitedescription', 'siteemail') as $field) { - $form_body .= "<p>"; + $form_body .= "<div>"; $form_body .= elgg_echo('installation:' . $field) . "<br />"; $warning = elgg_echo('installation:warning:' . $field); if ($warning != 'installation:warning:' . $field) { @@ -13,20 +13,20 @@ foreach (array('sitename','sitedescription', 'siteemail') as $field) { } $value = elgg_get_config($field); $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value)); - $form_body .= "</p>"; + $form_body .= "</div>"; } $languages = get_installed_translations(); -$form_body .= "<p>" . elgg_echo('installation:language'); +$form_body .= "<div>" . elgg_echo('installation:language'); $form_body .= elgg_view("input/dropdown", array( 'internalname' => 'language', 'value' => elgg_get_config('language'), 'options_values' => $languages, -)) . "</p>"; +)) . "</div>"; -$form_body .= '<p class="bta">'; +$form_body .= '<div class="bta">'; $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); -$form_body .= '</p>'; +$form_body .= '</div>'; $form_body = "<div class='admin_settings site_admin'>".$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 index cceb42e44..01ceb3fec 100644 --- a/views/default/forms/avatar/crop.php +++ b/views/default/forms/avatar/crop.php @@ -8,9 +8,9 @@ $master_image = $vars['entity']->getIcon('master'); ?> -<p> +<div> <img id="user-avatar" src="<?php echo $master_image; ?>" alt="<?php echo elgg_echo('avatar'); ?>" /> -</p> +</div> <div class="clearfloat"></div> <?php diff --git a/views/default/forms/avatar/upload.php b/views/default/forms/avatar/upload.php index 4354d691a..a89f5ee68 100644 --- a/views/default/forms/avatar/upload.php +++ b/views/default/forms/avatar/upload.php @@ -7,9 +7,9 @@ echo elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $vars['entity']->guid)); ?> -<p> +<div> <label><?php echo elgg_echo("avatar:upload"); ?></label><br /> <?php echo elgg_view("input/file",array('internalname' => 'avatar')); ?> <br /> <?php echo elgg_view('input/submit', array('value' => elgg_echo('upload'))); ?> -</p> +</div> diff --git a/views/default/forms/comments/add.php b/views/default/forms/comments/add.php index 238777422..b4f63b814 100644 --- a/views/default/forms/comments/add.php +++ b/views/default/forms/comments/add.php @@ -9,10 +9,10 @@ if (isset($vars['entity']) && elgg_is_logged_in()) { ?> -<p class="mbn"> +<div class="mbn"> <label><?php echo elgg_echo("generic_comments:text"); ?></label> <?php echo elgg_view('input/longtext', array('internalname' => 'generic_comment')); ?> -</p> +</div> <?php echo elgg_view('input/hidden', array( diff --git a/views/default/forms/friends/edit.php b/views/default/forms/friends/edit.php index 3258dae9d..ac817f23a 100644 --- a/views/default/forms/friends/edit.php +++ b/views/default/forms/friends/edit.php @@ -24,13 +24,13 @@ if (isset($vars['collection'])) { } -$form_body = "<div class='contentWrapper'><p><label>" . elgg_echo("friends:collectionname") . "<br />" . +$form_body = "<div class='contentWrapper'><div><label>" . elgg_echo("friends:collectionname") . "<br />" . elgg_view("input/text", array( "internalname" => "collection_name", "value" => $title, - )) . "</label></p>"; + )) . "</label></div>"; -$form_body .= "<p>"; +$form_body .= "<div>"; if($vars['collection_members']){ $form_body .= elgg_echo("friends:collectionfriends") . "<br />"; @@ -40,16 +40,16 @@ if($vars['collection_members']){ } } -$form_body .= "</p>"; +$form_body .= "</div>"; -$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 .= "<div><label>" . elgg_echo("friends:addfriends") . "</label>". + elgg_view('core/friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "</div>"; -$form_body .= "<p>"; +$form_body .= "<div>"; 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>"; +$form_body .= "</div></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/login.php b/views/default/forms/login.php index 99d9cdd22..862b5ab9d 100644 --- a/views/default/forms/login.php +++ b/views/default/forms/login.php @@ -7,7 +7,7 @@ */ ?> -<p class='loginbox'> +<div class='loginbox'> <label><?php echo elgg_echo('loginusername'); ?></label><br /> <?php echo elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')); ?> <label><?php echo elgg_echo('password'); ?></label><br /> @@ -32,4 +32,4 @@ <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 +</div>
\ No newline at end of file diff --git a/views/default/forms/plugins/settings/save.php b/views/default/forms/plugins/settings/save.php index 68c6b1f52..8cd05471f 100644 --- a/views/default/forms/plugins/settings/save.php +++ b/views/default/forms/plugins/settings/save.php @@ -19,8 +19,8 @@ if ($type != 'user') { echo elgg_view("{$type}settings/$plugin_id/edit", $vars); -echo "<p>"; +echo "<div>"; echo elgg_view('input/hidden', array('internalname' => 'plugin_id', 'value' => $plugin_id)); echo elgg_view('input/hidden', array('internalname' => 'user_guid', 'value' => $user_guid)); echo elgg_view('input/submit', array('value' => elgg_echo('save'))); -echo "</p>"; +echo "</div>"; diff --git a/views/default/forms/profile/edit.php b/views/default/forms/profile/edit.php index 108e7f9f2..4de6c47fe 100644 --- a/views/default/forms/profile/edit.php +++ b/views/default/forms/profile/edit.php @@ -7,10 +7,10 @@ ?> -<p> +<div> <label><?php echo elgg_echo('user:name:label'); ?></label> <?php echo elgg_view('input/text',array('internalname' => 'name', 'value' => $vars['entity']->name)); ?> -</p> +</div> <?php $profile_fields = elgg_get_config('profile_fields'); @@ -37,7 +37,7 @@ if (is_array($profile_fields) && count($profile_fields) > 0) { } ?> -<p> +<div> <label><?php echo elgg_echo("profile:{$shortname}") ?></label> <?php $params = array( @@ -51,14 +51,14 @@ if (is_array($profile_fields) && count($profile_fields) > 0) { ); echo elgg_view('input/access', $params); ?> -</p> +</div> <?php } } ?> -<p> +<div> <?php echo elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $vars['entity']->guid)); echo elgg_view('input/submit', array('value' => elgg_echo('save'))); ?> -</p> +</div> diff --git a/views/default/forms/register.php b/views/default/forms/register.php index c2a23ad8c..a7f34f777 100644 --- a/views/default/forms/register.php +++ b/views/default/forms/register.php @@ -16,31 +16,31 @@ if (elgg_is_admin_logged_in() && isset($vars['show_admin'])) { } ?> -<p class="mtm"> +<div class="mtm"> <label><?php echo elgg_echo('name'); ?></label> <br /> <?php echo elgg_view('input/text', array('internalname' => 'name', 'value' => $name)); ?> -</p> -<p> +</div> +<div> <label><?php echo elgg_echo('email'); ?></label> <br /> <?php echo elgg_view('input/text', array('internalname' => 'email', 'value' => $email)); ?> -</p> -<p> +</div> +<div> <label><?php echo elgg_echo('username'); ?></label> <br /> <?php echo elgg_view('input/text', array('internalname' => 'username', 'value' => $username)); ?> -</p> -<p> +</div> +<div> <label><?php echo elgg_echo('password'); ?></label> <br /> <?php echo elgg_view('input/password', array('internalname' => 'password')); ?> -</p> -<p> +</div> +<div> <label><?php echo elgg_echo('passwordagain'); ?></label> <br /> <?php echo elgg_view('input/password', array('internalname' => 'password2')); ?> -</p> +</div> <?php // view to extend to add more fields to the registration form diff --git a/views/default/forms/user/requestnewpassword.php b/views/default/forms/user/requestnewpassword.php index d3823f22b..8a83da709 100644 --- a/views/default/forms/user/requestnewpassword.php +++ b/views/default/forms/user/requestnewpassword.php @@ -7,17 +7,17 @@ */ ?> -<p class="mtm"> +<div class="mtm"> <?php echo elgg_echo('user:password:text'); ?> -</p> -<p> +</div> +<div> <label><?php echo elgg_echo('username'); ?></label> <?php echo elgg_view('input/text', array('internalname' => 'username')); ?> -</p> +</div> <?php echo elgg_view('input/captcha'); ?> -<p> +<div> <?php echo elgg_view('input/submit', array('value' => elgg_echo('request'))); ?> -</p> +</div> <?php //@todo JS 1.8: no ?> <script type="text/javascript"> $(document).ready(function() { diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php index 9032da73e..9926bb437 100644 --- a/views/default/forms/useradd.php +++ b/views/default/forms/useradd.php @@ -13,19 +13,19 @@ if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) { $admin_option = true; } -$form_body = "<p><label>" . elgg_echo('name') . "</label><br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</p>"; -$form_body .= "<p><label>" . elgg_echo('username') . "</label><br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</p>"; -$form_body .= "<p><label>" . elgg_echo('email') . "</label><br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</p>"; -$form_body .= "<p><label>" . elgg_echo('password') . "</label><br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</p>"; -$form_body .= "<p><label>" . elgg_echo('passwordagain') . "</label><br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</p>"; -$form_body .= "<p>"; +$form_body = "<div><label>" . elgg_echo('name') . "</label><br />" . elgg_view('input/text' , array('internalname' => 'name')) . "</div>"; +$form_body .= "<div><label>" . elgg_echo('username') . "</label><br />" . elgg_view('input/text' , array('internalname' => 'username')) . "</div>"; +$form_body .= "<div><label>" . elgg_echo('email') . "</label><br />" . elgg_view('input/text' , array('internalname' => 'email')) . "</div>"; +$form_body .= "<div><label>" . elgg_echo('password') . "</label><br />" . elgg_view('input/password' , array('internalname' => 'password')) . "</div>"; +$form_body .= "<div><label>" . elgg_echo('passwordagain') . "</label><br />" . elgg_view('input/password' , array('internalname' => 'password2')) . "</div>"; +$form_body .= "<div>"; if ($admin_option) { $form_body .= elgg_view('input/checkboxes', array('internalname' => "admin", 'options' => array(elgg_echo('admin_option')))); - $form_body .= '</p><p>'; + $form_body .= '</div><div>'; } -$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</p>"; +$form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('register'))) . "</div>"; ?> <div class="elgg-module elgg-module-inline"> diff --git a/views/default/forms/usersettings/save.php b/views/default/forms/usersettings/save.php index f8136f226..2a240d036 100644 --- a/views/default/forms/usersettings/save.php +++ b/views/default/forms/usersettings/save.php @@ -1,8 +1,8 @@ <?php $form_body = elgg_view("forms/account/settings"); -$form_body .= '<p class="bta">'; +$form_body .= '<div class="bta">'; $form_body .= elgg_view('input/submit', array('value' => elgg_echo('save'))); -$form_body .= '</p>'; +$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 index 291f713c6..c044e245f 100644 --- a/views/default/forms/widgets/save.php +++ b/views/default/forms/widgets/save.php @@ -30,10 +30,10 @@ $submit = elgg_view('input/submit', array('value' => elgg_echo('save'))); $body = <<<___END $custom_form_section $access - <p> + <div> $hidden $submit - </p> + </div> ___END; echo $body;
\ No newline at end of file diff --git a/views/default/group/default.php b/views/default/group/default.php index 662baef92..383a25c49 100644 --- a/views/default/group/default.php +++ b/views/default/group/default.php @@ -7,4 +7,3 @@ */ echo elgg_view('object/default', $vars); -?>
\ No newline at end of file |