You are here

function imagecache_ui_action_add_form in ImageCache 5.2

1 string reference to 'imagecache_ui_action_add_form'
imagecache_ui_menu in ./imagecache_ui.module

File

./imagecache_ui.module, line 484

Code

function imagecache_ui_action_add_form($presetid, $actionname) {
  $definition = imagecache_action_definition($actionname);
  $form = array(
    '#tree' => true,
  );
  $form['action'] = array(
    '#type' => 'value',
    '#value' => $actionname,
  );
  $form['presetid'] = array(
    '#type' => 'value',
    '#value' => $presetid,
  );
  $form['weight'] = array(
    '#type' => 'weight',
    '#title' => t('Weight'),
  );
  $form['data'] = call_user_func($actionname . '_form', $action['data']);
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Add Action'),
  );
  return $form;
}