Bugzilla – Attachment 39442 Details for
Bug 12176
Remove HTML from additem.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12176: Fix for missing field_value in select
Bug-12176-Fix-for-missing-fieldvalue-in-select.patch (text/plain), 3.46 KB, created by
Marcel de Rooy
on 2015-05-23 12:05:24 UTC
(
hide
)
Description:
Bug 12176: Fix for missing field_value in select
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-05-23 12:05:24 UTC
Size:
3.46 KB
patch
obsolete
>From 69bfcdb55aab9a72fda7adc992b3c5b67fec0836 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Sat, 23 May 2015 14:01:57 +0200 >Subject: [PATCH] Bug 12176: Fix for missing field_value in select >Content-Type: text/plain; charset=utf-8 > >As Jonathan Druart discovered, we were still missing an important attribute >in the selects. Var mv.name was not filled, so the name was empty with nice >side-effects :) >While fixing this, it was also possible to delete some unused vars that Bernardo >already mentioned before: $attributes and $attributes_no_value. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > cataloguing/additem.pl | 12 ------------ > .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 4 ++-- > 2 files changed, 2 insertions(+), 14 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 8a800e1..38f5d92 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -154,7 +154,6 @@ sub generate_subfield_form { > my $input = new CGI; > $value = $input->param('barcode'); > } >- my $attributes_no_value = qq(id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$subfield_data{maxlength}" ); > > # Getting list of subfields to keep when restricted editing is enabled > my $subfieldsToAllowForRestrictedEditing = C4::Context->preference('SubfieldsToAllowForRestrictedEditing'); >@@ -164,17 +163,6 @@ sub generate_subfield_form { > ) ? 1 : 0; > my @subfieldsToAllow = split(/ /, $subfieldsToAllowForRestrictedEditing); > >- # If we're on restricted editing, and our field is not in the list of subfields to allow, >- # then it is read-only >- $attributes_no_value .= 'readonly="readonly" ' >- if ( >- not $allowAllSubfields >- and $restrictededition >- and !grep { $tag . '$' . $subfieldtag eq $_ } @subfieldsToAllow >- ); >- >- my $attributes = qq($attributes_no_value value="$value" ); >- > if ( $subfieldlib->{authorised_value} ) { > my @authorised_values; > my %authorised_lib; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >index b6eedf6..8c4f419 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt >@@ -231,9 +231,9 @@ $(document).ready(function() { > <input type="hidden" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="[%- mv.maxlength -%]" value="[%- mv.value -%]"> > [% ELSIF ( mv.type == 'select' ) %] > [% IF ( mv.readonlyselect ) %] >- <select name="[%- mv.name -%]" id="[%- mv.id -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled"> >+ <select name="field_value" id="[%- mv.id -%]" size="1" class="input_marceditor" readonly="readonly" disabled="disabled"> > [% ELSE %] >- <select name="[%- mv.name -%]" id="[%- mv.id -%]" size="1" class="input_marceditor"> >+ <select name="field_value" id="[%- mv.id -%]" size="1" class="input_marceditor"> > [% END %] > [% FOREACH aval IN mv.values %] > [% IF aval == mv.default %] >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12176
:
27927
|
30270
|
30975
|
31138
|
39303
|
39345
|
39346
|
39347
|
39348
|
39442
|
39450
|
39451
|
39452
|
39503
|
39513
|
39516
|
39517
|
39518
|
39519
|
39520