Bug 9314: Remove useless code related to the type_only parameter
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 8 Apr 2015 11:29:28 +0000 (13:29 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 11 Jun 2015 13:09:55 +0000 (10:09 -0300)
Since the pref AddPatronLists has been removed in bug 13497, the code
related to type_only and category_type in memberentry.pl is useless.

Test plan:
Confirm you don't the information message.
You can also confirm that the message was wrong and nothing was saved.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Dead code removed, no errors

Think that bug description can be updated to commit message

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
members/memberentry.pl

index 82025f6..1296a9c 100644 (file)
     </script>
     [% END %]
     <input type="hidden" name="setting_messaging_prefs" value="1" />
-    [% IF type_only %]
-        <p>If no preferences are selected, the default preferences for the category chosen will be applied on save, otherwise your selection here is saved</p>
-    [% END %]
     [% INCLUDE 'messaging-preference-form.inc' %]
     [% IF ( SMSSendDriver ) %]
         <p><label for="SMSnumber">SMS number:</label>
index 967ebd1..8beecec 100755 (executable)
@@ -148,16 +148,12 @@ $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 );
 ( $borrower_data = GetMember( 'borrowernumber' => $borrowernumber ) ) if ( $op eq 'modify' or $op eq 'save' or $op eq 'duplicate' );
 my $categorycode  = $input->param('categorycode') || $borrower_data->{'categorycode'};
 my $category_type = $input->param('category_type') || '';
-if ($category_type){
-    $template->{VARS}->{'type_only'} = 1;
-}
-my $new_c_type = $category_type; #if we have input param, then we've already chosen the cat_type.
 unless ($category_type or !($categorycode)){
     my $borrowercategory = GetBorrowercategory($categorycode);
     $category_type    = $borrowercategory->{'category_type'};
     my $category_name = $borrowercategory->{'description'}; 
     $template->param("categoryname"=>$category_name);
- }
+}
 $category_type="A" unless $category_type; # FIXME we should display a error message instead of a 500 error !
 
 # if a add or modify is requested => check validity of data.