From fbb0c6fa6a0b8cc19455496199c6b7099e302de6 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 24 Feb 2014 16:13:35 +0100 Subject: [PATCH] Bug 9016: (follow-up) qa fixes * Fixes POD of GetMessageTransportTypes. * Removes the useless map in GetMessageTransportTypes. * Textual: "You must specify a title and a content" -> "Please specify title and content". * Reintroduces << and >> around the field name. * Change message for the update DB entry. --- C4/Letters.pm | 10 +++------- installer/data/mysql/updatedatabase.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 09e62aa..4345153 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -849,22 +849,18 @@ ENDSQL my @mtt = GetMessageTransportTypes(); - returns a list of hashes + returns an arrayref of transport types =cut sub GetMessageTransportTypes { my $dbh = C4::Context->dbh(); - my $sth = $dbh->prepare(" + my $mtts = $dbh->selectcol_arrayref(" SELECT message_transport_type FROM message_transport_types ORDER BY message_transport_type "); - $sth->execute; - my @mtts = map{ - $_->[0] - } @{ $sth->fetchall_arrayref() }; - return \@mtts; + return $mtts; } =head2 _add_attachements diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 39f8496..017a60c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8065,7 +8065,7 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { } } - print "Upgrade done (Bug 9016: Adds the association table overduerules_transport_types)\n"; + print "Upgrade done (Bug 9016: Adds multi transport types management for notices)\n"; SetVersion($DBversion); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index 3da568d..92c3421 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -34,7 +34,7 @@ $(document).ready(function() { || ( title.length > 0 && content.length == 0 ) ) { var mtt = $(this).find('input[name="message_transport_type"]').val(); - var msg = _("You must specify a title and a content for %s"); + var msg = _("Please specify title and content for %s"); msg = msg.replace( "%s", mtt ); alert(msg) event.preventDefault(); @@ -95,7 +95,7 @@ $(document).ready(function() { chaineAj += $(this).val(); } } ); - $(myQuery).insertAtCaret(chaineAj); + $(myQuery).insertAtCaret("<<" + chaineAj + ">>"); } } [% END %] -- 1.7.10.4