Bug 17082: Translatability: Fix sentence splitting in member.tt

This patch fixes sentences splitting in file
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt

Fix is done with a new .inc file because the code is the same as in
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt

To test:
- Carefully review code changes
- Test on a fresh install without example data (or save database
  and test with empty tables 'branches' and 'categories')
- Go to Home > Patrons (members-home.pl)
- Verify that a warnings appears aubout missing libraries and patron
  categories
- Try to add a new patron (memberentry.pl)
- Verify that the same messages are triggered
- Verify that messages disappear as appropriate as soon as a library and
  a patron category are defined.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Note: Filed Bug 17093 for JS error on patron entry form.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marc 2016-08-08 17:47:31 +02:00 committed by Kyle M Hall
parent c31213ba4f
commit 5dd9a2546a
3 changed files with 14 additions and 14 deletions

View file

@ -0,0 +1,11 @@
[% IF ( no_add ) %]
<div class="dialog alert">
<h3>Cannot add patron</h3>
[% IF ( no_branches ) %]
<p><strong>There are no libraries defined. </strong>[% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/branches.pl">Please add a library</a>.[% ELSE %]An administrator must define at least one library.[% END %]</p>
[% END %]
[% IF ( no_categories ) %]
<p><strong>There are no patron categories defined. </strong>[% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/categories.pl">Please add a patron category</a>.[% ELSE %]An administrator must define at least one patron category.[% END %]</p>
[% END %]
</div>
[% END %]

View file

@ -334,17 +334,8 @@ function filterByFirstLetterSurname(letter) {
[% END %]
[% INCLUDE 'patron-toolbar.inc' %]
[% IF ( no_add ) %]
<div class="dialog alert">
<h3>Cannot add patron</h3>
[% IF ( no_branches ) %]
<p>There are <strong>no libraries defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/branches.pl">add a library</a>.[% ELSE %]An administrator must define at least one library.[% END %]</p>
[% END %]
[% IF ( no_categories ) %]
<p>There are <strong>no patron categories defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/categories.pl">add a patron category</a>.[% ELSE %]An administrator must define at least one patron category.[% END %]</p>
[% END %]
</div>
[% END %]
[% INCLUDE 'noadd-warnings.inc' %]
<div class="browse">
Browse by last name:
[% FOREACH letter IN alphabet.split(' ') %]

View file

@ -125,9 +125,7 @@ $(document).ready(function() {
<div class="dialog message">Email has been sent.</div>
[% END %]
[% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
[% IF ( no_branches ) %]<p><strong>There are no libraries defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/branches.pl">Please add a library.</a>[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
[% IF ( no_categories ) %]<p><strong>There are no patron categories defined.</strong> [% IF ( CAN_user_parameters ) %]<a href="/cgi-bin/koha/admin/categories.pl">Please add a patron category.</a>[% ELSE %]An administrator must define at least one patron category.</p>[% END %][% END %]</div>[% END %]
[% INCLUDE 'noadd-warnings.inc' %]
[% UNLESS ( no_add ) %]
<h1>[% IF ( opadd ) %]Add[% ELSIF ( opduplicate ) %]Duplicate[% ELSE %] Modify[% END %] patron [% IF (firstname) %][% firstname %] [% END %][% IF (surname) %][% surname %] [% END %]([%IF ( categoryname ) %][% categoryname %][% ELSE %][% IF ( I ) %]Organization[% END %][% IF ( A ) %]Adult[% END %][% IF ( C ) %]Child[% END %][% IF ( P ) %]Professional[% END %][% IF ( S ) %]Staff[% END %][% END %])</h1>