function views_bulk_operations_profile_action_form in Views Bulk Operations (VBO) 6.3
Same name and namespace in other branches
- 6 actions/profile.action.inc \views_bulk_operations_profile_action_form()
File
- ./
profile.action.inc, line 20
Code
function views_bulk_operations_profile_action_form($context) {
drupal_add_js(drupal_get_path('module', 'views_bulk_operations') . '/profile.action.js');
$form = array();
foreach (profile_categories() as $category) {
$form += profile_form_profile($context, NULL, $category['name']);
$fields = _profile_get_fields($category['name']);
while ($field = db_fetch_object($fields)) {
$form[$category['name']][$field->name]['#required'] = FALSE;
$form[$field->name . '_check'] = array(
'#type' => 'checkbox',
'#attributes' => array(
'class' => 'profile-action-toggler',
'onchange' => 'Drupal.vbo.profileAction.updateField(this, true)',
),
);
}
}
$form['#theme'] = 'views_bulk_operations_profile_action_form';
return $form;
}