Commit 8f0f68be authored by Jono Mingard's avatar Jono Mingard
Browse files

Added labels to search and filter forms (Bug #1271301)



Using hidden labels when appropriate so the appearance is not modified.
Please see bug report for a list of affected pages.

Change-Id: Id1c1078acc741f219990708b2f99f80ae6818a7e
Signed-off-by: default avatarJono Mingard <jonom@catalyst.net.nz>
parent 58e61e35
......@@ -32,9 +32,13 @@ else { // all or some other text
}
$elements = array();
$elements['query'] = array(
'title' => get_string('search'),
'hiddenlabel' => true,
'type' => 'text',
'defaultvalue' => $query);
$elements['filter'] = array(
'title' => get_string('filter'),
'hiddenlabel' => true,
'type' => 'select',
'options' => array(
'canjoin' => get_string('groupsicanjoin', 'group'),
......@@ -50,6 +54,8 @@ if (get_config('allowgroupcategories')
$options[-1] = get_string('categoryunassigned', 'group');
$options += $groupcategories;
$elements['groupcategory'] = array(
'title' => get_string('groupcategory', 'group'),
'hiddenlabel' => true,
'type' => 'select',
'options' => $options,
'defaultvalue' => $groupcategory,
......
......@@ -111,6 +111,7 @@ $searchform = pieform(array(
'value' => $setlimit
),
'query' => array(
'title' => get_string('search') . ': ',
'type' => 'text',
'defaultvalue' => $query
),
......
......@@ -28,6 +28,8 @@ $offset = (int)($offset / $groupsperpage) * $groupsperpage;
$results = group_get_associated_groups($USER->get('id'), $filter, $groupsperpage, $offset, $groupcategory);
$elements = array();
$elements['options'] = array(
'title' => get_string('filter'),
'hiddenlabel' => true,
'type' => 'select',
'options' => array(
'all' => get_string('allmygroups', 'group'),
......@@ -43,6 +45,8 @@ if (get_config('allowgroupcategories')
$options[-1] = get_string('categoryunassigned', 'group');
$options += $groupcategories;
$elements['groupcategory'] = array(
'title' => get_string('groupcategory', 'group'),
'hiddenlabel' => true,
'type' => 'select',
'options' => $options,
'defaultvalue' => $groupcategory,
......
......@@ -3505,6 +3505,8 @@ class View {
'defaultvalue' => $searchdefault,
),
'type' => array(
'title' => get_string('searchwithin'),
'hiddenlabel' => true,
'type' => 'select',
'options' => $searchoptions,
'defaultvalue' => $searchtype,
......
......@@ -39,6 +39,8 @@ $form = pieform(array(
'renderer' => 'oneline',
'elements' => array(
'options' => array(
'title' => get_string('filter'),
'hiddenlabel' => true,
'type' => 'select',
'options' => array(
'all' => get_string('allskins', 'skin'),
......
......@@ -2,7 +2,7 @@
<div id="notifications">
<form method="post">
<label>{str section='activity' tag='type'}:</label>
<label for="notifications_type">{str section='activity' tag='type'}:</label>
<select id="notifications_type" name="type">
<option value="all">--</option>
{foreach from=$options item=name key=t}
......
......@@ -13,7 +13,7 @@
{/foreach}
</div>
{/if}
<label>{str tag=search}:</label> {$form|safe}
{$form|safe}
</div>
<div class="cb"></div>
{if $membershiptype}<h2>{str tag=pendingmembers section=group}</h2>{/if}
......
......@@ -69,6 +69,8 @@ if ($USER->get('institutions')) {
}
$searchform['elements']['query'] = array(
'title' => get_string('search'),
'hiddenlabel' => true,
'type' => 'text',
'defaultvalue' => $query,
);
......
......@@ -43,6 +43,8 @@ $filterform = pieform(array(
'renderer' => 'oneline',
'elements' => array(
'filter' => array(
'title' => get_string('filter'),
'hiddenlabel' => true,
'type' => 'select',
'options' => array(
'all' => get_string('allfriends', 'group'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment