function shorten_cs_edit in Shorten URLs 6
Same name and namespace in other branches
- 8.2 modules/shorten_cs/shorten_cs.admin.inc \shorten_cs_edit()
- 8 modules/shorten_cs/shorten_cs.admin.inc \shorten_cs_edit()
- 7.2 shorten_cs.admin.inc \shorten_cs_edit()
- 7 shorten_cs.admin.inc \shorten_cs_edit()
Builds the form to edit a custom service.
1 string reference to 'shorten_cs_edit'
- shorten_cs_menu in ./
shorten_cs.module - Implementation of hook_menu().
File
- ./
shorten_cs.admin.inc, line 125 - Provides the configuration page for Shorten URLs Custom Services.
Code
function shorten_cs_edit($form_state, $service) {
$form = shorten_cs_add_form($form_state);
foreach (array(
'name',
'url',
'type',
'tag',
) as $key) {
$form[$key]['#default_value'] = $service->{$key};
}
$form['sid'] = array(
'#type' => 'value',
'#value' => $service->sid,
);
$form['old_name'] = array(
'#type' => 'value',
'#value' => $service->name,
);
$form['#redirect'] = 'admin/settings/shorten/custom';
return $form;
}