Bugzilla – Attachment 41264 Details for
Bug 8643
Add ability to mark some MARC tags and subfields as important and alert on saving the record if they are found to be empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Did I just make everyone happy =D?
Bug8643---Removed-all-uses-of-CGICheckbox-in-marcs.patch (text/plain), 7.66 KB, created by
Rémi Mayrand-Provencher
on 2015-07-31 12:51:19 UTC
(
hide
)
Description:
Did I just make everyone happy =D?
Filename:
MIME Type:
Creator:
Rémi Mayrand-Provencher
Created:
2015-07-31 12:51:19 UTC
Size:
7.66 KB
patch
obsolete
>From 0aac6a41482445ff4784d5a5465973710c044c65 Mon Sep 17 00:00:00 2001 >From: remi <remi.mayrand-provencher@inLibro.com> >Date: Fri, 31 Jul 2015 08:40:55 -0400 >Subject: [PATCH] Bug8643 - Removed all uses of CGI::Checkbox in > marc_subfields_structure.pl > >To test this patch : > >1) Apply all patches >2) Run ./installer/data/mysql/updatedatabase.pl >3) Go to More > Administration > MARC bibliographic framework > default framework ("MARC structure") >4) Search for tag 100 > Click subfields >5) Edit the "a" field and check the "reapeatable","mandatory","important" and "Is a URL" checkboxes >6) Click save an validate that the constraints for field "a" were modified properly. >--- > admin/marc_subfields_structure.pl | 45 ++------------------ > .../en/modules/admin/marc_subfields_structure.tt | 34 +++++++++++++-- > 2 files changed, 34 insertions(+), 45 deletions(-) > >diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl >index edfe91b..1e303d4 100755 >--- a/admin/marc_subfields_structure.pl >+++ b/admin/marc_subfields_structure.pl >@@ -196,7 +196,10 @@ if ( $op eq 'add_form' ) { > $row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} ); > $row_data{libopac} = CGI::escapeHTML( $data->{'libopac'} ); > $row_data{seealso} = CGI::escapeHTML( $data->{'seealso'} ); >+ $row_data{repeatable} = $data->{'repeatable'} ? 1 : 0; >+ $row_data{mandatory} = $data->{'mandatory'} ? 1 : 0; > $row_data{important} = $data->{'important'} ? 1 : 0; >+ $row_data{isurl} = $data->{'isurl'} ? 1 : 0; > $row_data{kohafield} = { > id => "kohafield$i", > values => \@kohafields, >@@ -217,28 +220,7 @@ if ( $op eq 'add_form' ) { > values => \@authtypes, > default => $data->{'authtypecode'}, > }; >- $row_data{repeatable} = CGI::checkbox( >- -name => "repeatable$i", >- -checked => $data->{'repeatable'} ? 'checked' : '', >- -value => 1, >- -label => '', >- -id => "repeatable$i" >- ); >- $row_data{mandatory} = CGI::checkbox( >- -name => "mandatory$i", >- -checked => $data->{'mandatory'} ? 'checked' : '', >- -value => 1, >- -label => '', >- -id => "mandatory$i" >- ); > $row_data{hidden} = CGI::escapeHTML( $data->{hidden} ); >- $row_data{isurl} = CGI::checkbox( >- -name => "isurl$i", >- -id => "isurl$i", >- -checked => $data->{'isurl'} ? 'checked' : '', >- -value => 1, >- -label => '' >- ); > $row_data{row} = $i; > $row_data{link} = CGI::escapeHTML( $data->{'link'} ); > push( @loop_data, \%row_data ); >@@ -268,27 +250,6 @@ if ( $op eq 'add_form' ) { > default => "$data->{'kohafield'}", > }; > $row_data{hidden} = ""; >- $row_data{repeatable} = CGI::checkbox( >- -name => "repeatable$i", >- -id => "repeatable$i", >- -checked => '', >- -value => 1, >- -label => '' >- ); >- $row_data{mandatory} = CGI::checkbox( >- -name => "mandatory$i", >- -id => "mandatory$i", >- -checked => '', >- -value => 1, >- -label => '' >- ); >- $row_data{isurl} = CGI::checkbox( >- -name => "isurl$i", >- -id => "isurl$i", >- -checked => '', >- -value => 1, >- -label => '' >- ); > $row_data{value_builder} = { > id => "value_builder$i", > values => \@value_builder, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >index 226c09b..b7303ca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt >@@ -227,8 +227,26 @@ function populateHiddenCheckboxes(tab) { > [% END %] > <li><label for="liblibrarian[% loo.row %]">Text for librarian: </label><input id="liblibrarian[% loo.row %]" type="text" name="liblibrarian" value="[% loo.liblibrarian %]" size="40" maxlength="80" /></li> > <li><label for="libopac[% loo.row %]">Text for OPAC: </label><input type="text" id="libopac[% loo.row %]" name="libopac" value="[% loo.libopac %]" size="40" maxlength="80" /></li> >- <li><label for="repeatable[% loo.row %]">Repeatable: </label>[% loo.repeatable %]</li> >- <li><label for="mandatory[% loo.row %]">Mandatory: </label>[% loo.mandatory %]</li> >+ <li> >+ <label for="repeatable[% loo.row %]"> Repeatable: </label> >+ <label> >+ [% IF loo.repeatable %] >+ <input id="repeatable[% loo.row %]" type="checkbox" value="1" name="repeatable[% loo.row %]" checked="checked"/> >+ [% ELSE %] >+ <input id="repeatable[% loo.row %]" type="checkbox" value="1" name="repeatable[% loo.row %]"/> >+ [% END %] >+ </label> >+ </li> >+ <li> >+ <label for="mandatory[% loo.row %]"> Mandatory: </label> >+ <label> >+ [% IF loo.mandatory %] >+ <input id="mandatory[% loo.row %]" type="checkbox" value="1" name="mandatory[% loo.row %]" checked="checked"/> >+ [% ELSE %] >+ <input id="mandatory[% loo.row %]" type="checkbox" value="1" name="mandatory[% loo.row %]"/> >+ [% END %] >+ </label> >+ </li> > <li> > <label for="important[% loo.row %]"> Important: </label> > <label> >@@ -285,7 +303,17 @@ function populateHiddenCheckboxes(tab) { > <input type="checkbox" id="hidden_flagged_[% loo.row %]" name="flagged_[% loo.row %]"/> > <label for="hidden_flagged_[% loo.row %]" style="float: none;">Flagged</label> > </li> >- <li><label for="isurl[% loo.row %]">Is a URL:</label>[% loo.isurl %] (if checked, it means that the subfield is a URL and can be clicked)</li> >+ <li> >+ <label for="isurl[% loo.row %]"> Is a URL: </label> >+ <label> >+ [% IF loo.isurl %] >+ <input id="isurl[% loo.row %]" type="checkbox" value="1" name="isurl[% loo.row %]" checked="checked"/> >+ [% ELSE %] >+ <input id="isurl[% loo.row %]" type="checkbox" value="1" name="isurl[% loo.row %]"/> >+ [% END %] >+ </label> >+ (if checked, it means that the subfield is a URL and can be clicked) >+ </li> > <li><label for="link[% loo.row %]">Link:</label><input type="text" id="link[% loo.row %]" name="link" value="[% loo.link %]" size="10" maxlength="80" /> (e.g., Title or Local-Number) <span class="error"><em>NOTE: If you change this value you must ask your administrator to run misc/batchRebuildBiblioTables.pl.</em></span></li> > <li> > <label for="kohafield[% loo.row %]">Koha link:</label> >-- >1.7.9.5
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 8643
:
11621
|
11622
|
30640
|
31032
|
40232
|
40237
|
41259
|
41261
|
41264
|
41265
|
45834
|
45835
|
45836
|
45837
|
60554
|
60555
|
65148
|
65149
|
65682
|
72154
|
72155
|
72156
|
72157
|
73591
|
73808
|
73809
|
73810
|
73811
|
73812
|
73813
|
73814
|
73815
|
73816
|
73817
|
73818
|
74267
|
74268
|
74269
|
74270
|
74271
|
74272
|
74273
|
81032
|
85982
|
91537
|
92081
|
92384
|
96625
|
96627
|
97325
|
97326
|
98607
|
98608
|
98702
|
98703
|
98712