| Lines 49-55
          use C4::Context;
      
      
        Link Here | 
        
          | 49 | use C4::Output qw( output_html_with_http_headers ); | 49 | use C4::Output qw( output_html_with_http_headers ); | 
        
          | 50 | use C4::Letters qw( GetMessageTransportTypes ); | 50 | use C4::Letters qw( GetMessageTransportTypes ); | 
        
          | 51 | use C4::Log qw( logaction ); | 51 | use C4::Log qw( logaction ); | 
            
              | 52 |  |  |  | 
        
          | 53 | use Koha::Notice::Templates; | 52 | use Koha::Notice::Templates; | 
        
          | 54 | use Koha::Patron::Attribute::Types; | 53 | use Koha::Patron::Attribute::Types; | 
        
          | 55 |  | 54 |  | 
  
    | Lines 228-233
          sub add_form {
      
      
        Link Here | 
        
          | 228 |                 content    => $letter->{content} // '', | 227 |                 content    => $letter->{content} // '', | 
        
          | 229 |                 tt_error   => $letter->{tt_error}, | 228 |                 tt_error   => $letter->{tt_error}, | 
        
          | 230 |             }; | 229 |             }; | 
            
              |  |  | 230 |             $letters{ $lang }{params} = $letter; | 
        
          | 231 |         } | 231 |         } | 
        
          | 232 |     } | 232 |     } | 
        
          | 233 |     else { | 233 |     else { | 
  
    | Lines 310-321
          sub add_validate {
      
      
        Link Here | 
        
          | 310 |     my $oldmodule     = $input->param('oldmodule'); | 310 |     my $oldmodule     = $input->param('oldmodule'); | 
        
          | 311 |     my $code          = $input->param('code'); | 311 |     my $code          = $input->param('code'); | 
        
          | 312 |     my $name          = $input->param('name'); | 312 |     my $name          = $input->param('name'); | 
            
              |  |  | 313 |     my $text_justify  = $input->param('text_justify'); | 
            
              | 314 |     my $font_size     = $input->param('font_size'); | 
            
              | 315 |     my $units         = $input->param('units'); | 
            
              | 316 |     my $notice_width  = $input->param('notice_width'); | 
            
              | 317 |     my $top_margin    = $input->param('top_margin'); | 
            
              | 318 |     my $left_margin   = $input->param('left_margin'); | 
            
              | 319 |     my $format_all    = $input->param('format_all'); | 
        
          | 313 |     my @mtt           = $input->multi_param('message_transport_type'); | 320 |     my @mtt           = $input->multi_param('message_transport_type'); | 
        
          | 314 |     my @title         = $input->multi_param('title'); | 321 |     my @title         = $input->multi_param('title'); | 
        
          | 315 |     my @content       = $input->multi_param('content'); | 322 |     my @content       = $input->multi_param('content'); | 
        
          | 316 |     my @lang          = $input->multi_param('lang'); | 323 |     my @lang          = $input->multi_param('lang'); | 
        
          | 317 |     for my $mtt ( @mtt ) { | 324 |     for my $mtt ( @mtt ) { | 
        
          | 318 |         my $lang = shift @lang; | 325 |         my $lang = shift @lang; | 
            
              |  |  | 326 |         if ( $format_all ) { | 
            
              | 327 |             my @letters = Koha::Notice::Templates->search({ lang => $lang })->as_list; | 
            
              | 328 |             foreach my $letter ( @letters ) { | 
            
              | 329 |                 $letter->set( | 
            
              | 330 |                     { | 
            
              | 331 |                         text_justify  => $text_justify, | 
            
              | 332 |                         font_size  => $font_size, | 
            
              | 333 |                         units      => $units, | 
            
              | 334 |                         notice_width  => $notice_width, | 
            
              | 335 |                         top_margin    => $top_margin, | 
            
              | 336 |                         left_margin   => $left_margin, | 
            
              | 337 |                     } | 
            
              | 338 |                 )->store; | 
            
              | 339 |             } | 
            
              | 340 |         } | 
        
          | 319 |         my $is_html = $input->param("is_html_$mtt\_$lang"); | 341 |         my $is_html = $input->param("is_html_$mtt\_$lang"); | 
        
          | 320 |         my $title   = shift @title; | 342 |         my $title   = shift @title; | 
        
          | 321 |         my $content = shift @content; | 343 |         my $content = shift @content; | 
  
    | Lines 348-354
          sub add_validate {
      
      
        Link Here | 
        
          | 348 |                     is_html    => $is_html || 0, | 370 |                     is_html    => $is_html || 0, | 
        
          | 349 |                     title      => $title, | 371 |                     title      => $title, | 
        
          | 350 |                     content    => $content, | 372 |                     content    => $content, | 
          
            
              | 351 |                     lang       => $lang | 373 |                     lang       => $lang, | 
            
              |  |  | 374 |                     text_justify  => $text_justify, | 
            
              | 375 |                     font_size  => $font_size, | 
            
              | 376 |                     units      => $units, | 
            
              | 377 |                     notice_width  => $notice_width, | 
            
              | 378 |                     top_margin    => $top_margin, | 
            
              | 379 |                     left_margin   => $left_margin, | 
        
          | 352 |                 } | 380 |                 } | 
        
          | 353 |             )->store; | 381 |             )->store; | 
        
          | 354 |  | 382 |  | 
  
    | Lines 363-369
          sub add_validate {
      
      
        Link Here | 
        
          | 363 |                     title                  => $title, | 391 |                     title                  => $title, | 
        
          | 364 |                     content                => $content, | 392 |                     content                => $content, | 
        
          | 365 |                     message_transport_type => $mtt, | 393 |                     message_transport_type => $mtt, | 
          
            
              | 366 |                     lang                   => $lang | 394 |                     lang                   => $lang, | 
            
              |  |  | 395 |                     text_justify  => $text_justify, | 
            
              | 396 |                     font_size  => $font_size, | 
            
              | 397 |                     units      => $units, | 
            
              | 398 |                     notice_width  => $notice_width, | 
            
              | 399 |                     top_margin    => $top_margin, | 
            
              | 400 |                     left_margin   => $left_margin, | 
        
          | 367 |                 } | 401 |                 } | 
        
          | 368 |             )->store; | 402 |             )->store; | 
        
          | 369 |             logaction( 'NOTICES', 'CREATE', $letter->id, $letter->content, | 403 |             logaction( 'NOTICES', 'CREATE', $letter->id, $letter->content, | 
            
              | 370 | -  |  |  |