function birthdays_sync_form in Birthdays 6
Same name in this branch
- 6 birthdays.admin.inc \birthdays_sync_form()
- 6 birthdays.sync.inc \birthdays_sync_form()
Same name and namespace in other branches
- 5 birthdays.module \birthdays_sync_form()
Implementation of hook_form().
1 string reference to 'birthdays_sync_form'
- birthdays_menu in ./
birthdays.module - Implementation of hook_menu().
File
- ./
birthdays.admin.inc, line 176 - All functions related to the birthdays adminstration
Code
function birthdays_sync_form() {
global $_birthdays_field;
if (!isset($_birthdays_field)) {
drupal_set_message(t('No date field has been selected as birthdays field. Please visit the <a href="@birthdays-settings">birthdays settings page</a>.', array(
'@birthdays-settings' => url('admin/settings/birthdays'),
)), 'warning');
return array();
}
$form['profile_fieldset'] = array(
'#type' => 'fieldset',
);
$form['profile_fieldset']['description'] = array(
'#type' => 'item',
'#title' => 'Profile to Birthdays',
'#value' => t("Fill the Birthdays module's table with data from the Profile module's table. This is needed when you install the Birthdays module, but already collected birthdays with the Profile module (e.g. for age verification, to show in the profile or after uninstalling the Birthdays module)."),
);
$form['profile_fieldset']['submit'] = array(
'#type' => 'submit',
'#value' => t('Copy Profile data to Birthdays module'),
'#submit' => array(
'birthdays_sync_profiles_to_birthdays',
),
);
$form['birthdays_fieldset'] = array(
'#type' => 'fieldset',
);
$form['birthdays_fieldset']['description'] = array(
'#type' => 'item',
'#title' => 'Birthdays to Profile',
'#value' => t("Fill the Profile module's table with data from the Birthdays module's table. You can use this if you completely reinstalled the Profile module while leaving the Birthdays module alone, or to copy the old data collected by a version of the Birthdays module which didn't use the Profile module (pre-5.x)."),
);
$form['birthdays_fieldset']['submit'] = array(
'#type' => 'submit',
'#value' => t('Copy Birthdays data to Profile module'),
'#submit' => array(
'birthdays_sync_birthdays_to_profiles',
),
);
return $form;
}