From e1bbff6b7f9db37714fcdb69b03598600e222237 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 26 Aug 2011 10:54:07 -0400 Subject: [PATCH] Fix for Bug 6458 - incorrect parsing result in translation processing / patron-attr-types Correction for patron-attr-types.tt stops tag attribute markup from being passed to the template directly in favor of using template logic. Signed-off-by: Katrin Fischer Read the patch and tested the page, didn't find any problems. Signed-off-by: Chris Cormack --- admin/patron-attr-types.pl | 24 +++++----- .../en/modules/admin/patron-attr-types.tt | 46 +++++++++++++++++-- 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index 1dfe442a60..227213cda8 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -92,19 +92,19 @@ sub error_add_attribute_type_form { $template->param(description => $input->param('description')); if ($input->param('repeatable')) { - $template->param(repeatable_checked => 'checked="checked"'); + $template->param(repeatable_checked => 1); } if ($input->param('unique_id')) { - $template->param(unique_id_checked => 'checked="checked"'); + $template->param(unique_id_checked => 1); } if ($input->param('password_allowed')) { - $template->param(password_allowed_checked => 'checked="checked"'); + $template->param(password_allowed_checked => 1); } if ($input->param('opac_display')) { - $template->param(opac_display_checked => 'checked="checked"'); + $template->param(opac_display_checked => 1); } if ($input->param('staff_searchable')) { - $template->param(staff_searchable_checked => 'checked="checked"'); + $template->param(staff_searchable_checked => 1); } $template->param( @@ -206,21 +206,21 @@ sub edit_attribute_type_form { $template->param(description => $attr_type->description()); if ($attr_type->repeatable()) { - $template->param(repeatable_checked => 'checked="checked"'); + $template->param(repeatable_checked => 1); } - $template->param(repeatable_disabled => 'disabled="disabled"'); + $template->param(repeatable_disabled => 1); if ($attr_type->unique_id()) { - $template->param(unique_id_checked => 'checked="checked"'); + $template->param(unique_id_checked => 1); } - $template->param(unique_id_disabled => 'disabled="disabled"'); + $template->param(unique_id_disabled => 1); if ($attr_type->password_allowed()) { - $template->param(password_allowed_checked => 'checked="checked"'); + $template->param(password_allowed_checked => 1); } if ($attr_type->opac_display()) { - $template->param(opac_display_checked => 'checked="checked"'); + $template->param(opac_display_checked => 1); } if ($attr_type->staff_searchable()) { - $template->param(staff_searchable_checked => 'checked="checked"'); + $template->param(staff_searchable_checked => 1); } authorised_value_category_list($template, $attr_type->authorised_value_category()); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt index 105d268826..c42d7b3ec6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt @@ -101,25 +101,61 @@ function CheckAttributeTypeForm(f) { value="[% description |html %]" />
  • - + [% IF ( repeatable_checked ) %] + [% IF ( repeatable_disabled ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF ( repeatable_disabled ) %] + + [% ELSE %] + + [% END %] + [% END %] Check to let a patron record have multiple values of this attribute. This setting cannot be changed after an attribute is defined.
  • - + [% IF ( unique_id_checked ) %] + [% IF ( unique_id_disabled ) %] + + [% ELSE %] + + [% END %] + [% ELSE %] + [% IF ( unique_id_disabled ) %] + + [% ELSE %] + + [% END %] + [% END %] If checked, attribute will be a unique identifier — if a value is given to a patron record, the same value cannot be given to a different record. This setting cannot be changed after an attribute is defined.
  • - + [% IF ( password_allowed_checked ) %] + + [% ELSE %] + + [% END %] Check to make it possible to associate a password with this attribute.
  • - + [% IF ( opac_display_checked ) %] + + [% ELSE %] + + [% END %] Check to display this attribute on a patron's details page in the OPAC.
  • - + [% IF ( staff_searchable_checked ) %] + + [% ELSE %] + + [% END %] Check to make this attribute staff_searchable in the staff patron search.
  • -- 2.39.5