Bugzilla – Attachment 87039 Details for
Bug 18645
Creation of Koha feature release change tool displayed after running Koha update
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18645: (follow-up) Making feature release tool work with all syspref types
Bug-18645-follow-up-Making-feature-release-tool-wo.patch (text/plain), 31.74 KB, created by
Aleisha Amohia
on 2019-03-26 22:04:07 UTC
(
hide
)
Description:
Bug 18645: (follow-up) Making feature release tool work with all syspref types
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2019-03-26 22:04:07 UTC
Size:
31.74 KB
patch
obsolete
>From a85f89276ad376424d8641d035d29ec5f7b59c31 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 26 Mar 2019 22:04:14 +0000 >Subject: [PATCH] Bug 18645: (follow-up) Making feature release tool work with > all syspref types > >This patch is a work in progress. I've separated the template code into >an include for the preferences page and feature release page. Am now >working on making the feature release perl code work with this template. > >Struggling to avoid duplicating code. If anyone has a suggestion on a >good way to use essentially all the methods in admin/preferences.pl >again in installer/featurereleasetool.pl without repeating them, I'd >appreciate hearing them. > >Sponsored-by: Catalyst IT >--- > admin/preferences.pl | 78 ++++++++++----------- > installer/featurereleasetool.pl | 80 ++++++++++++++++------ > .../intranet-tmpl/prog/en/includes/prefs-rows.inc | 74 ++++++++++++++++++++ > .../prog/en/modules/admin/preferences.tt | 69 +------------------ > .../en/modules/installer/featurereleasetool.tt | 65 ++---------------- > 5 files changed, 180 insertions(+), 186 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/prefs-rows.inc > >diff --git a/admin/preferences.pl b/admin/preferences.pl >index 8a00260..a30d797 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -18,6 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >+use Data::Dumper; > > use CGI qw ( -utf8 ); > use C4::Auth; >@@ -57,21 +58,21 @@ sub GetTab { > } > > sub _get_chunk { >- my ( $value, %options ) = @_; >+ my ( $value, %options ) = @_; > >- my $name = $options{'pref'}; >- my $chunk = { name => $name, value => $value, type => $options{'type'} || 'input', class => $options{'class'} }; >+ my $name = $options{'pref'}; >+ my $chunk = { name => $name, value => $value, type => $options{'type'} || 'input', class => $options{'class'} }; > >- if ( $options{'class'} && $options{'class'} eq 'password' ) { >- $chunk->{'input_type'} = 'password'; >- } elsif ( $options{'class'} && $options{'class'} eq 'date' ) { >- $chunk->{'dateinput'} = 1; >- } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { >- my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) }; >+ if ( $options{'class'} && $options{'class'} eq 'password' ) { >+ $chunk->{'input_type'} = 'password'; >+ } elsif ( $options{'class'} && $options{'class'} eq 'date' ) { >+ $chunk->{'dateinput'} = 1; >+ } elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { >+ my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) }; > >- my $theme; >- my $interface; >- if ( $options{'type'} eq 'opac-languages' ) { >+ my $theme; >+ my $interface; >+ if ( $options{'type'} eq 'opac-languages' ) { > # this is the OPAC > $interface = 'opac'; > $theme = C4::Context->preference('opacthemes'); >@@ -80,7 +81,7 @@ sub _get_chunk { > $interface = 'intranet'; > $theme = C4::Context->preference('template'); > } >- $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, $lang, $current_languages ); >+ $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, undef, $current_languages ); > $chunk->{'type'} = 'languages'; > } elsif ( $options{ 'choices' } ) { > if ( $options{'choices'} && ref( $options{ 'choices' } ) eq '' ) { >@@ -99,32 +100,32 @@ sub _get_chunk { > $value ||= 0; > > $chunk->{'type'} = 'select'; >- $chunk->{'CHOICES'} = [ >- sort { $a->{'text'} cmp $b->{'text'} } >- map { { text => $options{'choices'}->{$_}, value => $_, selected => ( $_ eq $value || ( $_ eq '' && ( $value eq '0' || !$value ) ) ) } } >- keys %{ $options{'choices'} } >- ]; >- } elsif ( $options{'multiple'} ) { >- my @values; >- @values = split /,/, $value if defined($value); >- $chunk->{type} = 'multiple'; >- $chunk->{CHOICES} = [ >- sort { $a->{'text'} cmp $b->{'text'} } >- map { >- my $option_value = $_; >- { >- text => $options{multiple}->{$option_value}, >- value => $option_value, >- selected => (grep /^$option_value$/, @values) ? 1 : 0, >- } >- } >- keys %{ $options{multiple} } >- ]; >- } >+ $chunk->{'CHOICES'} = [ >+ sort { $a->{'text'} cmp $b->{'text'} } >+ map { { text => $options{'choices'}->{$_}, value => $_, selected => ( $_ eq $value || ( $_ eq '' && ( $value eq '0' || !$value ) ) ) } } >+ keys %{ $options{'choices'} } >+ ]; >+ } elsif ( $options{'multiple'} ) { >+ my @values; >+ @values = split /,/, $value if defined($value); >+ $chunk->{type} = 'multiple'; >+ $chunk->{CHOICES} = [ >+ sort { $a->{'text'} cmp $b->{'text'} } >+ map { >+ my $option_value = $_; >+ { >+ text => $options{multiple}->{$option_value}, >+ value => $option_value, >+ selected => (grep /^$option_value$/, @values) ? 1 : 0, >+ } >+ } >+ keys %{ $options{multiple} } >+ ]; >+ } > > $chunk->{ 'type_' . $chunk->{'type'} } = 1; > >- return $chunk; >+ return $chunk; > } > > sub TransformPrefsToHTML { >@@ -149,6 +150,7 @@ sub TransformPrefsToHTML { > } > > foreach my $line ( @{ $tab->{ $group } } ) { >+ warn Dumper($line); > my @chunks; > my @names; > >@@ -164,8 +166,7 @@ sub TransformPrefsToHTML { > } else { > $value = $row->{'value'}; > } >- my $source = "preferences"; >- my $chunk = _get_chunk( $value, $source, %$piece ); >+ my $chunk = _get_chunk( $value, %$piece ); > > # No highlighting of inputs yet, but would be useful > $chunk->{'highlighted'} = 1 if ( $searchfield && $name =~ /^$searchfield$/i ); >@@ -225,7 +226,6 @@ sub SearchPrefs { > my ( $input, $searchfield ) = @_; > my @tabs; > >- warn $input, $searchfield; > my %tab_files = _get_pref_files( $input ); > our @terms = split( /\s+/, $searchfield ); > >diff --git a/installer/featurereleasetool.pl b/installer/featurereleasetool.pl >index f5e4ccb..19c129f 100755 >--- a/installer/featurereleasetool.pl >+++ b/installer/featurereleasetool.pl >@@ -106,30 +106,70 @@ my @prefsloop; > my @lines = split /\n/, $file; > foreach my $line (@lines) { > my $query = qq| >- SELECT variable, value, options, display_choices, explanation, type from systempreferences WHERE version= ? |; >+ SELECT variable, value, options, explanation, type from systempreferences WHERE version= ? |; > my $sth = $dbh->prepare($query); > $sth->execute($line); >- while (my ($variable, $value, $options, $display_choices, $explanation, $type) = $sth->fetchrow) { >- if ($options) { >- push @prefsloop, { >- variable => $variable, >- value => $value, >- options => $options, >- explanation => $explanation, >- type => $type, >- display_choices => $display_choices, >- }; >- } else { >- push @prefsloop, { >- variable => $variable, >- value => $value, >- explanation => $explanation, >- type => $type, >- display_choices => $display_choices, >- }; >+ >+ while (my ($variable, $value, $options, $explanation, $type) = $sth->fetchrow) { >+ my $chunk = { name => $variable, value => $value, options => $options, explanation => $explanation, type => $type || 'input' }; >+ if ( $chunk->{'name'} eq 'opaclanguages' || $chunk->{'name'} eq 'language' ) ) { >+ my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) }; >+ >+ my $theme; >+ my $interface; >+ if ( $chunk{'name'} eq 'opaclanguages' ) { >+ # this is the OPAC >+ $interface = 'opac'; >+ $theme = C4::Context->preference('opacthemes'); >+ } else { >+ # this is the staff client >+ $interface = 'intranet'; >+ $theme = C4::Context->preference('template'); >+ } >+ $chunk->{'languages'} = getTranslatedLanguages( $interface, $theme, undef, $current_languages ); >+ $chunk->{'type'} = 'languages'; >+ } elsif ( $chunk->{'type'} eq 'Choice' ) { >+ if ( $chunk->{'name'} eq 'DefaultClassificationSource' ) { >+ my $sources = GetClassSources(); >+ $chunk->{'options'} = { map { $_ => $sources->{$_}->{'description'} } keys %$sources }; >+ } elsif ( $chunk->{'name'} eq 'opacthemes' ) { >+ $chunk->{'options'} = { map { $_ => $_ } getallthemes( 'opac' ) } >+ } elsif ( $chunk->{'name'} eq 'template' ) { >+ $chunk->{'choices'} = { map { $_ => $_ } getallthemes( 'intranet' ) } >+ } else { >+ die 'Unrecognized source of preference values: ' . $options{'choices'}; >+ } >+ >+ $value ||= 0; >+ >+ $chunk->{'type'} = 'select'; >+ $chunk->{'CHOICES'} = [ >+ sort { $a->{'text'} cmp $b->{'text'} } >+ map { { text => $chunk->{'options'}->{$_}, value => $_, selected => ( $_ eq $value || ( $_ eq '' && ( $value eq '0' || !$value ) ) ) } } >+ keys %{ $chunk{'options'} } >+ ]; >+ } elsif ( $chunk->{'type'} eq 'multiple' ) { >+ my @values; >+ @values = split /,/, $value if defined($value); >+ $chunk->{CHOICES} = [ >+ sort { $a->{'text'} cmp $b->{'text'} } >+ map { >+ my $option_value = $_; >+ { >+ #FIXME: text => $options{multiple}->{$option_value}, >+ value => $option_value, >+ selected => (grep /^$option_value$/, @values) ? 1 : 0, >+ } >+ } >+ #FIXME: keys %{ $options{multiple} } >+ ]; > } >+ >+ $chunk->{ 'type_' . $chunk->{'type'} } = 1; >+ >+ push @prefsloop, $chunk; > } >-}; >+} > > $template->param( prefs => \@prefsloop, submitted_form => $op ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-rows.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-rows.inc >new file mode 100644 >index 0000000..8256041 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-rows.inc >@@ -0,0 +1,74 @@ >+[% IF ( pref.type_text ) %] >+ [% pref.contents | $raw %] >+[% ELSIF ( pref.type_input ) %] >+ [% IF ( pref.input_type ) %] >+ <input type="[% pref.input_type | html %]" name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]" class="preference preference-[% pref.class or "short" | html %]" value="[% pref.value | html %]" autocomplete="off"/> [% IF ( pref.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %] >+ [% ELSE %] >+ <input type="text" name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]" class="preference preference-[% pref.class or "short" | html %]" value="[% pref.value | html %]" autocomplete="off"/> [% IF ( pref.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %] >+ [% END %] >+[% ELSIF ( pref.type_select ) %] >+ <select name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]" class="preference preference-[% pref.class or "choice" | html %]"> >+ [% FOREACH choice IN pref.CHOICES.sort('value') %] >+ [% IF ( choice.selected ) %] >+ <option value="[% choice.value | html %]" selected="selected"> >+ [% ELSE %] >+ <option value="[% choice.value | html %]"> >+ [% END %] >+ [% choice.text | html %]</option> >+ [% END %] >+ </select> >+[% ELSIF ( pref.type_multiple ) %] >+ <select name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]" class="preference preference-[% pref.class or "choice" | html %]" multiple="multiple"> >+ [% FOREACH choice IN pref.CHOICES %] >+ [% IF ( choice.selected ) %] >+ <option value="[% choice.value | html %]" selected="selected"> >+ [% ELSE %] >+ <option value="[% choice.value | html %]"> >+ [% END %] >+ [% choice.text | html %]</option> >+ [% END %] >+ </select> >+[% ELSIF ( pref.type_textarea ) || ( pref.type_htmlarea )%] >+ [% IF ( pref.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] >+ <textarea name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]" class="preference preference-[% pref.class or "short" | html %] mce" rows="20" cols="60">[% pref.value | html %]</textarea> >+ [% ELSE %] >+ <a class="expand-textarea" style="display: none" href="#">Click to Edit</a><textarea name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]" class="preference preference-[% pref.class or "short" | html %]" rows="10" cols="40">[% pref.value | html %]</textarea><a class="collapse-textarea" style="display:none" href="#">Click to collapse</br></a> >+ [% END %] >+[% ELSIF ( pref.type_languages ) %] >+ <ul class="sortable"> >+ [% FOREACH language IN pref.languages %] >+ [% IF ( language.plural ) %] >+ <li> >+ [% IF ( language.native_description ) %] >+ [% language.native_description | html %] >+ [% ELSE %] >+ [% language.rfc4646_subtag | html %] >+ [% END %] >+ [% IF language.sublanguages_loop.size > 0 %] >+ <ul> >+ [% FOREACH sublanguages_loo IN language.sublanguages_loop %] >+ <li> >+ <label for="pref_[% pref.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]([% sublanguages_loo.rfc4646_subtag | html %])</label> >+ [% IF ( sublanguages_loo.enabled ) %] >+ <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/> >+ [% ELSE %] >+ <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/> >+ [% END %] >+ </li> >+ [% END # FOREACH sublanguages %] >+ </ul> >+ [% END %] >+ </li> >+ [% ELSE %] >+ <li> >+ <label for="pref_[% pref.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label> >+ [% IF ( language.group_enabled ) %] >+ <input value="[% language.rfc4646_subtag | html %]" name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/> >+ [% ELSE %] >+ <input value="[% language.rfc4646_subtag | html %]" name="pref_[% pref.name | html %]" id="pref_[% pref.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/> >+ [% END %] >+ </li> >+ [% END # IF language.plural %] >+ [% END # FOREACH language %] >+ </ul> <!-- / ul.sortable --> >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >index 43e892f..869b933 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt >@@ -74,73 +74,8 @@ > </code> > </td> > <td><div> >- [% FOREACH CHUNK IN LINE.CHUNKS %] >- [% IF ( CHUNK.type_text ) %] >- [% CHUNK.contents | $raw %] >- [% ELSIF ( CHUNK.type_input ) %] >- <input type="[%IF CHUNK.input_type %][% CHUNK.input_type | html %][% ELSE %]text[% END %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %]" value="[% CHUNK.value | html %]" autocomplete="off" /> [% IF ( CHUNK.dateinput ) %]<span class="hint">[% INCLUDE 'date-format.inc' %]</span>[% END %] >- [% ELSIF ( CHUNK.type_select ) %] >- <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]"> >- [% FOREACH CHOICE IN CHUNK.CHOICES.sort('value') %] >- [% IF ( CHOICE.selected ) %] >- <option value="[% CHOICE.value | html %]" selected="selected"> >- [% ELSE %] >- <option value="[% CHOICE.value | html %]"> >- [% END %] >- [% CHOICE.text | html %] >- </option> >- [% END %] >- </select> >- [% ELSIF ( CHUNK.type_multiple ) %] >- <select name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "choice" | html %]" multiple="multiple"> >- [% FOREACH CHOICE IN CHUNK.CHOICES %][% IF ( CHOICE.selected ) %]<option value="[% CHOICE.value | html %]" selected="selected">[% ELSE %]<option value="[% CHOICE.value | html %]">[% END %][% CHOICE.text | html %]</option>[% END %] >- </select> >- [% ELSIF ( CHUNK.type_textarea ) || ( CHUNK.type_htmlarea )%] >- [% IF ( CHUNK.type_htmlarea ) && ( Koha.Preference('UseWYSIWYGinSystemPreferences') ) %] >- <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %] mce" rows="20" cols="60">[% CHUNK.value | html %]</textarea> >- [% ELSE %] >- <a class="expand-textarea" style="display: none" href="#">Click to Edit</a> >- <textarea name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]" class="preference preference-[% CHUNK.class or "short" | html %]" rows="10" cols="40">[% CHUNK.value | html %]</textarea> >- <a class="collapse-textarea" style="display:none" href="#">Click to collapse</br></a> >- [% END %] >- [% ELSIF ( CHUNK.type_languages ) %] >- <ul class="sortable"> >- [% FOREACH language IN CHUNK.languages %] >- [% IF ( language.plural ) %] >- <li> >- [% IF ( language.native_description ) %] >- [% language.native_description | html %] >- [% ELSE %] >- [% language.rfc4646_subtag | html %] >- [% END %] >- [% IF language.sublanguages_loop.size > 0 %] >- <ul> >- [% FOREACH sublanguages_loo IN language.sublanguages_loop %] >- <li> >- <label for="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]">[% sublanguages_loo.native_description | html %] [% sublanguages_loo.script_description | html %] [% sublanguages_loo.region_description | html %] [% sublanguages_loo.variant_description | html %]([% sublanguages_loo.rfc4646_subtag | html %])</label> >- [% IF ( sublanguages_loo.enabled ) %] >- <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/> >- [% ELSE %] >- <input value="[% sublanguages_loo.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% sublanguages_loo.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/> >- [% END %] >- </li> >- [% END # FOREACH sublanguages %] >- </ul> >- [% END %] >- </li> >- [% ELSE %] >- <li> >- <label for="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]">[% language.native_description | html %] ([% language.rfc4646_subtag | html %])</label> >- [% IF ( language.group_enabled ) %] >- <input value="[% language.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" checked="checked" class="preference preference-checkbox"/> >- [% ELSE %] >- <input value="[% language.rfc4646_subtag | html %]" name="pref_[% CHUNK.name | html %]" id="pref_[% CHUNK.name | html %]_[% language.rfc4646_subtag | html %]" type="checkbox" class="preference preference-checkbox"/> >- [% END %] >- </li> >- [% END # IF language.plural %] >- [% END # FOREACH language %] >- </ul> <!-- / ul.sortable --> >- [% END %] >+ [% FOREACH pref IN LINE.CHUNKS %] >+ [% INCLUDE 'prefs-rows.inc' %] > [% END %] > </div></td> > </tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt >index e51bace..4984865 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/featurereleasetool.tt >@@ -87,78 +87,23 @@ td, th { > <div id="installer-step3" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> > <h1 id="logo"><a href="#">Koha</a></h1> > <div class="tab"> >- <button onclick="openInfoTab(event, 'syspref')"> New Syspref information</button> >- <button class="tablinks" onclick="openInfoTab(event, 'releasenotes')"> Release notes</button> >+ <button onclick="openInfoTab(event, 'syspref')">New system preferences</button> >+ <button class="tablinks" onclick="openInfoTab(event, 'releasenotes')">Release notes</button> > </div> > > <div id="syspref" class="content"> >- <h2>New sysprefs added to Koha since Koha [% dbversion %]</h2> >+ <h2>New system preferences added to Koha since Koha [% dbversion %]</h2> > <div class="prefs-tab"> > <p> The system preferences listed below were all installed in the update from Koha [% dbversion %] to Koha [% kohaversion %]. The default values of each of the system preferences are displayed for you to review and modify and submit by selecting the 'Save all preferences' button </p> >- <form name="featurereleaseform" action="/cgi-bin/koha/installer/featurereleasetool.pl?dbversion=[%dbversion%]&kohaversion=[%kohaversion%]" method="post"> >+ <form name="featurereleaseform" action="/cgi-bin/koha/installer/featurereleasetool.pl?dbversion=[% dbversion %]&kohaversion=[% kohaversion %]" method="post"> > <input type="hidden" name="op" value="save" /> > <table id="releasetoolpreftable"> > <tr> > <th class="preftitle">Preference</th> >- <th class="preftitle"> Description</th> > <th class="preftitle">Value</th> > </tr> > [% FOREACH pref IN prefs %] >- <tr> >- <td> >- <input type="hidden" name="pref_[% pref.variable %]" id="pref_[% pref.variable %]" value="[% pref.variable %]"/> >- [% pref.variable %] >- </td> >- <td> >- [% pref.explanation %] >- </td> >- <td> >- [% IF (pref.value != '') %] >- [% IF (pref.type == "Integer") || (pref.type == "integer" ) || (pref.type == "Free") %] >- <input type="text" class="pref_text_input" name="pref_[% pref.variable %]" value="[% pref.value %]"> >- [% ELSIF (pref.type == "Choice") %] >- <select name="pref_[% pref.variable %]" class="pref_choice_input"> >- [% option_value = pref.options.split("\\|") %] >- [% option_text = pref.display_choices.split("\\|") %] >- [% IF pref.value == option_value.0 %] >- <option value="[% option_value.0 %]" selected="selected">[% option_text.0 %] </option> >- <option value="[% option_value.1 %]">[% option_text.1 %] </option> >- <option value="[% option_value.2 %]">[% option_text.2 %] </option> >- <option value="[% option_value.3 %]">[% option_text.3 %] </option> >- [% ELSIF pref.value == option_value.1 %] >- <option value="[% option_value.0 %]">[% option_text.0 %] </option> >- <option value="[% option_value.1 %]" selected="selected">[% option_text.1 %] </option> >- <option value="[% option_value.2 %]">[% option_text.2 %] </option> >- <option value="[% option_value.3 %]">[% option_text.3 %] </option> >- [% ELSIF pref.value == option_value.2 %] >- <option value="[% option_value.0 %]">[% option_text.0 %] </option> >- <option value="[% option_value.1 %]">[% option_text.1 %] </option> >- <option value="[% option_value.2 %]" selected="selected">[% option_text.2 %] </option> >- <option value="[% option_value.3 %]">[% option_text.3 %] </option> >- [% ELSIF pref.value == option_value.3 %] >- <option value="[% option_value.0 %]">[% option_text.0 %] </option> >- <option value="[% option_value.1 %]">[% option_text.1 %] </option> >- <option value="[% option_value.2 %]">[% option_text.2 %] </option> >- <option value="[% option_value.3 %]" selected="selected">[% option_text.3 %] </option> >- [% END %] >- </select> >- [% ELSIF (pref.type == "YesNo") %] >- <select id="pref_[% pref.variable %]" class="pref_binary_input" name="pref_[% pref.variable %]"> >- [% option_text = pref.display_choices.split("\\|") %] >- [% IF pref.value == 1 %] >- <option value=1 selected="selected"> [% IF option_text %] [% option_text.1 %] [% ELSE %] Yes [% END %]</option> >- <option value=0> [% IF option_text %] [% option_text.0 %] [% ELSE %] No [% END %] </option> >- [% ELSE %] >- <option value=0 selected="selected"> [% IF option_text %] [% option_text.0 %] [% ELSE %] No [% END %]</option> >- <option value=1> [% IF option_text %] [% option_text.1 %] [% ELSE %] Yes [% END %]</option> >- [% END %] >- </select> >- [% END %] >- [% ELSE %] >- No default value >- [% END %] >- </td> >- </tr> >+ [% INCLUDE 'prefs-rows.inc' %] > [% END %] > </table> > [% IF !(submitted_form) %] >-- >2.1.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 18645
:
68150
|
68151
|
68152
|
68153
|
68154
|
69470
|
69471
|
86420
| 87039