diff options
Diffstat (limited to 'template/en/default/reports')
-rw-r--r-- | template/en/default/reports/chart.csv.tmpl | 6 | ||||
-rw-r--r-- | template/en/default/reports/chart.html.tmpl | 14 | ||||
-rw-r--r-- | template/en/default/reports/chart.png.tmpl | 12 | ||||
-rw-r--r-- | template/en/default/reports/create-chart.html.tmpl | 42 | ||||
-rw-r--r-- | template/en/default/reports/duplicates-table.html.tmpl | 8 | ||||
-rw-r--r-- | template/en/default/reports/duplicates.html.tmpl | 10 | ||||
-rw-r--r-- | template/en/default/reports/edit-series.html.tmpl | 12 | ||||
-rw-r--r-- | template/en/default/reports/report-line.png.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/reports/report-pie.png.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/reports/report-table.html.tmpl | 18 | ||||
-rw-r--r-- | template/en/default/reports/report.csv.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/reports/report.html.tmpl | 34 | ||||
-rw-r--r-- | template/en/default/reports/series-common.html.tmpl | 30 | ||||
-rw-r--r-- | template/en/default/reports/series.html.tmpl | 14 |
14 files changed, 105 insertions, 105 deletions
diff --git a/template/en/default/reports/chart.csv.tmpl b/template/en/default/reports/chart.csv.tmpl index f9e2f2b39..08282b3eb 100644 --- a/template/en/default/reports/chart.csv.tmpl +++ b/template/en/default/reports/chart.csv.tmpl @@ -26,7 +26,7 @@ Date\Series [% colsepchar %][% label FILTER csv %] [% END %] [%# The data, which is in the correct format for GD, is conceptually the wrong - # way round for CSV output. So, we need to invert it here, which is why + # way round for CSV output. So, we need to invert it here, which is why # these loops aren't just plain FOREACH. #%] [% i = 0 %] @@ -40,5 +40,5 @@ Date\Series [% j = j + 1 %] [% END %] [% i = i + 1 %] - -[% END %] + +[% END %] diff --git a/template/en/default/reports/chart.html.tmpl b/template/en/default/reports/chart.html.tmpl index a927c382d..256458a68 100644 --- a/template/en/default/reports/chart.html.tmpl +++ b/template/en/default/reports/chart.html.tmpl @@ -17,17 +17,17 @@ # # Contributor(s): Gervase Markham <gerv@gerv.net> #%] - + [%# INTERFACE: #%] [% DEFAULT width = 600 - height = 350 + height = 350 %] [% time = time FILTER time('%Y-%m-%d %H:%M:%S') FILTER html %] -[% PROCESS global/header.html.tmpl +[% PROCESS global/header.html.tmpl title = "Chart" %] @@ -47,20 +47,20 @@ <a href="[% sizeurl %]&width=[% width %]&height= [% height + 100 %]">Taller</a><br> <a href="[% sizeurl %]&width=[% width - 100 %]&height= - [% height %]">Thinner</a> * + [% height %]">Thinner</a> * <a href="[% sizeurl %]&width=[% width + 100 %]&height= [% height %]">Fatter</a> <br> <a href="[% sizeurl %]&width=[% width %]&height= [% height - 100 %]">Shorter</a><br> </p> - + <p> <a href="chart.cgi? [% imagebase FILTER html %]&ctype=csv&action=plot">CSV</a> | - <a href="chart.cgi?[% imagebase FILTER html %]&action=assemble">Edit + <a href="chart.cgi?[% imagebase FILTER html %]&action=assemble">Edit this chart</a> </p> - + </div> [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/reports/chart.png.tmpl b/template/en/default/reports/chart.png.tmpl index c4fa04f66..367be2066 100644 --- a/template/en/default/reports/chart.png.tmpl +++ b/template/en/default/reports/chart.png.tmpl @@ -30,10 +30,10 @@ [% FILTER null; x_label_skip = (30 * chart.data.0.size / width); - + graph.set(x_label => x_label, y_label => y_label, - y_tick_number => 8, + y_tick_number => 8, y_max_value => chart.y_max_value, x_label_position => 0.5, x_labels_vertical => 1, @@ -42,10 +42,10 @@ line_width => 2, dclrs => ["lred", "lgreen", "lblue", "lyellow", "lpurple", "lorange", "black", "green", - "blue", "dpink", "lbrown", "gray", + "blue", "dpink", "lbrown", "gray", "red", "dpurple", "gold", "marine"]); - - # Workaround for the fact that set_legend won't take chart.labels directly, + + # Workaround for the fact that set_legend won't take chart.labels directly, # because chart.labels is an array reference rather than an array. graph.set_legend(chart.labels.0, chart.labels.1, chart.labels.2, chart.labels.3, chart.labels.4, chart.labels.5, @@ -53,7 +53,7 @@ chart.labels.9, chart.labels.10, chart.labels.11, chart.labels.12, chart.labels.13, chart.labels.14, chart.labels.15); - + graph.plot(chart.data).png | stdout(1); END; -%] diff --git a/template/en/default/reports/create-chart.html.tmpl b/template/en/default/reports/create-chart.html.tmpl index e20d8522f..58a69b7e0 100644 --- a/template/en/default/reports/create-chart.html.tmpl +++ b/template/en/default/reports/create-chart.html.tmpl @@ -25,12 +25,12 @@ # series. Contains details of all series the user can see. #%] -[% PROCESS global/header.html.tmpl +[% PROCESS global/header.html.tmpl title = "Create Chart" %] -[% PROCESS "reports/series-common.html.tmpl" - donames = 1 +[% PROCESS "reports/series-common.html.tmpl" + donames = 1 %] <script [% script_nonce FILTER none %]> @@ -39,7 +39,7 @@ function subcatSelected() { var cat = document.chartform.category.value; var subcat = document.chartform.subcategory.value; var names = series[cat][subcat]; - + var namewidget = document.chartform.name; namewidget.options.length = 0; @@ -52,7 +52,7 @@ function subcatSelected() { namewidget.disabled = false; namewidget.options[0].selected = true; - + checkNewState(); } document.addEventListener("DOMContentLoaded", function(event) { @@ -65,11 +65,11 @@ document.addEventListener("DOMContentLoaded", function(event) { }); }); </script> - + [% gttext = "Grand Total" %] -<form method="get" action="chart.cgi" name="chartform"> - +<form method="get" action="chart.cgi" name="chartform"> + <table cellpadding="2" cellspacing="2" border="0"> [% IF NOT category OR category.size == 0 %] <tr> @@ -108,7 +108,7 @@ document.addEventListener("DOMContentLoaded", function(event) { id="action-assemble2"> </noscript> </td> - + [% PROCESS series_select sel = { name => 'name', size => 5, multiple => 1, @@ -116,7 +116,7 @@ document.addEventListener("DOMContentLoaded", function(event) { # not its name. value_in_hash => 1 } %] - <td align="center" valign="middle"> + <td align="center" valign="middle"> <input type="submit" name="action-add" value="Add To List" id="action-add"><br> </td> @@ -135,15 +135,15 @@ document.addEventListener("DOMContentLoaded", function(event) { <th>Data Set</th> <th></th> </tr> - + [%# The external loop has two counters; one which keeps track of where we # are in the old labels array, and one which keeps track of the new # indexes for the form elements. They are different if chart.lines has - # empty slots in it. + # empty slots in it. #%] [% labelidx = 0 %] [% newidx = 0 %] - + [% FOREACH line = chart.lines %] [% IF NOT line %] [%# chart.lines has an empty slot, so chart.labels will too. We @@ -152,7 +152,7 @@ document.addEventListener("DOMContentLoaded", function(event) { [% labelidx = labelidx + 1 %] [% NEXT %] [% END %] - + [% FOREACH series = line %] <tr> [% IF loop.first %] @@ -161,7 +161,7 @@ document.addEventListener("DOMContentLoaded", function(event) { </td> <td rowspan="[% line.size %]"> <input type="text" size="20" name="label[% newidx %]" - value="[% (chart.labels.$labelidx OR series.name) + value="[% (chart.labels.$labelidx OR series.name) FILTER html %]"> </td> [% END %] @@ -171,10 +171,10 @@ document.addEventListener("DOMContentLoaded", function(event) { </td> <td> - [% series.category FILTER html %] / + [% series.category FILTER html %] / [%+ series.subcategory FILTER html %] / [%+ series.name FILTER html %] - <input type="hidden" name="line[% newidx %]" + <input type="hidden" name="line[% newidx %]" value="[% series.series_id %]"> </td> @@ -190,7 +190,7 @@ document.addEventListener("DOMContentLoaded", function(event) { [% series.subcategory FILTER uri %]%20/%20 [% series.name FILTER uri -%]&series_id= [% series.series_id %]&remaction=runseries">Run Search</a> - </td> + </td> </tr> [% END %] [% labelidx = labelidx + 1 %] @@ -220,7 +220,7 @@ document.addEventListener("DOMContentLoaded", function(event) { <tr> <td valign="bottom" style="text-align: center;"> - <input type="submit" name="action-sum" value="Sum" + <input type="submit" name="action-sum" value="Sum" style="width: 5em;" id="action-sum"><br> <input type="submit" name="action-remove" value="Remove" style="width: 5em;" id="action-remove"> @@ -250,7 +250,7 @@ document.addEventListener("DOMContentLoaded", function(event) { </table> [% ELSE %] <p><i>None</i></p> - [% END %] + [% END %] </form> [% IF user.in_group('editbugs') %] @@ -271,7 +271,7 @@ document.addEventListener("DOMContentLoaded", function(event) { </select> <input id="submit_create" type="submit" value="Create a new data set"> </form> -[% END %] +[% END %] [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/reports/duplicates-table.html.tmpl b/template/en/default/reports/duplicates-table.html.tmpl index a7abf07b8..8d27bb976 100644 --- a/template/en/default/reports/duplicates-table.html.tmpl +++ b/template/en/default/reports/duplicates-table.html.tmpl @@ -15,7 +15,7 @@ # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # - # Contributor(s): + # Contributor(s): # Gervase Markham <gerv@gerv.net> # Max Kanat-Alexander <mkanat@bugzilla.org> #%] @@ -54,7 +54,7 @@ [% SET base_args = [] %] [% FOREACH param = ['maxrows', 'openonly', 'format', 'sortvisible', - 'changedsince', 'product'] + 'changedsince', 'product'] %] [% NEXT IF NOT ${param}.defined %] [% FOREACH value = ${param} %] @@ -74,7 +74,7 @@ <tr> [% FOREACH column = columns %] [% IF column.name == sortby %] - [%# We add this to the column object so it doesn't affect future + [%# We add this to the column object so it doesn't affect future # iterations of the loop. #%] [% column.reverse_sort = reverse ? 0 : 1 %] @@ -112,7 +112,7 @@ [%- display_value('op_sys', bug.op_sys) FILTER html %] </td> <td class="target_milestone"> - [% display_value('target_milestone', + [% display_value('target_milestone', bug.target_milestone) FILTER html %] </td> <td class="short_desc">[% bug.short_desc FILTER html %]</td> diff --git a/template/en/default/reports/duplicates.html.tmpl b/template/en/default/reports/duplicates.html.tmpl index ed3e7b8ac..f95fe3762 100644 --- a/template/en/default/reports/duplicates.html.tmpl +++ b/template/en/default/reports/duplicates.html.tmpl @@ -34,7 +34,7 @@ [% IF product.size %] [% title = BLOCK %] - Most Frequently Reported [% terms.Bugs %] for + Most Frequently Reported [% terms.Bugs %] for [%+ product.join(', ') FILTER html %] [% END %] [% ELSE %] @@ -95,7 +95,7 @@ <tr> <td><label for="maxrows">Max rows:</label></td> <td> - <input size="4" name="maxrows" id="maxrows" + <input size="4" name="maxrows" id="maxrows" value="[% maxrows FILTER html %]"> </td> </tr> @@ -129,7 +129,7 @@ <form method="post" action="buglist.cgi" data-no-csrf> <input type="hidden" name="bug_id" value="[% bug_ids_string FILTER html %]"> - Or just give this to me as a <input type="submit" id="list" + Or just give this to me as a <input type="submit" id="list" value="[% terms.bug %] list">. (Note: the order may not be the same.) </form> @@ -141,7 +141,7 @@ </h3> <p> - The Most Frequent [% terms.Bugs %] page lists the known open + The Most Frequent [% terms.Bugs %] page lists the known open [%+ terms.bugs %] which are reported most frequently, counting the number of direct and indirect duplicates of [% terms.bugs %]. This information is provided in order to assist in minimizing @@ -170,7 +170,7 @@ that has already been filed.</li> <li>If you find your [% terms.bug %] in [% terms.Bugzilla %], feel free to comment with any new or additional data you may have.</li> - <li>If you cannot find your problem already documented in + <li>If you cannot find your problem already documented in [%+ terms.Bugzilla %], <a href="enter_bug.cgi">file a new [% terms.bug %]</a>.</li> </ul> diff --git a/template/en/default/reports/edit-series.html.tmpl b/template/en/default/reports/edit-series.html.tmpl index da7d15e0a..3169d3c93 100644 --- a/template/en/default/reports/edit-series.html.tmpl +++ b/template/en/default/reports/edit-series.html.tmpl @@ -20,7 +20,7 @@ [% title = "Edit Series" %] [% subheader = BLOCK %] - [% default.category FILTER html %] / + [% default.category FILTER html %] / [%+ default.subcategory FILTER html %] / [%+ default.name FILTER html %] [% END %] @@ -36,20 +36,20 @@ [% END %] <form method="get" action="chart.cgi" name="chartform"> - - [% PROCESS reports/series.html.tmpl + + [% PROCESS reports/series.html.tmpl button_name = "Change Data Set" %] <input type="hidden" name="action" value="alter"> <input type="hidden" name="token" value="[% issue_hash_token([default.id, default.name]) FILTER html %]"> - + [% IF default.series_id %] <input type="hidden" name="series_id" value="[% default.series_id %]"> [% END %] </form> <p> - <b>Creator</b>: + <b>Creator</b>: [% IF default.creator %] <a href="mailto:[% default.creator.email FILTER html %]"> [% default.creator.email FILTER html %]</a> @@ -63,7 +63,7 @@ set. </p> <p> - <a href="query.cgi?[% default.query FILTER html %]">View + <a href="query.cgi?[% default.query FILTER html %]">View series search parameters</a> | <a href="buglist.cgi?cmdtype=dorem&namedcmd= [% default.category FILTER uri %]- diff --git a/template/en/default/reports/report-line.png.tmpl b/template/en/default/reports/report-line.png.tmpl index 0edc0fee7..5d81b1330 100644 --- a/template/en/default/reports/report-line.png.tmpl +++ b/template/en/default/reports/report-line.png.tmpl @@ -51,7 +51,7 @@ line_width => 2, dclrs => ["lred", "lgreen", "lblue", "lyellow", "lpurple", "lorange", "black", "green", - "blue", "dpink", "lbrown", "gray", + "blue", "dpink", "lbrown", "gray", "red", "dpurple", "gold", "marine"]); # Workaround for the fact that set_legend won't take row_names directly, diff --git a/template/en/default/reports/report-pie.png.tmpl b/template/en/default/reports/report-pie.png.tmpl index 27f5525dd..410359f37 100644 --- a/template/en/default/reports/report-pie.png.tmpl +++ b/template/en/default/reports/report-pie.png.tmpl @@ -28,12 +28,12 @@ [% FILTER null; USE graph = GD.Graph.pie(width, height); - + graph.set(title => col_field_disp, pie_height => 20, suppress_angle => 2, start_angle => 180); - + graph.plot(data.0).png | stdout(1); END; -%] diff --git a/template/en/default/reports/report-table.html.tmpl b/template/en/default/reports/report-table.html.tmpl index 096eb171a..af2eef5f3 100644 --- a/template/en/default/reports/report-table.html.tmpl +++ b/template/en/default/reports/report-table.html.tmpl @@ -28,7 +28,7 @@ # tbl_field: string. Name of the field being plotted as tables. # col_names: array. List of values for the field being plotted as columns. # row_names: array. List of values for the field being plotted as rows. - # data: <depends on format>. Data to plot. Only data.$tbl is accessed. + # data: <depends on format>. Data to plot. Only data.$tbl is accessed. # tbl: Name of a hash in data which is the table to be plotted. #%] @@ -145,7 +145,7 @@ YAHOO.util.Event.addListener(window, "load", function() { ] }; this.myDataTable = new YAHOO.widget.DataTable("tabular_report_container_ - [% tbl FILTER js %]", myColumnDefs, this.myDataSource, + [% tbl FILTER js %]", myColumnDefs, this.myDataSource, {formatRow: totalRowFormatter}); }); </script> @@ -184,7 +184,7 @@ YAHOO.util.Event.addListener(window, "load", function() { [% FOREACH col = col_names %] [% col_totals.$col = 0 %] [% NEXT IF col == "" %] - + [% col_idx = 1 - col_idx %] <th class="[% classes.$row_idx.$col_idx %]"> [% PROCESS value_display value = col field = col_field %] @@ -199,7 +199,7 @@ YAHOO.util.Event.addListener(window, "load", function() { <tbody> [% FOREACH row = row_names %] [% row_total = 0 %] - + [% row_idx = 1 - row_idx %] <tr> <td class="[% classes.$row_idx.$col_idx %]" align="right"> @@ -209,7 +209,7 @@ YAHOO.util.Event.addListener(window, "load", function() { [% row_total = row_total + data.$tbl.$col.$row %] [% NEXT IF col == "" %] [% col_totals.$col = (col_totals.$col || 0) + data.$tbl.$col.$row %] - + [% col_idx = 1 - col_idx %] <td class="[% classes.$row_idx.$col_idx %]" align="center"> [% IF data.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %] @@ -221,7 +221,7 @@ YAHOO.util.Event.addListener(window, "load", function() { . [% END %] </td> - [% END %] + [% END %] <td class="ttotal" align="right"> <a href="[% urlbase %]& [% row_field FILTER uri %]=[% row FILTER uri %] @@ -238,7 +238,7 @@ YAHOO.util.Event.addListener(window, "load", function() { </td> [% FOREACH col = col_names %] [% NEXT IF col == "" %] - + <td class="ttotal" align="center"> <a href="[% urlbase %]& [% col_field FILTER uri %]=[% col FILTER uri %] @@ -257,7 +257,7 @@ YAHOO.util.Event.addListener(window, "load", function() { </tbody> </table> </div> - + </td> </tr> </table> @@ -270,4 +270,4 @@ YAHOO.util.Event.addListener(window, "load", function() { [% disp_value = value FILTER email %] [% END %] [% disp_value FILTER html FILTER replace('^ $',' ') %] -[% END %] +[% END %] diff --git a/template/en/default/reports/report.csv.tmpl b/template/en/default/reports/report.csv.tmpl index f26bc1f36..0687064e9 100644 --- a/template/en/default/reports/report.csv.tmpl +++ b/template/en/default/reports/report.csv.tmpl @@ -19,7 +19,7 @@ #%] [% PROCESS "global/field-descs.none.tmpl" %] [% FOREACH tbl = tbl_names %] - [% PROCESS "reports/report-table.csv.tmpl" %] + [% PROCESS "reports/report-table.csv.tmpl" %] -[% END %] +[% END %] diff --git a/template/en/default/reports/report.html.tmpl b/template/en/default/reports/report.html.tmpl index c70f3de13..8c580fd94 100644 --- a/template/en/default/reports/report.html.tmpl +++ b/template/en/default/reports/report.html.tmpl @@ -17,14 +17,14 @@ # # Contributor(s): Gervase Markham <gerv@gerv.net> #%] - + [%# INTERFACE: # col_field: string. Name of the field being plotted as columns. # row_field: string. Name of the field being plotted as rows. # tbl_field: string. Name of the field being plotted as tables. # tbl_names: array. List of values for the field being plotted as tables. # time: integer. Seconds since the epoch. - # data: <depends on format>. Data to plot. + # data: <depends on format>. Data to plot. # format: string. Format of the individual reports. # width: integer. For image charts, height of the image. # height: integer. For image charts, width of the image. @@ -34,7 +34,7 @@ #%] [% DEFAULT width = 600 - height = 350 + height = 350 %] [% IF min_width AND width < min_width %] @@ -54,7 +54,7 @@ [% switchbase = switchbase FILTER html %] [% title = BLOCK %] - Report: + Report: [% IF tbl_field %] [% tbl_field_disp FILTER html %] [% END %] @@ -68,7 +68,7 @@ [% time = time FILTER time('%Y-%m-%d %H:%M:%S') FILTER html %] -[% PROCESS global/header.html.tmpl +[% PROCESS global/header.html.tmpl style = " .t1 { background-color: #ffffff } /* white */ .t2 { background-color: #dfefff } /* light blue */ @@ -86,7 +86,7 @@ <div align="center"> - [% FOREACH tbl = tbl_names %] + [% FOREACH tbl = tbl_names %] [% IF tbl == "-total-" %] [% tbl_disp = "Total" %] [% ELSE %] @@ -99,7 +99,7 @@ [% IF tbl %] <h2>[% tbl_disp FILTER email FILTER html %]</h2> [% END %] - + [% imageurl = BLOCK %]report.cgi?[% imagebase FILTER html %]&format= [% format FILTER uri %]&ctype=png&action=plot& [% IF tbl_field %] @@ -112,14 +112,14 @@ [% END %] [% END %] [% END %] - [% END %]width=[% width %]&height=[% height %] + [% END %]width=[% width %]&height=[% height %] [% END %] - + <img alt="Graphical report results" src="[% imageurl %]" width="[% width %]" height="[% height %]"> [% END %] <br> - [% END %] + [% END %] <table> <tr> @@ -129,7 +129,7 @@ { name => "line", description => "Line" }, { name => "table", description => "Table" } ] %] - [% formaturl = "report.cgi?$switchbase&width=$width" _ + [% formaturl = "report.cgi?$switchbase&width=$width" _ "&height=$height&action=wrap" %] [% FOREACH other_format = formats %] [% NEXT IF other_format.name == "pie" AND row_field AND col_field %] @@ -137,11 +137,11 @@ <a href="[% formaturl %]&format=[% other_format.name %]"> [% END %] [% other_format.description FILTER html %] - [% "</a>" UNLESS other_format.name == format %] | + [% "</a>" UNLESS other_format.name == format %] | [% END %] - <a href="[% formaturl %]&ctype=csv&format=table">CSV</a> + <a href="[% formaturl %]&ctype=csv&format=table">CSV</a> </td> - + [% IF format != "table" %] <td> @@ -154,7 +154,7 @@ <a href="[% sizeurl %]&width=[% width %]&height= [% height + 100 %]">Taller</a><br> <a href="[% sizeurl %]&width=[% width - 100 %]&height= - [% height %]">Thinner</a> * + [% height %]">Thinner</a> * <a href="[% sizeurl %]&width=[% width + 100 %]&height= [% height %]">Fatter</a> <br> <a href="[% sizeurl %]&width=[% width %]&height= @@ -166,7 +166,7 @@ <p> [% IF format == "table" %] - <a href="query.cgi?[% switchbase %]&format=report-table">Edit + <a href="query.cgi?[% switchbase %]&format=report-table">Edit this report</a> [% ELSE %] <a href="query.cgi?[% switchbase %]&chart_format= @@ -175,7 +175,7 @@ </a> [% END %] </p> - + </div> [% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/reports/series-common.html.tmpl b/template/en/default/reports/series-common.html.tmpl index b8032255d..7bf387bd2 100644 --- a/template/en/default/reports/series-common.html.tmpl +++ b/template/en/default/reports/series-common.html.tmpl @@ -20,7 +20,7 @@ [%# INTERFACE: # donames: boolean. True if we have a multi-select for names as well as - # categories and subcategories. + # categories and subcategories. # category: hash (keyed by category) of hashes (keyed by subcategory) of # hashes (keyed by name), with value being the series_id of the # series. Contains details of all series the user can see. @@ -38,55 +38,55 @@ var series = { "[%+ s FILTER js %]" : { [% IF donames %] [% FOREACH n = category.$c.$s.keys.sort %] - "[% n FILTER js %]": + "[% n FILTER js %]": [% category.$c.$s.$n FILTER js %][% ", " UNLESS loop.last %] [% END %] [% END %] }[% ", " UNLESS loop.last %] [% END %] }[% ", " UNLESS loop.last %] -[% END %] +[% END %] }; [%# This function takes necessary action on selection of a category %] function catSelected() { var cat = document.chartform.category.value; var subcats = series[cat]; - + var subcatwidget = document.chartform.subcategory; - + subcatwidget.options.length = 0; var i = 0; - + for (x in subcats) { subcatwidget.options[i] = new Option(x, x); i++; } - + [% IF newtext %] subcatwidget.options[i] = new Option("[% newtext FILTER js %]", ""); - [% END %] + [% END %] subcatwidget.disabled = false; subcatwidget.options[0].selected = true; - + if (document.chartform.action[1]) { [%# On the query form, select the right radio button. %] document.chartform.action[1].checked = true; } - - checkNewState(); + + checkNewState(); } [%# This function updates the disabled state of the two "new" textboxes %] function checkNewState() { var fm = document.chartform; if (fm.newcategory) { - fm.newcategory.disabled = - (fm.category.value != "" || + fm.newcategory.disabled = + (fm.category.value != "" || fm.action[1] && fm.action[1].checked == false); - fm.newsubcategory.disabled = - (fm.subcategory.value != "" || + fm.newsubcategory.disabled = + (fm.subcategory.value != "" || fm.action[1] && fm.action[1].checked == false); } } diff --git a/template/en/default/reports/series.html.tmpl b/template/en/default/reports/series.html.tmpl index 164c30355..23e7d82f7 100644 --- a/template/en/default/reports/series.html.tmpl +++ b/template/en/default/reports/series.html.tmpl @@ -20,14 +20,14 @@ [%# INTERFACE: # default: hash. Defaults for category, subcategory, name etc. - # button_name: string. What the button will say. + # button_name: string. What the button will say. # category: hash (keyed by category) of hashes (keyed by subcategory) of # hashes (keyed by name), with value being the series_id of the # series. Contains details of all series the user can see. #%] [% PROCESS "reports/series-common.html.tmpl" - newtext = "New (name below)" + newtext = "New (name below)" %] <script [% script_nonce FILTER none %]> @@ -63,7 +63,7 @@ size => 5 } %] <td valign="top" name="name"> - <input type="text" name="name" maxlength="64" + <input type="text" name="name" maxlength="64" value="[% default.name.0 FILTER html %]" size="25"> </td> @@ -74,24 +74,24 @@ <span style="font-weight: bold;"> day(s)</span><br> [%# Change 'admin' here and in Series.pm, or remove the check completely, if you want to change who can make series public. %] - [% IF user.in_group('admin') %] + [% IF user.in_group('admin') %] <input type="checkbox" name="public" [%+ "checked='checked'" IF default.public.0 %]> <span style="font-weight: bold;">Visible to all<br> - (within group restrictions)</span> + (within group restrictions)</span> [% END %] </td> </tr> <tr> <td> - <input type="text" style="width: 100%" name="newcategory" + <input type="text" style="width: 100%" name="newcategory" maxlength="64" value="[% default.newcategory.0 FILTER html %]"> </td> <td></td> <td> <input type="text" style="width: 100%" name="newsubcategory" - maxlength="64" + maxlength="64" value="[% default.newsubcategory.0 FILTER html %]"> </td> <td></td> |