Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/18/2021 05:35:00 AM (5 years ago)
Author:
johnjamesjacoby
Message:

Users: Improve UX of form-user-passwords.php template part.

This change makes sure that the "Generate Password" UI is hidden by default if the browser has JavaScript enabled, and that the traditional UI is visible if JavaScript is not enabled.

It also includes the following related improvements:

  • Introduce bbp_doing_script_debug() and bbp_doing_autosave() helpers, and use them where needed
  • Introduce bbp_asset_version() and bbp_get_asset_version() to bust asset cache when debugging
  • Update forum-user-passwords.php template part to swap out body class and add missing element ID
  • Update password form styling in bbpress.css default theme compat CSS

In trunk for 2.7.0. Fixes #3421.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/classes/class-bbp-admin.php

    r7088 r7190  
    816816        // RTL and/or minified
    817817        $suffix  = is_rtl() ? '-rtl' : '';
    818         $suffix .= defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     818        $suffix .= bbp_doing_script_debug() ? '' : '.min';
    819819
    820820        // Get the version to use for JS
    821         $version = bbp_get_version();
     821        $version = bbp_get_asset_version();
    822822
    823823        // Register admin CSS with dashicons dependency
     
    860860
    861861        // Minified
    862         $suffix  = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     862        $suffix  = bbp_doing_script_debug() ? '' : '.min';
    863863
    864864        // Get the version to use for JS
    865         $version = bbp_get_version();
     865        $version = bbp_get_asset_version();
    866866
    867867        // Header JS
Note: See TracChangeset for help on using the changeset viewer.