updated webform, webform_localization, profile2, term_merge, search_api_saved_pages, rules, redirect, overide_node_options

This commit is contained in:
2019-05-13 18:47:27 +02:00
parent 58cd990c8c
commit 9adc940a67
281 changed files with 28658 additions and 7138 deletions

View File

@@ -58,6 +58,17 @@ function profile2_type_form($form, &$form_state, $profile_type, $op = 'edit') {
'#default_value' => !empty($profile_type->data['registration']),
);
$user_roles = user_roles();
// Exclude anonymous user role.
unset($user_roles[DRUPAL_ANONYMOUS_RID]);
$form['data']['roles'] = array(
'#type' => 'checkboxes',
'#title' => t('Roles'),
'#description' => t('Check user roles that should have this profile.'),
'#options' => $user_roles,
'#default_value' => !empty($profile_type->data['roles']) ? $profile_type->data['roles'] : array_keys($user_roles)
);
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(
'#type' => 'submit',
@@ -88,6 +99,7 @@ function profile2_type_form($form, &$form_state, $profile_type, $op = 'edit') {
* Form API submit callback for the type form.
*/
function profile2_type_form_submit(&$form, &$form_state) {
$form_state['values']['data']['roles'] = array_filter($form_state['values']['data']['roles']);
$profile_type = entity_ui_form_submit_build_entity($form, $form_state);
// Save and go back.
$profile_type->save();