From cc458c946e4b6ff947f179f6f3833d0e96dc8268 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc=20V=C3=A9ron?= Date: Sun, 4 Jun 2017 19:55:08 +0200 Subject: [PATCH] Bug 11235: Names for reports and dictionary are cut off when quotes are used To reproduce for saved reports: - Go to Home > Reports > Guided reports wizard - Create a report with double quotes in it's name, e.g. 'My "double quoted" report' - Go to "Saved reports", locate in the list the new report (name is correct here, is correct in database as well) - From the selection button at the right choose "Edit" - Result: Content of edit field for the report name is truncated (displays only: 'My') To reproduce for Reports dictionary: - Go to Home > Reports > Guided reports wizard - Create a new definition, give it the name 'The "double quoted" definition' and enter a text with double quotes for "Description" - Save - Verify that in the list of definitions both name and descriptions are truncated (in database as well) To test: - Apply patch - Verify that issues described above can no longer be reproduced Signed-off-by: Owen Leonard Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart (cherry picked from commit f4c965781d82e9537015b695cc15677cd06d72cd) Signed-off-by: Fridolin Somers (cherry picked from commit d6eb92b44f85a82db4dc063bd369b449f17cd7a5) Signed-off-by: Katrin Fischer --- .../prog/en/modules/reports/dictionary.tt | 74 +++++++++---------- .../modules/reports/guided_reports_start.tt | 4 +- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt index cbbc1d1d0b..96acda1339 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tt @@ -80,27 +80,27 @@
- - - - - + + + + + - - [% FOREACH definition IN definitions %] - - - - - - - - [% END %] -
NameDescriptionAreaDefinition
NameDescriptionAreaDefinition Action
[% definition.name %][% definition.description %][% definition.areaname %][% definition.saved_sql %]
- - - -
+ + [% FOREACH definition IN definitions %] + + [% definition.name | html %] + [% definition.description | html %] + [% definition.areaname %] + [% definition.saved_sql %] +
+ + + +
+ + [% END %] + [% ELSE %]
There are no saved definitions. Add a definition to the dictionary.
[% END %] @@ -133,8 +133,8 @@
  1. - - + + - - + + - - + + [% FOREACH column IN columns %]
    1. Column: [% column.name %]
    2. [% IF ( column.distinct ) %] -
    3. +
    4. [% END %] [% IF ( column.date ) %]
    5. @@ -235,9 +235,9 @@ [% IF ( step_5 ) %]
      - - - + + +

      Add new definition

      @@ -246,10 +246,10 @@ Step 5 of 5: Confirm details
      1. - Name:[%- definition_name -%] + Name:[%- definition_name | html -%]
      2. - Description:[%- definition_description -%] + Description:[%- definition_description | html -%]
      3. Area:[%- PROCESS area_name area=area -%] 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 71fed7f4c2..338899d36a 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 @@ -867,7 +867,7 @@ $(document).ready(function() { Create report from SQL
        1. - [% IF ( reportname ) %] + [% IF ( reportname ) %] [% ELSE %][% END %] Required
        2. [% PROCESS group_and_subgroup_selection %] @@ -959,7 +959,7 @@ Sub report: Required +
        3. Required
        4. [% PROCESS group_and_subgroup_selection %] [% IF (public) %]
        5. -- 2.39.5