Closed (outdated)
Project:
Invite
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2012 at 00:04 UTC
Updated:
2 May 2020 at 00:21 UTC
Jump to comment: Most recent
I found out that block generated to create form to send invites is pretty poor. No Div's around items, so I added them like this and recommend that something like that is done
function invite_block_form($remaining_invites) {
global $user;
$form['#action'] = url('invite');
$form['invite'] = array(
'#value' => t('Recommend @site-name to:', array('@site-name' => variable_get('site_name', t('Drupal')))),
'#prefix' => '<div class="message">',
'#suffix' => '</div>',
);
$description = '';
if ($remaining_invites != INVITE_UNLIMITED) {
$description = format_plural($remaining_invites, '1 invite remaining', '@count invites remaining');
}
$form['email'] = array(
'#type' => 'textfield',
'#size' => 20,
'#maxlength' => 64,
'#description' => $description,
'#required' => TRUE,
'#prefix' => '<div class="email_field">',
'#suffix' => '</div>',
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Send invite'),
'#prefix' => '<div class="submit_button">',
'#suffix' => '</div>',
);
$form['link'] = array(
'#prefix' => '<div class="small"><small>',
'#value' => l(t('View your invites'), "user/$user->uid/invites"),
'#suffix' => '</small></div>',
'#access' => user_access('track invitations') && $user->uid,
);
return $form;
}
Comments
Comment #1
ryan osītis commented