You are here

function addthis_customize_form in AddThis 6.3

Form builder function for the Service Customization form.

1 string reference to 'addthis_customize_form'
addthis_menu in ./addthis.module
Implementation of hook_menu().

File

./addthis.admin.inc, line 308
Configuration settings for AddThis.

Code

function addthis_customize_form(&$form_state) {
  $form = array();
  $form['description'] = array(
    '#type' => 'markup',
    '#value' => t('<p>Use this form to define customized Toolbox items. You may override existing services codes or define new service codes.</p>') . t('<p>For more information, visit !url.</p>', array(
      '!url' => l('http://www.addthis.com/help/client-api#rendering-decoration', 'http://www.addthis.com/help/client-api#rendering-decoration'),
    )),
  );
  $definitions = variable_get('addthis_service_customizations', array());
  $form['addthis_service_customizations'] = array(
    '#tree' => TRUE,
  );
  foreach ($definitions as $def) {
    $form['addthis_service_customizations'][] = _addthis_customize_form_row($def);
  }

  // Add a form row for entering a new definition.
  $form['addthis_service_customizations'][] = _addthis_customize_form_row();
  return system_settings_form($form);
}