Bug 4078: Add the checkbox to the UI
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 1 Feb 2018 17:31:25 +0000 (14:31 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Mar 2018 14:45:38 +0000 (11:45 -0300)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
admin/currency.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt

index 1719498..4305454 100755 (executable)
@@ -57,6 +57,7 @@ if ( $op eq 'add_form' ) {
     my $isocode       = $input->param('isocode');
     my $rate          = $input->param('rate');
     my $active        = $input->param('active');
+    my $p_sep_by_space = $input->param('p_sep_by_space');
     my $is_a_modif    = $input->param('is_a_modif');
 
     if ($is_a_modif) {
@@ -65,6 +66,7 @@ if ( $op eq 'add_form' ) {
         $currency->isocode($isocode);
         $currency->rate($rate);
         $currency->active($active);
+        $currency->p_sep_by_space($p_sep_by_space);
         eval { $currency->store; };
         if ($@) {
             push @messages, { type => 'error', code => 'error_on_update' };
@@ -78,6 +80,7 @@ if ( $op eq 'add_form' ) {
                 isocode  => $isocode,
                 rate     => $rate,
                 active   => $active,
+                p_sep_by_space => $p_sep_by_space,
             }
         );
         eval { $currency->store; };
index 6441f95..94d3480 100644 (file)
             <li>
                 <span class="label">Last updated: </span>[% currency.timestamp | $KohaDates %]
             </li>
+            <li>
+                <label for="p_sep_by_space">Space separation between symbol and value: </label>
+                [% IF currency.p_sep_by_space %]
+                    <input type="checkbox" id="p_sep_by_space" name="p_sep_by_space" value="1" checked="checked" />
+                [% ELSE %]
+                    <input type="checkbox" id="p_sep_by_space" name="p_sep_by_space" value="1" />
+                [% END %]
+            </li>
             <li>
                 <label for="active">Active: </label>
                 [% IF currency.active %]