Index: modules/system/system.css =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.css,v retrieving revision 1.26 diff -u -p -r1.26 system.css --- modules/system/system.css 10 May 2007 19:55:23 -0000 1.26 +++ modules/system/system.css 18 May 2007 06:26:20 -0000 @@ -438,3 +438,11 @@ thead div.sticky-header { #clean-url.install { display: none; } + +/* +** For anything you want to hide on page load when JS is enabled, so +** that you can use the JS to control visibility and avoid flicker. +*/ +html.js .js-hide { + display: none; +} cvs diff: Diffing modules/user Index: modules/user/user.js =================================================================== RCS file: modules/user/user.js diff -N modules/user/user.js --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/user/user.js 18 May 2007 06:26:20 -0000 @@ -0,0 +1,19 @@ +/* $Id$ */ + +/** + * On the admin/user/settings page, conditionally show all of the + * picture-related form elements depending on the current value of the + * "Picture support" radio buttons. + */ +Drupal.userAdminPictureSettingsAutoAttach = function () { + $('div.user-admin-picture-radios input[@type=radio]').click(function () { + $('div.user-admin-picture-settings')[['hide', 'show'][this.value]](); + }); +} + +// Global killswitch. +if (Drupal.jsEnabled) { + $(function() { + Drupal.userAdminPictureSettingsAutoAttach(); + }); +} Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.782 diff -u -p -r1.782 user.module --- modules/user/user.module 17 May 2007 21:33:59 -0000 1.782 +++ modules/user/user.module 18 May 2007 06:26:22 -0000 @@ -2535,13 +2535,63 @@ function user_admin_settings() { file_check_directory($picture_path, 1, 'user_picture_path'); } - $form['pictures'] = array('#type' => 'fieldset', '#title' => t('Pictures')); - $form['pictures']['user_pictures'] = array('#type' => 'radios', '#title' => t('Picture support'), '#default_value' => variable_get('user_pictures', 0), '#options' => array(t('Disabled'), t('Enabled')), '#description' => t('Enable picture support.')); - $form['pictures']['user_picture_path'] = array('#type' => 'textfield', '#title' => t('Picture image path'), '#default_value' => variable_get('user_picture_path', 'pictures'), '#size' => 30, '#maxlength' => 255, '#description' => t('Subdirectory in the directory %dir where pictures will be stored.', array('%dir' => file_directory_path() .'/'))); - $form['pictures']['user_picture_default'] = array('#type' => 'textfield', '#title' => t('Default picture'), '#default_value' => variable_get('user_picture_default', ''), '#size' => 30, '#maxlength' => 255, '#description' => t('URL of picture to display for users with no custom picture selected. Leave blank for none.')); - $form['pictures']['user_picture_dimensions'] = array('#type' => 'textfield', '#title' => t('Picture maximum dimensions'), '#default_value' => variable_get('user_picture_dimensions', '85x85'), '#size' => 15, '#maxlength' => 10, '#description' => t('Maximum dimensions for pictures, in pixels.')); - $form['pictures']['user_picture_file_size'] = array('#type' => 'textfield', '#title' => t('Picture maximum file size'), '#default_value' => variable_get('user_picture_file_size', '30'), '#size' => 15, '#maxlength' => 10, '#description' => t('Maximum file size for pictures, in kB.')); - $form['pictures']['user_picture_guidelines'] = array('#type' => 'textarea', '#title' => t('Picture guidelines'), '#default_value' => variable_get('user_picture_guidelines', ''), '#description' => t("This text is displayed at the picture upload form in addition to the default guidelines. It's useful for helping or instructing your users.")); + $form['pictures'] = array( + '#type' => 'fieldset', + '#title' => t('Pictures'), + ); + $form['pictures']['user_pictures'] = array( + '#type' => 'radios', + '#title' => t('Picture support'), + '#default_value' => variable_get('user_pictures', 0), + '#options' => array(t('Disabled'), t('Enabled')), + '#prefix' => '