You are here

function fb_admin_set_properties_form in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 7.3 fb.admin.inc \fb_admin_set_properties_form()
1 string reference to 'fb_admin_set_properties_form'
fb_menu in ./fb.module
Implements hook_menu().

File

./fb.admin.inc, line 218
Admin pages and forms for Drupal for Facebook.

Code

function fb_admin_set_properties_form(&$form_state, $fb_app) {
  $form['fba_id'] = array(
    '#type' => 'value',
    '#value' => $fb_app->fba_id,
  );
  $props = fb_invoke(FB_ADMIN_OP_SET_PROPERTIES, array(
    'fb_app' => $fb_app,
  ), array(), FB_ADMIN_HOOK);
  $form['#fb_props'] = $props;
  $form['desc'] = array(
    '#type' => 'markup',
    '#value' => t('This will attempt to set the following application properties on facebook.com.'),
    '#prefix' => '<p>',
    '#suffix' => '</p>',
  );

  // @TODO - beautify display of properties.
  $form['props'] = array(
    '#type' => 'markup',
    '#value' => print_r($props, 1),
    '#prefix' => '<pre>',
    '#suffix' => '</pre>',
  );
  $form['desc2'] = array(
    '#type' => 'markup',
    '#value' => t('Syncing will also update local settings with values learned from facebook (i.e. if you have changed your canvas page).'),
    '#prefix' => '<p>',
    '#suffix' => '</p>',
  );
  return confirm_form($form, t('Are you sure you set properties for %title?', array(
    '%title' => $fb_app->title,
  )), isset($_GET['destination']) ? $_GET['destination'] : FB_PATH_ADMIN_APPS . '/' . $fb_app->label, t('This action cannot be undone.'), t('Sync Properties'), t('Cancel'));
}