store nav links from form
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
$header_links = json_decode(variable_get('booking_mailtemplate_header_links'), TRUE);
|
$header_links = json_decode(variable_get('booking_mailtemplate_header_links'), TRUE);
|
||||||
$social_links = json_decode(variable_get('booking_mailtemplate_social_links'), TRUE);
|
$social_links = json_decode(variable_get('booking_mailtemplate_social_links'), TRUE);
|
||||||
|
|
||||||
watchdog('booking_debug', "<pre>Mail template navigation links\n@info</pre>", array('@info' => print_r($header_links, true)));
|
watchdog('booking_debug', "<pre>Mail template navigation links loaded\n@info</pre>", array('@info' => print_r($header_links, true)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//query for existing header links
|
//query for existing header links
|
||||||
@@ -122,14 +122,14 @@
|
|||||||
'#title' => t('Display text for navigation header link ' . $i),
|
'#title' => t('Display text for navigation header link ' . $i),
|
||||||
'#size' => 150,
|
'#size' => 150,
|
||||||
'#maxlength' => 300,
|
'#maxlength' => 300,
|
||||||
'#default_value' => variable_get($header_link_text,'Link Title'),
|
'#default_value' => empty($header_links[$i]['text']) ? 'Link Title' : $header_links[$i]['text'],
|
||||||
);
|
);
|
||||||
$form['header-links'][$header_link_url] = array(
|
$form['header-links'][$header_link_url] = array(
|
||||||
'#type' => 'textfield',
|
'#type' => 'textfield',
|
||||||
'#title' => t('URL for navigation header link ' . $i),
|
'#title' => t('URL for navigation header link ' . $i),
|
||||||
'#size' => 150,
|
'#size' => 150,
|
||||||
'#maxlength' => 500,
|
'#maxlength' => 500,
|
||||||
'#default_value' => variable_get($header_link_url, $GLOBALS['base_url']),
|
'#default_value' => empty($header_links[$i]['link']) ? $GLOBALS['base_url'] : $header_links[$i]['link'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ function booking_mailtemplate_form_submit($form, &$form_state)
|
|||||||
watchdog('booking_debug', "<pre>Mail template navigation links\n@info</pre>", array('@info' => print_r($header_data, true)));
|
watchdog('booking_debug', "<pre>Mail template navigation links\n@info</pre>", array('@info' => print_r($header_data, true)));
|
||||||
|
|
||||||
variable_set('booking_mailtemplate_colors', json_encode($color_data));
|
variable_set('booking_mailtemplate_colors', json_encode($color_data));
|
||||||
//variable_set('booking_mailtemplate_header_links', json_encode($header_data));
|
variable_set('booking_mailtemplate_header_links', json_encode($header_data));
|
||||||
|
|
||||||
//update header links
|
//update header links
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user