function role_expire_rules_action_set_role_expire_form in Role Expire 6
Action: Add expire time to role form configuration.
File
- ./
role_expire.rules.inc, line 51 - Rules integration for the role expire module.
Code
function role_expire_rules_action_set_role_expire_form($settings = array(), &$form) {
$settings += array(
'rid' => '',
'timestamp' => '',
);
// The role ID.
$form['settings']['rid'] = _role_expire_get_rids($settings);
//The timestamp.
$form['settings']['timestamp'] = array(
'#type' => 'textfield',
'#title' => t('Expiration time'),
'#required' => TRUE,
'#description' => t('Enter the time the role will expire. Enter date and time in format: <em>dd-mm-yyyy hh:mm:ss</em> or use relative time i.e. now, 1 day, 2 months, 1 year, 3 years.'),
'#default_value' => $settings['timestamp'],
);
}