- add labels to checkboxes and radio boxes to make them easier to click
This commit is contained in:
ccooper%deadsquid.com 2008-01-11 22:19:21 +00:00
Родитель f0312de41b
Коммит 034d6d7256
13 изменённых файлов: 36 добавлений и 36 удалений

Просмотреть файл

@ -289,7 +289,7 @@ sub getTestResults($\@\@$) {
$from .= ", test_result_bugs trb";
$where .= " AND tr.testresult_id=trb.test_result_id";
} else {
$from =~ s/test_results tr,/test_results tr LEFT JOIN test_result_bugs trb ON (tr.testresult_id=trb.test_result_id),/;
$from =~ s/test_results tr([ ,])/test_results tr LEFT JOIN test_result_bugs trb ON (tr.testresult_id=trb.test_result_id)$1/;
$where .= " AND trb.bug_id IS NULL";
}
}
@ -326,7 +326,7 @@ sub getTestResults($\@\@$) {
} elsif ($criterion->{'field'} eq 'search_field') {
($from,$where) = &_processSearchField($criterion,$from,$where);
} elsif ($criterion->{'field'} eq 'has_comments') {
$from =~ s/^FROM test_results tr,/FROM test_results tr INNER JOIN test_result_comments trc ON tr.testresult_id=trc.test_result_id,/;
$from =~ s/test_results tr([ ,])/test_results tr INNER JOIN test_result_comments trc ON tr.testresult_id=trc.test_result_id$1/;
} elsif ($criterion->{'field'} eq 'test_run') {
# First check to make sure test run exists.
my $test_run = Litmus::DB::TestRun->retrieve($criterion->{'value'});
@ -408,7 +408,7 @@ sub _processSearchField(\%\$\$) {
$table_field='tr.build_id';
} elsif ($search_field->{'search_field'} eq 'comment') {
$table_field='trc.comment';
$from =~ s/^FROM test_results tr,/FROM test_results tr INNER JOIN test_result_comments trc ON tr.testresult_id=trc.test_result_id,/;
$from =~ s/^test_results tr([ ,])/test_results tr INNER JOIN test_result_comments trc ON tr.testresult_id=trc.test_result_id$1/;
} elsif ($search_field->{'search_field'} eq 'locale') {
$table_field='tr.locale_abbrev';
} elsif ($search_field->{'search_field'} eq 'opsys') {

Просмотреть файл

@ -63,13 +63,12 @@
</td>
</tr>
<tr>
<td class="headerleft">Enabled?</td>
<td class="headerleft"><label for="enabled">Enabled?</label></td>
<td>
<input name="enabled"
type="checkbox"
id="enabled"
value="1" disabled
onchange="if (this.checked == false) {document.getElementById('communityenabled').checked =false;}">
value="1" disabled>
</td>
<td>&lArr;&nbsp;Uncheck this to completely disable this subgroup.</td>
</tr>

Просмотреть файл

@ -82,7 +82,7 @@
<td>[% INCLUDE form_widgets/select_author.tmpl name="author_id" disabled=1 placeholder=1 display_id=1 %]
</tr>
<tr>
<td class="headerleft">Enabled?</td>
<td class="headerleft"><label for="enabled">Enabled?</label></td>
<td>
<input name="enabled"
type="checkbox"
@ -92,7 +92,7 @@
<td>&lArr;&nbsp;Uncheck this to completely disable this test run.</td>
</tr>
<tr>
<td class="headerleft">Recommended?</td>
<td class="headerleft"><label for="recommended">Recommended?</label></td>
<td>
<input name="recommended"
type="checkbox"

Просмотреть файл

@ -56,7 +56,7 @@
<td>[% INCLUDE form_widgets/select_branch_id.tmpl name="branch" placeholder=1 size=1 display_id=1 onchange="populateAllSubgroups();" %]</td>
</tr>
<tr>
<td class="headerleft">Enabled?</td>
<td class="headerleft"><label for="enabled">Enabled?</label></td>
<td>
<input name="enabled"
type="checkbox"

Просмотреть файл

@ -75,8 +75,8 @@ function checkFormContents(f) {
</tr>
[% IF show_admin %]
<tr>
<td class="headerleft">Enabled?</td>
<td><input name="enabled" type="checkbox" value="1"
<td class="headerleft"><label for="enabled">Enabled?</label></td>
<td><input id="enabled" name="enabled" type="checkbox" value="1"
[% IF user.enabled %] checked [% END %] /></td>
</tr>
[% END %]
@ -111,8 +111,8 @@ function checkFormContents(f) {
<table class="manage">
[% FOREACH group=groups %]
<tr>
<td><input name="group_[%group.id | html %]" type="checkbox" value="1" [% IF user.inGroup(group) %] checked [%END%]></td>
<td>[% group.name | html %]</td>
<td><input id="group_[%group.id | html %]" name="group_[%group.id | html %]" type="checkbox" value="1" [% IF user.inGroup(group) %] checked [%END%]></td>
<td><label for="group_[% group.id | html %]">[% group.name | html %]</label></td>
</tr>
[% END %]
</table>

Просмотреть файл

@ -33,8 +33,8 @@ And belonging to group(s):
[% FOREACH group=groups %]
[% id = group.group_id %]
<tr>
<td><input name="group_[%group.id | html %]" type="checkbox" value="1" [% IF checked.$id %] checked [%END%]></td>
<td>[% group.name | html %]</td>
<td><input id="group_[%group.id | html %]" name="group_[%group.id | html %]" type="checkbox" value="1" [% IF checked.$id %] checked [%END%]></td>
<td><label for="group_[%group.id | html %]">[% group.name | html %]</label></td>
</tr>
[% END %]
</table>

Просмотреть файл

@ -57,7 +57,7 @@
size="55"/ disabled></td>
</tr>
<tr>
<td class="headerleft">Enabled?</td>
<td class="headerleft"><label for="edit_branch_form_enabled">Enabled?</label></td>
<td><input name="edit_branch_form_enabled"
id="edit_branch_form_enabled"
type="checkbox"

Просмотреть файл

@ -54,7 +54,7 @@
size="55"/ disabled></td>
</tr>
<tr>
<td class="headerleft">Enabled?</td>
<td class="headerleft"><label for="edit_product_form_enabled">Enabled?</label></td>
<td><input name="edit_product_form_enabled"
id="edit_product_form_enabled"
type="checkbox"

Просмотреть файл

@ -1,29 +1,29 @@
<table class="radio-testresults">
<tr class="not-run">
<td><input type="radio" name="testresult_[% testcase_id | html %]"
id="testresult_[% testcase_id | html %]" value="0" checked="checked"/>
</td><td><label for="testresult_[% testcase_id | html %]">Not Run</label>
id="testresult_[% testcase_id | html %]_notrun" value="0" checked="checked"/>
</td><td><label for="testresult_[% testcase_id | html %]_notrun">Not Run</label>
</td>
</tr>
<tr class="pass">
<td><input type="radio" name="testresult_[% testcase_id | html %]"
id="testresult_[% testcase_id | html %]" value="1" />
</td><td><label for="testresult_[% testcase_id | html %]">Pass</label>
id="testresult_[% testcase_id | html %]_pass" value="1" />
</td><td><label for="testresult_[% testcase_id | html %]_pass">Pass</label>
</td>
</tr>
<tr class="fail">
<td><input type="radio" name="testresult_[% testcase_id | html %]"
id="testresult_[% testcase_id | html %]" value="2"/>
</td><td><labelfor="testresult_[% testcase_id | html %]">Fail</label>
id="testresult_[% testcase_id | html %]_fail" value="2"/>
</td><td><label for="testresult_[% testcase_id | html %]_fail">Fail</label>
</td>
</tr>
<tr class="unclear">
<td><input type="radio" name="testresult_[% testcase_id | html %]"
id="testresult_[% testcase_id | html %]" value="3" />
</td><td><label for="testresult_[% testcase_id | html %]">
id="testresult_[% testcase_id | html %]_unclear" value="3" />
</td><td><label for="testresult_[% testcase_id | html %]_unclear">
Test unclear/broken</label>
</td>
</tr>

Просмотреть файл

@ -3,6 +3,7 @@
id="[% name %]" name="[% name %]"
[% IF size %] size="[% size %]"[% END %]
[% IF onchange %] onchange="[% onchange %]"[% END %]
[% IF multiple %] multiple[% END %]
[% IF disabled %] disabled[% END %]>
[% IF placeholder %]<option value="">-Testgroup[% IF display_id %] (ID#)[% END %]-</option>[% END %]
[% IF testgroups %]

Просмотреть файл

@ -223,21 +223,21 @@ Use this to limit the number of results displayed.
<td class="heading">Limit to:</td>
<td><input type="text" name="limit" value="15" size="5" /> results per page</td>
<tr>
<td class="heading">Display only <em>my</em> test results?</td>
<td><input type="checkbox" name="my_results_only" /></td>
<td class="heading"><label for="my_results_only">Display only <em>my</em> test results?</label></td>
<td><input type="checkbox" name="my_results_only" id="my_results_only" /></td>
</tr>
</tr>
<tr>
<td class="heading">Display only results with comments?</td>
<td><input type="checkbox" name="has_comments" /></td>
<td class="heading"><label for="has_comments">Display only results with comments?</label></td>
<td><input type="checkbox" name="has_comments" id="has_comments" /></td>
</tr>
<tr>
<td class="heading">Display automated results?</td>
<td><input type="radio" id="automated" name="automated" value="1" />&nbsp;Automated Only <input type="radio" id="automated" name="automated" value="0E0" />&nbsp;Manual Only <input type="radio" id="automated" name="automated" value="all" checked />&nbsp;All</td>
<td><input type="radio" id="automated_only" name="automated" value="1" /><label for="automated_only">&nbsp;Automated Only</label> <input type="radio" id="manual_only" name="automated" value="0E0" /><label for="manual_only">&nbsp;Manual Only</label> <input type="radio" id="automated_all" name="automated" value="all" checked /><label for="automated_all">&nbsp;All</label></td>
</tr>
<tr>
<td class="heading">Associated bug(s)?</td>
<td><input type="radio" id="withbugs" name="withbugs" value="1" />&nbsp;With bug(s) <input type="radio" id="withbugs" name="withbugs" value="0E0" />&nbsp;No bug(s) <input type="radio" id="withbugs" name="withbugs" value="all" checked />&nbsp;All</td>
<td><input type="radio" id="withbugs_bugs" name="withbugs" value="1" /><label for="withbugs_bugs">&nbsp;With bug(s)</label> <input type="radio" id="withbugs_nobugs" name="withbugs" value="0E0" /><label for="withbugs_nobugs">&nbsp;No bug(s)</label> <input type="radio" id="withbugs_all" name="withbugs" value="all" checked /><label for="withbugs_all">&nbsp;All</label></td>
</tr>
</tr>
</table>
@ -264,15 +264,15 @@ Admin-specific limiting criteria go here. These criteria are not available to re
</tr>
<tr>
<td class="heading">&nbsp;&nbsp;From Trusted Sources:</td>
<td><input type="radio" id="trusted_only" name="trusted_only" value="1" />&nbsp;Trusted <input type="radio" id="trusted_only" name="trusted_only" value="0E0" />&nbsp;Untrusted <input type="radio" id="trusted_only" name="trusted_only" value="all" checked />&nbsp;All</td>
<td><input type="radio" id="trusted_only_trusted" name="trusted_only" value="1" /><label for="trusted_only_trusted">&nbsp;Trusted</label> <input type="radio" id="trusted_only_untrusted" name="trusted_only" value="0E0" /><label for="trusted_only_untrusted">&nbsp;Untrusted</label> <input type="radio" id="trusted_only_all" name="trusted_only" value="all" checked /><label for="trusted_only_all">&nbsp;All</label></td>
</tr>
<tr>
<td class="heading">&nbsp;&nbsp;By <a class='help' name="showVettingHelpText" onclick="toggleHelp(vettingHelpTitle,vettingHelpText);">Vetting Status: <img class="inline" src="images/info.png" alt="What is vetting?" /></a></td>
<td><input type="radio" id="vetted_only" name="vetted_only" value="1" />&nbsp;Vetted <input type="radio" id="vetted_only" name="vetted_only" value="0E0" />&nbsp;Not Vetted <input type="radio" id="vetted_only" name="vetted_only" value="all" checked />&nbsp;All</td>
<td><input type="radio" id="vetted_only_vetted" name="vetted_only" value="1" /><label for="vetted_only_vetted">&nbsp;Vetted</label> <input type="radio" id="vetted_only_notvetted" name="vetted_only" value="0E0" /><label for="vetted_only_notvetted">&nbsp;Not Vetted</label> <input type="radio" id="vetted_only_all" name="vetted_only" value="all" checked /><label for="vetted_only_all">&nbsp;All</label></td>
</tr>
<tr>
<td class="heading">&nbsp;&nbsp;By Validity:</td>
<td><input type="radio" id="valid_only" name="valid_only" value="1" checked />&nbsp;Valid <input type="radio" id="valid_only" name="valid_only" value="0E0" />&nbsp;Invalid <input type="radio" id="valid_only" name="valid_only" value="all" />&nbsp;All</td>
<td><input type="radio" id="valid_only_valid" name="valid_only" value="1" checked /><label for="valid_only_valid">&nbsp;Valid</label> <input type="radio" id="valid_only_invalid" name="valid_only" value="0E0" /><label for="valid_only_invalid">&nbsp;Invalid</label> <input type="radio" id="valid_only_all" name="valid_only" value="all" /><label for="valid_only_all">&nbsp;All</label></td>
</tr>
</table>
</div>

Просмотреть файл

@ -127,7 +127,7 @@ function checkSearchForm(f)
Limit to</td>
<td class="search">
<input type="text" name="limit" value="[% limit | html %]" size="5" /> results</td>
<td align="left" colspan="2"><input name="has_comments" id="has_comments" type="checkbox" value="1"> Results that have comments?</td>
<td align="left" colspan="2"><input name="has_comments" id="has_comments" type="checkbox" value="1"> <label for="has_comments">Results that have comments?</label></td>
<td class="search-submit" colspan="[% colspan %]">
<input class="button" type="reset" onclick="FormInit(this.parent, '');" />&nbsp;
<input class="button" type="submit" value="Show Results" />

Просмотреть файл

@ -136,7 +136,7 @@ var relevanceHelpText = '<p>Relevance values are non-negative floating-point num
<td valign="top" width="33%"><div class="testcase-search">String to match:<br/><form action="show_test.cgi" method="get" name="testcase_fulltext_search" id="testcase_fulltext_search" onSubmit="return checkFulltextForm(this);"><input type="hidden" id="searchType" name="searchType" value="fulltext"/>
<input type="text" id="text_snippet" name="text_snippet" size="25" /><br/>Minimum Relevance Score:<br/><input type="text" name="relevance_threshold" id="relevance_threshold" value="[% default_relevance_threshold %]" size="5" />&nbsp;&lArr;&nbsp;<a name="relevance_help" onclick="toggleHelp(relevanceHelpTitle,relevanceHelpText);">What is relevance?</a><br/># of Matches:<br/><input type="text" name="match_limit" id="match_limit" value="[% default_match_limit %]" size="5" /><br/><input class="button" type="submit" value="Fulltext Search"></form>
</div></td>
<td valign="top"><div class="testcase-search"><form action="show_test.cgi" method="get" name="testcase_search_recent" id="testcase_search_recent" onSubmit="return checkRecentForm(this);"><input type="hidden" id="searchType" name="searchType" value="recent"/><input type="radio" id="recently" name="recently" value="added" checked/>&nbsp;Added<br/><input type="radio" id="recently" name="recently" value="changed" />&nbsp;Changed<br/>Within the last <input type="text" name="num_days" value="[% default_num_days %]" size="3"> days<br/># of Matches:<br/><input type="text" name="match_limit" id="match_limit" value="[% default_match_limit %]" size="5" /><br/><input class="button" type="submit" value="Search Recent"></div></td>
<td valign="top"><div class="testcase-search"><form action="show_test.cgi" method="get" name="testcase_search_recent" id="testcase_search_recent" onSubmit="return checkRecentForm(this);"><input type="hidden" id="searchType" name="searchType" value="recent"/><input type="radio" id="recently_added" name="recently" value="added" checked/><label for="recently_added">&nbsp;Added</label><br/><input type="radio" id="recently_changed" name="recently" value="changed" /><label for="recently_changed">&nbsp;Changed</label><br/>Within the last <input type="text" name="num_days" value="[% default_num_days %]" size="3"> days<br/># of Matches:<br/><input type="text" name="match_limit" id="match_limit" value="[% default_match_limit %]" size="5" /><br/><input class="button" type="submit" value="Search Recent"></div></td>
</tr>
</table>