function uc_order_view_update_form in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_order/uc_order.order_pane.inc \uc_order_view_update_form()
- 7.3 uc_order/uc_order.order_pane.inc \uc_order_view_update_form()
3 string references to 'uc_order_view_update_form'
- uc_notify_form_alter in uc_notify/
uc_notify.module - Implementation of hook_form_alter().
- uc_order_pane_update in uc_order/
uc_order_order_pane.inc - Handle the "Update" order pane.
- uc_recurring_form_alter in payment/
uc_recurring/ uc_recurring.module - Implementation of hook_form_alter().
File
- uc_order/
uc_order_order_pane.inc, line 575 - This file contains the callbacks for the default order panes supplied with Ubercart and their corresponding helper functions.
Code
function uc_order_view_update_form($order) {
$form['order_comment_field'] = array(
'#type' => 'fieldset',
'#title' => t('Add an order comment'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['order_comment_field']['order_comment'] = array(
'#type' => 'textarea',
'#description' => t('Order comments are used primarily to communicate with the customer.'),
);
$form['admin_comment_field'] = array(
'#type' => 'fieldset',
'#title' => t('Add an admin comment'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['admin_comment_field']['admin_comment'] = array(
'#type' => 'textarea',
'#description' => t('Admin comments are only seen by store administrators.'),
);
$form['current_status'] = array(
'#type' => 'hidden',
'#value' => $order->order_status,
);
$form['order_id'] = array(
'#type' => 'hidden',
'#value' => $order->order_id,
);
$form['controls'] = array(
'#theme' => 'uc_order_view_update_controls',
'#weight' => 10,
);
foreach (uc_order_status_list('general') as $status) {
$options[$status['id']] = $status['title'];
}
foreach (uc_order_status_list('specific') as $status) {
$options[$status['id']] = $status['title'];
}
$form['controls']['status'] = array(
'#type' => 'select',
'#title' => t('Order status'),
'#default_value' => $order->order_status,
'#options' => $options,
'#attributes' => array(
'style' => 'display: inline;',
),
'#weight' => -10,
);
$form['controls']['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
'#weight' => 10,
);
return $form;
}