You are here

function uc_recurring_subscription_action_grant_og_form in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc \uc_recurring_subscription_action_grant_og_form()

Grant Organic Group CA form.

1 call to uc_recurring_subscription_action_grant_og_form()
uc_recurring_subscription_action_revoke_og_form in modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc
Revoke Organic Group CA form - same as the grant role form

File

modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc, line 403

Code

function uc_recurring_subscription_action_grant_og_form($form_state, $settings = array()) {
  drupal_add_css(drupal_get_path('module', 'uc_recurring_subscription') . '/uc_recurring_subscription.css');
  $form['group_option'] = array(
    '#type' => 'radios',
    '#title' => t('Where are the groups(s) defined?'),
    '#attributes' => array(
      'class' => 'ca-role-select-option',
    ),
    '#options' => array(
      'subscribe_grant_og' => t('Apply the groups set by the Subscription Manager on creation.'),
      'expire_grant_og' => t('Apply the groups set by the Subscription Manager on expiration.'),
      'expire_revoke_og' => t('Revoke the groups set by the Subscription Manager on expiration.'),
      'custom' => t('Custom selected groups (select from below)'),
    ),
    '#default_value' => $settings['group_option'],
  );
  $form += og_subscribe_user_action_form($settings);
  $form['groups']['#required'] = FALSE;
  $form['groups']['#description'] = t('Hold CTRL key and left mouse click to select multiple groups.');
  return $form;
}