summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrooby2012-10-06 23:16:20 (GMT)
committer Daniel Wehner2012-10-06 23:16:20 (GMT)
commita51499b8d54078bb3042dbf4f0ad8a3189ee16ef (patch)
tree1c677b287208d8eb6e130f0df46e8ed1e34abcc7
parentaf583923999e9e7cdcf4077fc9d41c1f9e00273e (diff)
Issue #1507854 by rooby, mgifford: Added the ability to have a label for jump menu selector fields.
-rw-r--r--plugins/views_plugin_style_jump_menu.inc9
-rw-r--r--plugins/views_plugin_style_summary_jump_menu.inc9
2 files changed, 18 insertions, 0 deletions
diff --git a/plugins/views_plugin_style_jump_menu.inc b/plugins/views_plugin_style_jump_menu.inc
index f571f62..a07567c 100644
--- a/plugins/views_plugin_style_jump_menu.inc
+++ b/plugins/views_plugin_style_jump_menu.inc
@@ -17,6 +17,7 @@ class views_plugin_style_jump_menu extends views_plugin_style {
$options['hide'] = array('default' => FALSE, 'bool' => TRUE);
$options['path'] = array('default' => '');
$options['text'] = array('default' => 'Go', 'translatable' => TRUE);
+ $options['label'] = array('default' => '', 'translatable' => TRUE);
$options['choose'] = array('default' => '- Choose -', 'translatable' => TRUE);
$options['default_value'] = array('default' => FALSE, 'bool' => TRUE);
@@ -68,6 +69,13 @@ class views_plugin_style_jump_menu extends views_plugin_style {
'#default_value' => $this->options['text'],
);
+ $form['label'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Selector label'),
+ '#default_value' => $this->options['label'],
+ '#description' => t('The text that will appear as the the label of the selector element. If blank no label tag will be used.'),
+ );
+
$form['choose'] = array(
'#type' => 'textfield',
'#title' => t('Choose text'),
@@ -135,6 +143,7 @@ class views_plugin_style_jump_menu extends views_plugin_style {
$settings = array(
'hide' => $this->options['hide'],
'button' => $this->options['text'],
+ 'title' => $this->options['label'],
'choose' => $this->options['choose'],
'default_value' => $default_value,
);
diff --git a/plugins/views_plugin_style_summary_jump_menu.inc b/plugins/views_plugin_style_summary_jump_menu.inc
index 5b02163..d5100df 100644
--- a/plugins/views_plugin_style_summary_jump_menu.inc
+++ b/plugins/views_plugin_style_summary_jump_menu.inc
@@ -18,6 +18,7 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
$options['count'] = array('default' => TRUE, 'bool' => TRUE);
$options['hide'] = array('default' => FALSE, 'bool' => TRUE);
$options['text'] = array('default' => 'Go', 'translatable' => TRUE);
+ $options['label'] = array('default' => '', 'translatable' => TRUE);
$options['choose'] = array('default' => '- Choose -', 'translatable' => TRUE);
$options['default_value'] = array('default' => FALSE, 'bool' => TRUE);
@@ -63,6 +64,13 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
'#default_value' => $this->options['text'],
);
+ $form['label'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Selector label'),
+ '#default_value' => $this->options['label'],
+ '#description' => t('The text that will appear as the the label of the selector element. If blank no label tag will be used.'),
+ );
+
$form['choose'] = array(
'#type' => 'textfield',
'#title' => t('Choose text'),
@@ -119,6 +127,7 @@ class views_plugin_style_summary_jump_menu extends views_plugin_style {
$settings = array(
'hide' => $this->options['hide'],
'button' => $this->options['text'],
+ 'title' => $this->options['label'],
'choose' => $this->options['choose'],
'default_value' => $default_value,
);