Skip to:
Content

BuddyPress.org

Changeset 7202


Ignore:
Timestamp:
06/10/2013 02:55:09 PM (13 years ago)
Author:
boonebgorges
Message:

Removes more redundant markup from bp-legacy members/single/settings/ templates

Fixes #5045 again

Props hnla

Location:
trunk/bp-templates/bp-legacy/buddypress/members/single
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/buddypress/members/single/home.php

    r6284 r7202  
    2121        </div><!-- #item-nav -->
    2222
    23         <div id="item-body">
     23        <div id="item-body" role="main">
    2424
    2525                <?php do_action( 'bp_before_member_body' );
  • trunk/bp-templates/bp-legacy/buddypress/members/single/settings/capabilities.php

    r7199 r7202  
    11<?php do_action( 'bp_before_member_settings_template' ); ?>
    22
    3 <div id="item-body" role="main">
     3<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/'; ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post">
    44
    5         <?php do_action( 'bp_before_member_body' ); ?>
     5        <?php do_action( 'bp_members_capabilities_account_before_submit' ); ?>
    66
    7         <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/'; ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post">
     7        <label>
     8                <input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> />
     9                 <?php _e( 'This user is a spammer.', 'buddypress' ); ?>
     10        </label>
    811
    9                 <?php do_action( 'bp_members_capabilities_account_before_submit' ); ?>
     12        <div class="submit">
     13                <input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" id="capabilities-submit" name="capabilities-submit" />
     14        </div>
    1015
    11                 <label>
    12                         <input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> />
    13                          <?php _e( 'This user is a spammer.', 'buddypress' ); ?>
    14                 </label>
     16        <?php do_action( 'bp_members_capabilities_account_after_submit' ); ?>
    1517
    16                 <div class="submit">
    17                         <input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" id="capabilities-submit" name="capabilities-submit" />
    18                 </div>
     18        <?php wp_nonce_field( 'capabilities' ); ?>
    1919
    20                 <?php do_action( 'bp_members_capabilities_account_after_submit' ); ?>
    21 
    22                 <?php wp_nonce_field( 'capabilities' ); ?>
    23 
    24         </form>
    25 
    26         <?php do_action( 'bp_after_member_body' ); ?>
    27 
    28 </div><!-- #item-body -->
     20</form>
    2921
    3022<?php do_action( 'bp_after_member_settings_template' ); ?>
  • trunk/bp-templates/bp-legacy/buddypress/members/single/settings/delete-account.php

    r7199 r7202  
    11<?php do_action( 'bp_before_member_settings_template' ); ?>
    22
    3 <div id="item-body" role="main">
     3<div id="message" class="info">
    44
    5         <?php do_action( 'bp_before_member_body' ); ?>
     5        <?php if ( bp_is_my_profile() ) : ?>
    66
    7         <div id="message" class="info">
     7                <p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
    88
    9                 <?php if ( bp_is_my_profile() ) : ?>
     9        <?php else : ?>
    1010
    11                         <p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
     11                <p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
    1212
    13                 <?php else : ?>
     13        <?php endif; ?>
    1414
    15                         <p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
     15</div>
    1616
    17                 <?php endif; ?>
     17<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post">
    1818
     19        <?php do_action( 'bp_members_delete_account_before_submit' ); ?>
     20
     21        <label>
     22                <input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" />
     23                 <?php _e( 'I understand the consequences.', 'buddypress' ); ?>
     24        </label>
     25
     26        <div class="submit">
     27                <input type="submit" disabled="disabled" value="<?php _e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" />
    1928        </div>
    2029
    21         <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post">
     30        <?php do_action( 'bp_members_delete_account_after_submit' ); ?>
    2231
    23                 <?php do_action( 'bp_members_delete_account_before_submit' ); ?>
     32        <?php wp_nonce_field( 'delete-account' ); ?>
    2433
    25                 <label>
    26                         <input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" />
    27                          <?php _e( 'I understand the consequences.', 'buddypress' ); ?>
    28                 </label>
    29 
    30                 <div class="submit">
    31                         <input type="submit" disabled="disabled" value="<?php _e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" />
    32                 </div>
    33 
    34                 <?php do_action( 'bp_members_delete_account_after_submit' ); ?>
    35 
    36                 <?php wp_nonce_field( 'delete-account' ); ?>
    37 
    38         </form>
    39 
    40         <?php do_action( 'bp_after_member_body' ); ?>
    41 
    42 </div><!-- #item-body -->
     34</form>
    4335
    4436<?php do_action( 'bp_after_member_settings_template' ); ?>
  • trunk/bp-templates/bp-legacy/buddypress/members/single/settings/general.php

    r7199 r7202  
    11<?php do_action( 'bp_before_member_settings_template' ); ?>
    22
    3 <div id="item-body" role="main">
     3<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/general'; ?>" method="post" class="standard-form" id="settings-form">
    44
    5         <?php do_action( 'bp_before_member_body' ); ?>
     5        <?php if ( !is_super_admin() ) : ?>
    66
    7         <?php do_action( 'bp_template_content' ); ?>
     7                <label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
     8                <input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo wp_lostpassword_url(); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
    89
    9         <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/general'; ?>" method="post" class="standard-form" id="settings-form">
     10        <?php endif; ?>
    1011
    11                 <?php if ( !is_super_admin() ) : ?>
     12        <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
     13        <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />
    1214
    13                         <label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
    14                         <input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo wp_lostpassword_url(); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
     15        <label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label>
     16        <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'New Password', 'buddypress' ); ?><br />
     17        <input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'Repeat New Password', 'buddypress' ); ?>
    1518
    16                 <?php endif; ?>
     19        <?php do_action( 'bp_core_general_settings_before_submit' ); ?>
    1720
    18                 <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
    19                 <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />
     21        <div class="submit">
     22                <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
     23        </div>
    2024
    21                 <label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label>
    22                 <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'New Password', 'buddypress' ); ?><br />
    23                 <input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'Repeat New Password', 'buddypress' ); ?>
     25        <?php do_action( 'bp_core_general_settings_after_submit' ); ?>
    2426
    25                 <?php do_action( 'bp_core_general_settings_before_submit' ); ?>
     27        <?php wp_nonce_field( 'bp_settings_general' ); ?>
    2628
    27                 <div class="submit">
    28                         <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
    29                 </div>
    30 
    31                 <?php do_action( 'bp_core_general_settings_after_submit' ); ?>
    32 
    33                 <?php wp_nonce_field( 'bp_settings_general' ); ?>
    34 
    35         </form>
    36 
    37         <?php do_action( 'bp_after_member_body' ); ?>
    38 
    39 </div><!-- #item-body -->
     29</form>
    4030
    4131<?php do_action( 'bp_after_member_settings_template' ); ?>
  • trunk/bp-templates/bp-legacy/buddypress/members/single/settings/notifications.php

    r7199 r7202  
    11<?php do_action( 'bp_before_member_settings_template' ); ?>
    22
    3 <div id="item-body" role="main">
     3<form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications'; ?>" method="post" class="standard-form" id="settings-form">
     4        <p><?php _e( 'Send a notification by email when:', 'buddypress' ); ?></p>
    45
    5         <?php do_action( 'bp_before_member_body' ); ?>
     6        <?php do_action( 'bp_notification_settings' ); ?>
    67
    7         <?php do_action( 'bp_template_content' ); ?>
     8        <?php do_action( 'bp_members_notification_settings_before_submit' ); ?>
    89
    9         <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications'; ?>" method="post" class="standard-form" id="settings-form">
    10                 <p><?php _e( 'Send a notification by email when:', 'buddypress' ); ?></p>
     10        <div class="submit">
     11                <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
     12        </div>
    1113
    12                 <?php do_action( 'bp_notification_settings' ); ?>
     14        <?php do_action( 'bp_members_notification_settings_after_submit' ); ?>
    1315
    14                 <?php do_action( 'bp_members_notification_settings_before_submit' ); ?>
     16        <?php wp_nonce_field('bp_settings_notifications' ); ?>
    1517
    16                 <div class="submit">
    17                         <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
    18                 </div>
    19 
    20                 <?php do_action( 'bp_members_notification_settings_after_submit' ); ?>
    21 
    22                 <?php wp_nonce_field('bp_settings_notifications' ); ?>
    23 
    24         </form>
    25 
    26         <?php do_action( 'bp_after_member_body' ); ?>
    27 
    28 </div><!-- #item-body -->
     18</form>
    2919
    3020<?php do_action( 'bp_after_member_settings_template' ); ?>
Note: See TracChangeset for help on using the changeset viewer.