make sure qr code can be edited and entered manually
This commit is contained in:
@@ -450,6 +450,15 @@ function booking_form($node, &$form_state, $inserting = FALSE)
|
||||
'#required' => FALSE,
|
||||
'#default_value' => !empty($data->booking_barcode) ? $data->booking_barcode : ''
|
||||
);
|
||||
|
||||
$form['internal-details']['booking_qrcode_url'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Barcode'),
|
||||
'#maxlength' => 500,
|
||||
'#size' => 100,
|
||||
'#required' => FALSE,
|
||||
'#default_value' => !empty($data->booking_qrcode_url) ? $data->booking_qrcode_url : ''
|
||||
);
|
||||
|
||||
$form['internal-details']['booking_luckynum'] = array(
|
||||
'#type' => 'textfield',
|
||||
@@ -1318,6 +1327,7 @@ function booking_form_submit($form, &$form_state)
|
||||
|
||||
//fields that may or may not have been present in the initial form
|
||||
$node->booking_barcode = empty($values['booking_barcode']) ? '' : $values['booking_barcode'];
|
||||
$node->booking_qrcode_url = empty($values['booking_qrcode_url']) ? '' : $values['booking_qrcode_url'];
|
||||
$node->booking_luckynum = empty($values['booking_luckynum']) ? 0 : $values['booking_luckynum'];
|
||||
$node->booking_random_facts = empty($values['booking_random_facts']) ? '' : $values['booking_random_facts'];
|
||||
$node->booking_welfare_required = empty($values['booking_welfare_required']) ? 'N' : ($values['booking_welfare_required'] == 1 ? 'Y' : 'N');
|
||||
|
Reference in New Issue
Block a user