| 259 |
db_query("UPDATE {tablemanager} SET name = '%s' WHERE tid = %d", $name, $name); |
db_query("UPDATE {tablemanager} SET name = '%s' WHERE tid = %d", $name, $name); |
| 260 |
} |
} |
| 261 |
drupal_set_message(t('Table has been created.')); |
drupal_set_message(t('Table has been created.')); |
| 262 |
watchdog('tablemanager', 'tablemanager: added table \'%table\'.', array('%table' => $sql->tid), WATCHDOG_NOTICE, l('view', "tablemanager/$sql->tid")); |
watchdog('tablemanager', 'tablemanager: added table \'%table\'.', array('%table' => $sql->tid), WATCHDOG_NOTICE, l('view', "tables/$sql->tid")); |
| 263 |
menu_rebuild(); |
menu_rebuild(); |
| 264 |
drupal_goto($storage['backpage']); |
drupal_goto($storage['backpage']); |
| 265 |
} // tablemanager_table_add_step_three |
} // tablemanager_table_add_step_three |
| 363 |
'#return_value' => "NULL", |
'#return_value' => "NULL", |
| 364 |
'#value' => is_null($sort) ? TRUE : FALSE, // sort wasn't set so reflect that here |
'#value' => is_null($sort) ? TRUE : FALSE, // sort wasn't set so reflect that here |
| 365 |
); |
); |
|
$form['#attributes'] = array('class' => 'confirmation'); |
|
|
$form['description'] = array('#value' => t('Changes are not permanent until after you click save.')); |
|
| 366 |
|
|
| 367 |
|
$form['description'] = array('#value' => t('Changes are not permanent until after you click save.')); |
| 368 |
$form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>'); |
$form['actions'] = array('#prefix' => '<div class="container-inline">', '#suffix' => '</div>'); |
| 369 |
$form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); |
$form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Save')); |
| 370 |
$form['actions']['cancel'] = array('#value' => l(t('Cancel'), 'admin/content/tablemanager')); |
$form['actions']['cancel'] = array('#value' => l(t('Cancel'), 'admin/content/tablemanager')); |
| 390 |
} // tablemanager_table_edit_submit |
} // tablemanager_table_edit_submit |
| 391 |
|
|
| 392 |
function theme_tablemanager_table_edit($form) { |
function theme_tablemanager_table_edit($form) { |
| 393 |
drupal_add_tabledrag('tablemanager-table-edit', 'order', 'sibling', 'header-weight'); |
drupal_add_tabledrag('tablemanager-table-edit', 'order', 'self', 'header-weight'); |
| 394 |
$header = array(t('Column Title'), t('Entry Type'), t('Required'), t('Sortable'), t('Default<br/>(sorting)'), t('Weight'), t('Operations')); |
$header = array(t('Column Title'), t('Entry Type'), t('Required'), t('Sortable'), t('Default<br/>(sorting)'), t('Weight'), t('Operations')); |
| 395 |
$output = drupal_render($form['name']); |
$output = drupal_render($form['name']); |
| 396 |
$output .= drupal_render($form['desc']); |
$output .= drupal_render($form['desc']); |