Bugzilla – Attachment 32932 Details for
Bug 13161
Report name should be mandatory when editing saved reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13161 - Report name should be mandatory when editing saved reports
Bug-13161---Report-name-should-be-mandatory-when-e.patch (text/plain), 4.74 KB, created by
Owen Leonard
on 2014-10-29 17:43:02 UTC
(
hide
)
Description:
Bug 13161 - Report name should be mandatory when editing saved reports
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-10-29 17:43:02 UTC
Size:
4.74 KB
patch
obsolete
>From e6f3ba87bfd5a2ddc71539a64925132a123c8e09 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 29 Oct 2014 13:34:03 -0400 >Subject: [PATCH] Bug 13161 - Report name should be mandatory when editing > saved reports >Content-Type: text/plain; charset="utf-8" > >When Bug 2969 made report name required for SQL reports, it did so only >for new reports. This patch makes the same requirement true when editing >existing reports. > >Other changes: > >- Removed unused "type" setting from edit screen (already removed from > creation form). >- Added form field size attribute to report name field to match creation > form. >- Moved SQL textarea into its own fieldset and marked it as required, > matching the report creation form. > >To test, apply the patch and edit an existing saved SQL report. You >should be prevented from saving your report with either the report name >or SQL field blank. Test with JavaScript enable and disabled. > >Confirm that after entering valid data your report runs correctly. >Compare the new SQL report form with the update SQL report form. They >should be structured the same. >--- > .../en/modules/reports/guided_reports_start.tt | 23 ++++++++++---------- > 1 file changed, 11 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 7508730..6b630a4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -856,8 +856,8 @@ $(document).ready(function() { > <legend>Create report from SQL</legend> > <ol> > <li><label for="reportname" class="required">Report name:</label> >- [% IF ( reportname ) %]<input type="text" class="required" required="required" id="reportname" name="reportname" value="[% reportname %]" /> >- [% ELSE %]<input type="text" class="required" required="required" id="reportname" name="reportname" />[% END %] <span class="required">Required</span> >+ [% IF ( reportname ) %]<input type="text" class="required" required="required" id="reportname" name="reportname" value="[% reportname %]" size="50"/> >+ [% ELSE %]<input type="text" class="required" required="required" id="reportname" name="reportname" size="50" />[% END %] <span class="required">Required</span> > </li> > [% PROCESS group_and_subgroup_selection %] > >@@ -876,13 +876,6 @@ $(document).ready(function() { > </select> > </li>[% END %] > <li><label for="notes">Notes:</label> <textarea id="notes" name="notes" cols="50" rows="2">[% notes %]</textarea></li> >- <li><label for="types">Type:</label> >- <select id="types" name="types"> >- <option value="1">Tabular</option> >- <option value="2" disabled="disabled">Summary</option> >- <option value="3" disabled="disabled">Matrix</option> >- </select> >- </li> > </ol> > </fieldset> > <fieldset class="rows"> >@@ -945,13 +938,13 @@ Sub report:<select name="subreport"> > [% END %] > > [% IF ( editsql ) %] >-<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post"> >+<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" class="validated"> > <input type="hidden" name="phase" value="Update SQL" /> > <input type="hidden" name="id" value="[% id %]"/> > <fieldset class="rows"> > <legend>Edit SQL report</legend> > <ol> >-<li><label for="reportname">Report name:</label><input type="text" id="reportname" name="reportname" value="[% reportname %]" size="50" /></li> >+<li><label for="reportname" class="required">Report name: </label><input type="text" id="reportname" name="reportname" value="[% reportname %]" size="50" class="required" required="required" /> <span class="required">Required</span></li> > [% PROCESS group_and_subgroup_selection %] > [% IF (public) %] > <li><label for="public">Report is public:</label><select id="public" name="public"> <option value="0">No (default)</option> <option value="1" selected="selected">Yes</option> </select></li> >@@ -968,10 +961,16 @@ Sub report:<select name="subreport"> > </select> > </li>[% END %] > <li><label for="notes">Notes:</label><textarea id="notes" name="notes" cols="50" rows="2">[% notes %]</textarea></li> >-<li><textarea id="sql" name="sql" rows="10" cols="60">[% sql %]</textarea></li> > </ol> > </fieldset> > >+<fieldset class="rows"> >+ <legend>SQL:</legend> >+ <div style="margin:1em;"> >+ <textarea id="sql" name="sql" class="required" required="required" cols="50" rows="10">[% sql %]</textarea> <span class="required">Required</span> >+ </div> >+</fieldset> >+ > <fieldset class="action"> > <input type="submit" name="submit" value="Update SQL" /> <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved" class="cancel">Cancel</a> > </fieldset> >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13161
:
32932
|
32934
|
32956
|
32957