@@ -, +, @@ to HTML customization - In the staff client, go to Tools -> HTML customizations and verify that the content from SelfCheckInMainUserBlock is now stored there. - The HTML customization entry form should offer SelfCheckInMainUserBlock as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Edit the SelfCheckInMainUserBlock HTML customization and add unique content to the "fr-FR" tab. - Log into the self check-in system and confirm that the SelfCheckInMainUserBlock content is shown there. - Switch to your updated translation and confirm that the content you added for your translation shows up correctly. - Go to Administration -> System preferences and search for "SelfCheckInMainUserBlock." It should return no results. --- ...kInMainUserBlock-to-additional-contents.pl | 32 +++++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 - .../admin/preferences/circulation.pref | 6 ---- .../en/modules/tools/additional-contents.tt | 2 +- .../bootstrap/en/modules/sci/sci-main.tt | 10 ++++-- 5 files changed, 40 insertions(+), 11 deletions(-) create mode 100755 installer/data/mysql/atomicupdate/bug-35063-move-SelfCheckInMainUserBlock-to-additional-contents.pl --- a/installer/data/mysql/atomicupdate/bug-35063-move-SelfCheckInMainUserBlock-to-additional-contents.pl +++ a/installer/data/mysql/atomicupdate/bug-35063-move-SelfCheckInMainUserBlock-to-additional-contents.pl @@ -0,0 +1,32 @@ +use Modern::Perl; + +return { + bug_number => "35063", + description => "Move SelfCheckInMainUserBlock to additional contents", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Get any existing value from the SelfCheckInMainUserBlock system preference + my ($scimainuserblock) = $dbh->selectrow_array( + q| + SELECT value FROM systempreferences WHERE variable='SelfCheckInMainUserBlock'; + | + ); + if ($scimainuserblock) { + + # Insert any values found from system preference into additional_contents + foreach my $lang ('default') { + $dbh->do( + "INSERT INTO additional_contents ( category, code, location, branchcode, title, content, lang, published_on ) VALUES ('html_customizations', 'SelfCheckInMainUserBlock', 'SelfCheckInMainUserBlock', NULL, ?, ?, ?, CAST(NOW() AS date) )", + undef, "SelfCheckInMainUserBlock $lang", + $scimainuserblock, $lang + ); + } + + # Remove old system preference + $dbh->do("DELETE FROM systempreferences WHERE variable='SelfCheckInMainUserBlock'"); + say $out "Bug 35063 update done"; + } + } + } --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -657,7 +657,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo'), ('SelfCheckAllowByIPRanges','',NULL,'(Leave blank if not used. Use ranges or simple ip addresses separated by spaces, like 192.168.1.1 192.168.0.0/24.)','Short'), ('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'), -('SelfCheckInMainUserBlock','','70|10','Add a block of HTML that will display on the self check-in screen.','Textarea'), ('SelfCheckInModule', 0, NULL, 'Enable the standalone self-checkin module.', 'YesNo'), ('SelfCheckInTimeout','120','','Define the number of seconds before the self check-in module times out.','Integer'), ('SelfCheckInUserCSS','',NULL,'Add CSS to be included in the self check-in module in an embedded