Making WordPress.org


Ignore:
Timestamp:
02/25/2016 09:17:16 PM (10 years ago)
Author:
ocean90
Message:

Rosetta Roles: Store selected projects in a collection and sync them with a hidden input field.

Prevents losing checked projects when the list gets filtered.

See #1590.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/views/edit-translation-editor.php

    r2545 r2618  
    1818                                <li id="project-all" class="active">
    1919                                    <label>
    20                                         <input name="projects[]" value="all" type="checkbox"<?php checked( in_array( 'all', $project_access_list ) ); ?>> <?php _e( 'All projects', 'rosetta' ); ?>
     20                                        <input type="checkbox"<?php checked( in_array( 'all', $project_access_list ) ); ?>> <?php _e( 'All projects', 'rosetta' ); ?>
    2121                                    </label>
    2222                                    <div class="sub-projects-wrapper">
     
    3535        </table>
    3636
     37        <input type="hidden" id="project-access-list" name="projects" value="<?php esc_attr( implode( ',', $project_access_list ) ); ?>">
    3738        <input type="hidden" name="action" value="update-translation-editor">
    3839        <input type="hidden" name="user_id" value="<?php echo esc_attr( $user_id ); ?>">
Note: See TracChangeset for help on using the changeset viewer.