Skip to:
Content

BuddyPress.org

Ticket #6882: 6882-fieldset.patch

File 6882-fieldset.patch, 6.7 KB (added by mercime, 3 years ago)

Use fieldsets to group radio buttons

  • src/bp-templates/bp-legacy/buddypress/groups/single/admin.php

     
    9797
    9898        <?php endif; ?>
    9999
    100         <h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4>
     100        <fieldset class="group-create-privacy">
    101101
    102         <div class="radio">
     102                <legend><?php _e( 'Privacy Options', 'buddypress' ); ?></legend>
    103103
    104                 <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label>
     104                <div class="radio">
    105105
    106                 <ul id="public-group-description">
    107                         <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
    108                         <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
    109                         <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
    110                 </ul>
     106                        <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label>
    111107
    112                 <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label>
     108                        <ul id="public-group-description">
     109                                <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
     110                                <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     111                                <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
     112                        </ul>
    113113
    114                 <ul id="private-group-description">
    115                         <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
    116                         <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
    117                         <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
    118                 </ul>
     114                        <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label>
    119115
    120                 <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label>
     116                        <ul id="private-group-description">
     117                                <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
     118                                <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     119                                <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     120                        </ul>
    121121
    122                 <ul id="hidden-group-description">
    123                         <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
    124                         <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
    125                         <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
    126                 </ul>
     122                        <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label>
    127123
    128         </div>
     124                        <ul id="hidden-group-description">
     125                                <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
     126                                <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
     127                                <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     128                        </ul>
    129129
    130         <hr />
     130                </div>
    131131
    132         <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
     132        </fieldset>
    133133
    134         <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
     134        <fieldset class="group-create-invitations">
    135135
    136         <div class="radio">
     136                <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend>
    137137
    138                 <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
     138                <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
    139139
    140                 <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
     140                <div class="radio">
    141141
    142                 <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
     142                        <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
    143143
    144         </div>
     144                        <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
    145145
    146         <hr />
     146                        <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
    147147
     148                </div>
     149
     150        </fieldset>
     151
    148152        <?php
    149153
    150154        /**