Changeset 3810 for trunk/bp-themes/bp-default/groups/create.php
- Timestamp:
- 01/22/2011 10:13:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/groups/create.php
r3771 r3810 1 <?php get_header() ?> 1 <?php 2 3 /** 4 * BuddyPress - Create Group 5 * 6 * @package BuddyPress 7 * @subpackage bp-default 8 */ 9 10 ?> 11 12 <?php get_header(); ?> 2 13 3 14 <div id="content"> 4 15 <div class="padder"> 5 16 6 <form action="<?php bp_group_creation_form_action() ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data">7 <h3><?php _e( 'Create a Group', 'buddypress' ) ?> <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/' ?>"><?php _e( 'Groups Directory', 'buddypress' )?></a></h3>8 9 <?php do_action( 'bp_before_create_group' ) ?>17 <form action="<?php bp_group_creation_form_action(); ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data"> 18 <h3><?php _e( 'Create a Group', 'buddypress' ); ?> <a class="button" href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ); ?>"><?php _e( 'Groups Directory', 'buddypress' ); ?></a></h3> 19 20 <?php do_action( 'bp_before_create_group' ); ?> 10 21 11 22 <div class="item-list-tabs no-ajax" id="group-create-tabs" role="navigation"> 12 23 <ul> 24 13 25 <?php bp_group_creation_tabs(); ?> 26 14 27 </ul> 15 28 </div> 16 29 17 <?php do_action( 'template_notices' ) ?>30 <?php do_action( 'template_notices' ); ?> 18 31 19 32 <div class="item-body" id="group-create-body"> … … 24 37 <?php do_action( 'bp_before_group_details_creation_step' ); ?> 25 38 26 <label for="group-name"><?php _e('* Group Name', 'buddypress') ?> <?php _e( '(required)', 'buddypress' )?></label> 27 <input type="text" name="group-name" id="group-name" value="<?php bp_new_group_name() ?>" /> 28 29 <label for="group-desc"><?php _e('* Group Description', 'buddypress') ?> <?php _e( '(required)', 'buddypress' )?></label> 30 <textarea name="group-desc" id="group-desc"><?php bp_new_group_description() ?></textarea> 31 32 <?php do_action( 'bp_after_group_details_creation_step' ); /* Deprecated -> */ do_action( 'groups_custom_group_fields_editable' ); ?> 33 34 <?php wp_nonce_field( 'groups_create_save_group-details' ) ?> 39 <label for="group-name"><?php _e('* Group Name', 'buddypress'); ?> <?php _e( '(required)', 'buddypress' ); ?></label> 40 <input type="text" name="group-name" id="group-name" value="<?php bp_new_group_name(); ?>" /> 41 42 <label for="group-desc"><?php _e('* Group Description', 'buddypress') ?> <?php _e( '(required)', 'buddypress' ); ?></label> 43 <textarea name="group-desc" id="group-desc"><?php bp_new_group_description(); ?></textarea> 44 45 <?php 46 do_action( 'bp_after_group_details_creation_step' ); 47 do_action( 'groups_custom_group_fields_editable' ); // @Deprecated 48 49 wp_nonce_field( 'groups_create_save_group-details' ); ?> 35 50 36 51 <?php endif; ?> … … 43 58 <?php if ( bp_is_active( 'forums' ) ) : ?> 44 59 <?php if ( bp_forums_is_installed_correctly() ) : ?> 60 45 61 <div class="checkbox"> 46 <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php if ( bp_get_new_group_enable_forum() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable discussion forum', 'buddypress')?></label>62 <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php checked( bp_get_new_group_enable_forum(), true, true ); ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ); ?></label> 47 63 </div> 64 48 65 <?php else : ?> 49 66 <?php if ( is_super_admin() ) : ?> 67 50 68 <div class="checkbox"> 51 <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __( '<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' )?></label>69 <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __( '<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ); ?></label> 52 70 </div> 71 53 72 <?php endif; ?> 54 73 <?php endif; ?> … … 61 80 <div class="radio"> 62 81 <label><input type="radio" name="group-status" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> 63 <strong><?php _e( 'This is a public group', 'buddypress' ) ?></strong>82 <strong><?php _e( 'This is a public group', 'buddypress' ); ?></strong> 64 83 <ul> 65 <li><?php _e( 'Any site member can join this group.', 'buddypress' ) ?></li>66 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li>67 <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ) ?></li>84 <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li> 85 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li> 86 <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li> 68 87 </ul> 69 88 </label> 70 89 71 90 <label><input type="radio" name="group-status" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> 72 <strong><?php _e( 'This is a private group', 'buddypress' ) ?></strong>91 <strong><?php _e( 'This is a private group', 'buddypress' ); ?></strong> 73 92 <ul> 74 <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ) ?></li>75 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li>76 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li>93 <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li> 94 <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li> 95 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li> 77 96 </ul> 78 97 </label> 79 98 80 99 <label><input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> 81 <strong><?php _e('This is a hidden group', 'buddypress') ?></strong>100 <strong><?php _e('This is a hidden group', 'buddypress'); ?></strong> 82 101 <ul> 83 <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ) ?></li>84 <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ) ?></li>85 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li>102 <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li> 103 <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li> 104 <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li> 86 105 </ul> 87 106 </label> … … 90 109 <?php do_action( 'bp_after_group_settings_creation_step' ); ?> 91 110 92 <?php wp_nonce_field( 'groups_create_save_group-settings' ) ?>111 <?php wp_nonce_field( 'groups_create_save_group-settings' ); ?> 93 112 94 113 <?php endif; ?> … … 102 121 103 122 <div class="left-menu"> 104 <?php bp_new_group_avatar() ?> 123 124 <?php bp_new_group_avatar(); ?> 125 105 126 </div><!-- .left-menu --> 106 127 107 128 <div class="main-column"> 108 <p><?php _e( "Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.", 'buddypress')?></p>129 <p><?php _e( "Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.", 'buddypress' ); ?></p> 109 130 110 131 <p> 111 132 <input type="file" name="file" id="file" /> 112 <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" />133 <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ); ?>" /> 113 134 <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> 114 135 </p> 115 136 116 <p><?php _e( 'To skip the avatar upload process, hit the "Next Step" button.', 'buddypress' ) ?></p>137 <p><?php _e( 'To skip the avatar upload process, hit the "Next Step" button.', 'buddypress' ); ?></p> 117 138 </div><!-- .main-column --> 118 139 … … 121 142 <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> 122 143 123 <h3><?php _e( 'Crop Group Avatar', 'buddypress' ) ?></h3>124 125 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' )?>" />144 <h3><?php _e( 'Crop Group Avatar', 'buddypress' ); ?></h3> 145 146 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ); ?>" /> 126 147 127 148 <div id="avatar-crop-pane"> 128 <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' )?>" />149 <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ); ?>" /> 129 150 </div> 130 151 131 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" />132 133 <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" />152 <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ); ?>" /> 153 154 <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" /> 134 155 <input type="hidden" name="upload" id="upload" /> 135 156 <input type="hidden" id="x" name="x" /> … … 142 163 <?php do_action( 'bp_after_group_avatar_creation_step' ); ?> 143 164 144 <?php wp_nonce_field( 'groups_create_save_group-avatar' ) ?>165 <?php wp_nonce_field( 'groups_create_save_group-avatar' ); ?> 145 166 146 167 <?php endif; ?> … … 152 173 153 174 <?php if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> 175 154 176 <div class="left-menu"> 155 177 156 178 <div id="invite-list"> 157 179 <ul> 158 <?php bp_new_group_invite_friend_list() ?>180 <?php bp_new_group_invite_friend_list(); ?> 159 181 </ul> 160 182 161 <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ) ?>183 <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ); ?> 162 184 </div> 163 185 … … 172 194 <?php /* The ID 'friend-list' is important for AJAX support. */ ?> 173 195 <ul id="friend-list" class="item-list" role="main"> 196 174 197 <?php if ( bp_group_has_invites() ) : ?> 175 198 176 199 <?php while ( bp_group_invites() ) : bp_group_the_invite(); ?> 177 200 178 <li id="<?php bp_group_invite_item_id() ?>"> 179 <?php bp_group_invite_user_avatar() ?> 180 181 <h4><?php bp_group_invite_user_link() ?></h4> 182 <span class="activity"><?php bp_group_invite_user_last_active() ?></span> 201 <li id="<?php bp_group_invite_item_id(); ?>"> 202 203 <?php bp_group_invite_user_avatar(); ?> 204 205 <h4><?php bp_group_invite_user_link(); ?></h4> 206 <span class="activity"><?php bp_group_invite_user_last_active(); ?></span> 183 207 184 208 <div class="action"> 185 <a class="remove" href="<?php bp_group_invite_user_remove_invite_url() ?>" id="<?php bp_group_invite_item_id() ?>"><?php _e( 'Remove Invite', 'buddypress' )?></a>209 <a class="remove" href="<?php bp_group_invite_user_remove_invite_url(); ?>" id="<?php bp_group_invite_item_id(); ?>"><?php _e( 'Remove Invite', 'buddypress' ); ?></a> 186 210 </div> 187 211 </li> … … 189 213 <?php endwhile; ?> 190 214 191 <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ) ?> 215 <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ); ?> 216 192 217 <?php endif; ?> 218 193 219 </ul> 194 220 … … 203 229 <?php endif; ?> 204 230 205 <?php wp_nonce_field( 'groups_create_save_group-invites' ) ?> 231 <?php wp_nonce_field( 'groups_create_save_group-invites' ); ?> 232 206 233 <?php do_action( 'bp_after_group_invites_creation_step' ); ?> 207 234 208 235 <?php endif; ?> 209 236 210 <?php do_action( 'groups_custom_create_steps' ) // Allow plugins to add custom group creation steps ?>237 <?php do_action( 'groups_custom_create_steps' ); // Allow plugins to add custom group creation steps ?> 211 238 212 239 <?php do_action( 'bp_before_group_creation_step_buttons' ); ?> 213 240 214 241 <?php if ( 'crop-image' != bp_get_avatar_admin_step() ) : ?> 242 215 243 <div class="submit" id="previous-next"> 244 216 245 <?php /* Previous Button */ ?> 217 246 <?php if ( !bp_is_first_group_creation_step() ) : ?> 218 <input type="button" value="← <?php _e('Previous Step', 'buddypress') ?>" id="group-creation-previous" name="previous" onclick="location.href='<?php bp_group_creation_previous_link() ?>'" /> 247 248 <input type="button" value="← <?php _e( 'Previous Step', 'buddypress' ); ?>" id="group-creation-previous" name="previous" onclick="location.href='<?php bp_group_creation_previous_link(); ?>'" /> 249 219 250 <?php endif; ?> 220 251 221 252 <?php /* Next Button */ ?> 222 253 <?php if ( !bp_is_last_group_creation_step() && !bp_is_first_group_creation_step() ) : ?> 223 <input type="submit" value="<?php _e('Next Step', 'buddypress') ?> →" id="group-creation-next" name="save" /> 254 255 <input type="submit" value="<?php _e( 'Next Step', 'buddypress' ); ?> →" id="group-creation-next" name="save" /> 256 224 257 <?php endif;?> 225 258 226 259 <?php /* Create Button */ ?> 227 260 <?php if ( bp_is_first_group_creation_step() ) : ?> 228 <input type="submit" value="<?php _e('Create Group and Continue', 'buddypress') ?> →" id="group-creation-create" name="save" /> 261 262 <input type="submit" value="<?php _e( 'Create Group and Continue', 'buddypress' ); ?> →" id="group-creation-create" name="save" /> 263 229 264 <?php endif; ?> 230 265 231 266 <?php /* Finish Button */ ?> 232 267 <?php if ( bp_is_last_group_creation_step() ) : ?> 233 <input type="submit" value="<?php _e('Finish', 'buddypress') ?> →" id="group-creation-finish" name="save" /> 268 269 <input type="submit" value="<?php _e( 'Finish', 'buddypress' ); ?> →" id="group-creation-finish" name="save" /> 270 234 271 <?php endif; ?> 235 272 </div> 273 236 274 <?php endif;?> 237 275 … … 239 277 240 278 <?php /* Don't leave out this hidden field */ ?> 241 <input type="hidden" name="group_id" id="group_id" value="<?php bp_new_group_id() ?>" />242 243 <?php do_action( 'bp_directory_groups_content' ) ?>279 <input type="hidden" name="group_id" id="group_id" value="<?php bp_new_group_id(); ?>" /> 280 281 <?php do_action( 'bp_directory_groups_content' ); ?> 244 282 245 283 </div><!-- .item-body --> 246 284 247 <?php do_action( 'bp_after_create_group' ) ?>285 <?php do_action( 'bp_after_create_group' ); ?> 248 286 249 287 </form> … … 252 290 </div><!-- #content --> 253 291 254 <?php get_sidebar() ?> 255 256 <?php get_footer() ?> 292 <?php get_sidebar(); ?> 293 <?php get_footer(); ?>
Note: See TracChangeset
for help on using the changeset viewer.