|
@@ -330,7 +330,7 @@ function tripal_core_search_block($form, $form_state) {
|
|
|
'#type' => 'textfield',
|
|
|
'#size' => 15,
|
|
|
'#maxlength' => 128,
|
|
|
- '#attributes' =>array('placeholder' => t('Keywords'))
|
|
|
+ '#attributes' =>array('placeholder' => t(variable_get('tripal_search_placeholder', 'Keywords')))
|
|
|
);
|
|
|
|
|
|
$form['wrapper']['submit'] = array(
|
|
@@ -340,6 +340,13 @@ function tripal_core_search_block($form, $form_state) {
|
|
|
'#suffix' => '</div>'
|
|
|
);
|
|
|
|
|
|
+ $form['search_placeholder'] = array(
|
|
|
+ '#type' => 'textfield',
|
|
|
+ '#title' => 'Placeholder Text',
|
|
|
+ '#description' => 'Change the text that shows up within the search box until the user enters any of their own text.',
|
|
|
+ '#default_value' => variable_get('tripal_search_placeholder', 'Keywords'),
|
|
|
+ );
|
|
|
+
|
|
|
return $form;
|
|
|
}
|
|
|
|
|
@@ -387,4 +394,7 @@ function tripal_core_block_save($delta = '', $edit = array()) {
|
|
|
if (!empty($edit['search_url'])) {
|
|
|
variable_set('tripal_search_block_url', $edit['search_url']);
|
|
|
}
|
|
|
+ if (!empty($edit['search_placeholder'])) {
|
|
|
+ variable_set('tripal_search_placeholder', $edit['search_placeholder']);
|
|
|
+ }
|
|
|
}
|