View | Details | Raw Unified | Return to bug 2969
Collapse All | Expand All

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1877-1883 CREATE TABLE saved_sql ( -- saved sql reports Link Here
1877
   `last_modified` datetime default NULL, -- the date this report was last edited
1877
   `last_modified` datetime default NULL, -- the date this report was last edited
1878
   `savedsql` text, -- the SQL for this report
1878
   `savedsql` text, -- the SQL for this report
1879
   `last_run` datetime default NULL,
1879
   `last_run` datetime default NULL,
1880
   `report_name` varchar(255) default NULL, -- the name of this report
1880
   `report_name` varchar(255) NOT NULL default '', -- the name of this report
1881
   `type` varchar(255) default NULL, -- always 1 for tabular
1881
   `type` varchar(255) default NULL, -- always 1 for tabular
1882
   `notes` text, -- the notes or description given to this report
1882
   `notes` text, -- the notes or description given to this report
1883
   `cache_expiry` int NOT NULL default 300,
1883
   `cache_expiry` int NOT NULL default 300,
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 8776-8781 if ( CheckVersion($DBversion) ) { Link Here
8776
    SetVersion($DBversion);
8776
    SetVersion($DBversion);
8777
}
8777
}
8778
8778
8779
$DBversion = "3.17.00.XXX";
8780
if ( CheckVersion($DBversion) ) {
8781
   $dbh->do("ALTER TABLE saved_sql CHANGE report_name report_name VARCHAR( 255 ) NOT NULL DEFAULT '' ");
8782
   print "Upgrade to $DBversion done (Bug 2969: Report Name should be mandatory for saved reports)\n";
8783
   SetVersion ($DBversion);
8784
}
8785
8779
=head1 FUNCTIONS
8786
=head1 FUNCTIONS
8780
8787
8781
=head2 TableExists($table)
8788
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-8 / +7 lines)
Lines 668-674 canned reports and writing custom SQL reports.</p> Link Here
668
[% END %]
668
[% END %]
669
669
670
[% IF ( save ) %]
670
[% IF ( save ) %]
671
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
671
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" class="validated">
672
<input type="hidden" name="sql" value="[% sql |html %]" />
672
<input type="hidden" name="sql" value="[% sql |html %]" />
673
<input type="hidden" name="type" value="[% type %]" />
673
<input type="hidden" name="type" value="[% type %]" />
674
<input type="hidden" name="area" value="[% area %]" />
674
<input type="hidden" name="area" value="[% area %]" />
Lines 677-683 canned reports and writing custom SQL reports.</p> Link Here
677
<fieldset class="rows">
677
<fieldset class="rows">
678
<legend>Save your custom report</legend>
678
<legend>Save your custom report</legend>
679
<ol>
679
<ol>
680
    <li><label for="reportname">Report name: </label><input type="text" id="reportname" name="reportname" /></li>
680
    <li><label for="reportname" class="required">Report name: </label><input type="text" id="reportname" name="reportname" class="required" required="required" /> <span class="required">Required</span></li>
681
    [% PROCESS group_and_subgroup_selection %]
681
    [% PROCESS group_and_subgroup_selection %]
682
    <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
682
    <li><label for="notes">Notes:</label> <textarea name="notes" id="notes"></textarea></li>
683
</ol></fieldset>
683
</ol></fieldset>
Lines 836-848 $(document).ready(function() { Link Here
836
    load_group_subgroups();
836
    load_group_subgroups();
837
});
837
});
838
</script>
838
</script>
839
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post">
839
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="post" class="validated">
840
<fieldset class="rows">
840
<fieldset class="rows">
841
<legend>Create report from SQL</legend>
841
<legend>Create report from SQL</legend>
842
<ol>
842
<ol>
843
    <li><label for="reportname">Report name:</label>
843
    <li><label for="reportname" class="required">Report name:</label>
844
        [% IF ( reportname ) %]<input type="text" id="reportname" name="reportname" value="[% reportname %]" />
844
        [% IF ( reportname ) %]<input type="text" class="required" required="required" id="reportname" name="reportname" value="[% reportname %]" />
845
        [% ELSE %]<input type="text" id="reportname" name="reportname" />[% END %] 
845
        [% ELSE %]<input type="text" class="required" required="required" id="reportname" name="reportname" />[% END %] <span class="required">Required</span>
846
    </li>
846
    </li>
847
    [% PROCESS group_and_subgroup_selection %]
847
    [% PROCESS group_and_subgroup_selection %]
848
848
Lines 873-879 $(document).ready(function() { Link Here
873
<fieldset class="rows">
873
<fieldset class="rows">
874
<legend>SQL:</legend>
874
<legend>SQL:</legend>
875
<div style="margin:1em;">
875
<div style="margin:1em;">
876
<textarea  id="sql" name="sql" cols="50" rows="10">[% sql %]</textarea>
876
<textarea id="sql" name="sql" class="required" required="required" cols="50" rows="10">[% sql %]</textarea> <span class="required">Required</span>
877
</div>
877
</div>
878
</fieldset>
878
</fieldset>
879
879
880
- 

Return to bug 2969