// BROKEN ? $field_options['download'] = T_('Download files as ZIP archive...'); /* Not fully functional: $field_options['file_copy'] = T_('Copy the selected files...'); $field_options['file_move'] = T_('Move the selected files...'); // This is too geeky! Default perms radio options and unchecked radio groups! NO WAY! // If you want this feature to be usable by average users you must only have one line per file OR one file for all. You can't mix both. // The only way to have both is to have 2 spearate forms: 1 titled "change perms for all files simultaneously"-> submit and another 1 title "change perms for each file individually" -> another submit // fplanque>> second thought: changing perms for multiple files at once is useful. BUT assigning different perms to several files with ONE form is trying to solve a problem that not even geeks can face once in a lifetime. // This has to be simplified to ONE single set of permissions for all selected files. (If you need different perms, click again) $field_options['file_perms'] = T_('Change permissions for the selected files...'); */ $Form->switch_layout('none'); $Form->select_input_array('group_action', $action, $field_options, ' — <strong>' . T_('With selected files') . '</strong>'); $Form->submit_input(array('name' => 'actionArray[group_action]', 'value' => T_('Go!'), 'onclick' => 'return js_act_on_selected();')); $Form->switch_layout(NULL); /* fp> the following has been integrated into the select. if( $mode == 'upload' ) { // We are uploading in a popup opened by an edit screen ?> — <input class="ActionButton" title="<?php echo T_('Insert IMG or link tags for the selected files, directly into the post text'); ?>" name="actionArray[img_tag]" value="<?php echo T_('Insert IMG/link into post') ?>" type="submit" onclick="insert_tag_for_selected_files(); return false;" /> <?php } */
$Form->begin_form('fform'); $Form->add_crumb('comment'); $Form->hidden('ctrl', 'comments'); $Form->begin_fieldset(T_('Mass deleting')); $mass_type_value = 'delete'; $mass_types = array(); if (!$CommentList->is_trashfilter(false)) { // Don't display this option if trashed comments are also displayed $mass_types[] = array('value' => 'recycle', 'label' => T_('Move to Recycle bin')); $mass_type_value = 'recycle'; } $mass_types[] = array('value' => 'delete', 'label' => T_('Delete permanently')); $Form->labelstart = '<b>'; $Form->labelend = '</b>'; $Form->radio_input('mass_type', $mass_type_value, $mass_types, sprintf(T_('Are you sure you want to mass delete %s comments?'), $CommentList->total_rows), array('lines' => true)); $Form->submit_input(array('id' => 'mass_submit', 'name' => 'actionArray[mass_delete]', 'value' => $mass_type_value == 'recycle' ? T_('Recycle Now!') : T_('Delete Now!'), 'style' => 'margin-left:25%')); $Form->end_fieldset(); $Form->end_form(); ?> <script type="text/javascript"> jQuery( 'input[name=mass_type]' ).click( function() { if( jQuery( this ).val() == 'delete' ) { jQuery( '#mass_submit' ).val( '<?php echo TS_('Delete Now!'); ?> ' ); } else {
/** * Get form to quick users search * * @param array Params * @return string Form */ function get_user_quick_search_form($params = array()) { $params = array_merge(array('before' => '<div class="quick_search_form">', 'after' => '</div>', 'title' => T_('Quick search'), 'button' => T_('Find User')), $params); $r = $params['before']; $Form = new Form(); $Form->output = false; $Form->switch_layout('none'); $r .= $Form->begin_form(); $Form->hidden('ctrl', 'users'); $Form->add_crumb('user'); $r .= $Form->text_input('user_search', '', 15, $params['title'], '', array('maxlength' => 100)); $r .= $Form->submit_input(array('name' => 'actionArray[search]', 'value' => $params['button'])); $r .= $Form->end_form(); $r .= $params['after']; return $r; }
} $msgform_url = $User->get_msgform_url($Blog->get('msgformurl')); if (!empty($msgform_url)) { $msgform_url = url_add_param($msgform_url, 'msg_type=PM'); $contacts[] = action_icon(T_('Send a message'), 'email', $msgform_url, T_('Send a message'), 3, 4, array(), array('style' => 'margin: 2px')); } else { // No message form possibility to contact with User, get the reason why $contacts[] = $User->get_no_msgform_reason(); } $ProfileForm->info(T_('Contact'), implode('<div style="height:6px"> </div>', $contacts)); if ($is_logged_in && $current_User->check_status('can_edit_contacts') && $current_User->check_perm('perm_messaging', 'reply')) { // user is logged in, the account was activated and has the minimal messaging permission $ProfileForm->add_crumb('messaging_contacts'); $ProfileForm->hidden('user_ID', $User->ID); $ProfileForm->output = false; $button_add_group = $ProfileForm->submit_input(array('name' => 'actionArray[add_user]', 'value' => T_('Add'), 'class' => 'SaveButton')); $ProfileForm->output = true; if (!empty($contacts_groups)) { // Display contacts groups for current User $ProfileForm->custom_content('<p><strong>' . T_('You can organize your contacts into groups. You can decide in which groups to put this user here:') . '</strong></p>'); $ProfileForm->info(sprintf(T_('%s is'), $User->login), $contacts_groups); // Form to create a new group $ProfileForm->hidden('group_ID', 'new'); $ProfileForm->text_input('group_ID_combo', param('group_ID_combo', 'string', ''), 18, T_('Create a new group'), '', array('field_suffix' => $button_add_group, 'maxlength' => 50)); } else { if ($User->ID != $current_User->ID) { // Form to add this user into the group $ProfileForm->combo_box('group_ID', param('group_ID_combo', 'string', ''), get_contacts_groups_options(param('group', 'string', '-1'), false), T_('Add this user to a group'), array('new_field_size' => '8', 'field_suffix' => $button_add_group)); } } }