| 
      
            Lines 3-8
          
      
      
        Link Here
      
     | 
  
        
          | 3 | 
          [% USE Context %]  | 
          3 | 
          [% USE Context %]  | 
        
        
          | 4 | 
          [% USE KohaDates %]  | 
          4 | 
          [% USE KohaDates %]  | 
        
        
          | 5 | 
          [% USE Branches %]  | 
          5 | 
          [% USE Branches %]  | 
        
            
               | 
               | 
              6 | 
              [% USE Categories %]  | 
            
        
          | 6 | 
          [% USE ItemTypes %]  | 
          7 | 
          [% USE ItemTypes %]  | 
        
        
          | 7 | 
          [% USE AuthorisedValues %]  | 
          8 | 
          [% USE AuthorisedValues %]  | 
        
        
          | 8 | 
          [% USE Price %]  | 
          9 | 
          [% USE Price %]  | 
        
  
    | 
      
            Lines 10-15
          
      
      
        Link Here
      
     | 
  
        
          | 10 | 
          [% SET article_requests_view = 1 %]  | 
          11 | 
          [% SET article_requests_view = 1 %]  | 
        
        
          | 11 | 
          [% SET biblionumber = biblio.biblionumber %]  | 
          12 | 
          [% SET biblionumber = biblio.biblionumber %]  | 
        
        
          | 12 | 
          [% INCLUDE 'doc-head-open.inc' %]  | 
          13 | 
          [% INCLUDE 'doc-head-open.inc' %]  | 
        
            
               | 
               | 
              14 | 
              [% SET libraries = Branches.all %]  | 
            
            
              | 15 | 
              [% SET categories = Categories.all.unblessed %]  | 
            
            
              | 16 | 
              [% SET columns = ['name', 'address', 'cardnumber', 'dateofbirth', 'category', 'branch', 'phone'] %]  | 
            
            
              | 17 | 
              [% PROCESS "patron-search.inc" %]  | 
            
        
          | 13 | 
          <title>Request article › Circulation › Koha</title>  | 
          18 | 
          <title>Request article › Circulation › Koha</title>  | 
        
        
          | 14 | 
          [% INCLUDE 'doc-head-close.inc' %]  | 
          19 | 
          [% INCLUDE 'doc-head-close.inc' %]  | 
        
        
          | 15 | 
          </head>  | 
          20 | 
          </head>  | 
        
  
    | 
      
            Lines 96-147
          
      
      
        Link Here
      
     | 
  
        
          | 96 | 
                                  [% END %]  | 
          101 | 
                                  [% END %]  | 
        
        
          | 97 | 
                                  </div>  | 
          102 | 
                                  </div>  | 
        
        
          | 98 | 
                              [% END %]  | 
          103 | 
                              [% END %]  | 
        
          
            
              | 99 | 
                                  [% IF no_patrons_found %]  | 
              104 | 
                                  [% UNLESS patron %]  | 
            
            
              | 100 | 
                                      <div class="dialog alert">  | 
              105 | 
                                      <fieldset class="brief">  | 
            
            
              | 101 | 
                                          <h3>Patron not found</h3>  | 
              106 | 
                                          <label>Search patrons</label>  | 
            
            
              | 102 | 
                                          <p>No patron with this name, please, try another</p>  | 
              107 | 
                                          [% PROCESS patron_search_filters_simple %]  | 
            
            
              | 103 | 
                                      </div>  | 
              108 | 
                                          [% PROCESS patron_search_table table_id => 'table_borrowers', open_on_row_click => 1 %]  | 
            
            
              | 104 | 
                                  [% ELSIF patrons %]  | 
              109 | 
                                      </fieldset>  | 
            
            
              | 105 | 
                                      <form id="article_request_patron_results" method="post">  | 
               | 
               | 
            
            
              | 106 | 
                                          <fieldset>  | 
            
            
              | 107 | 
                                              <table id="table_borrowers">  | 
            
            
              | 108 | 
                                                  <thead>  | 
            
            
              | 109 | 
                                                      <tr>  | 
            
            
              | 110 | 
                                                          <th></th>  | 
            
            
              | 111 | 
                                                          <th>Name</th>  | 
            
            
              | 112 | 
                                                          <th>Cardnumber</th>  | 
            
            
              | 113 | 
                                                          <th>Category</th>  | 
            
            
              | 114 | 
                                                          <th>Library</th>  | 
            
            
              | 115 | 
                                                          <th>Address</th>  | 
            
            
              | 116 | 
                                                      </tr>  | 
            
            
              | 117 | 
                                                  </thead>  | 
            
            
              | 118 | 
                                                  <tbody>  | 
            
            
              | 119 | 
                                                      [% FOREACH patron IN patrons %]  | 
            
            
              | 120 | 
                                                          <tr>  | 
            
            
              | 121 | 
                                                              <td><input type="radio" name="patron_id" value="[% patron.borrowernumber | html %]"/></td>  | 
            
            
              | 122 | 
                                                              <td>[% patron.surname | html %], [% patron.firstname | html %]</td>  | 
            
            
              | 123 | 
                                                              <td>[% patron.cardnumber | html %]</td>  | 
            
            
              | 124 | 
                                                              <td>[% patron.categorycode | html %]</td>  | 
            
            
              | 125 | 
                                                              <td>[% patron.branchcode | html %]</td>  | 
            
            
              | 126 | 
                                                              <td>[% patron.address | html %]</td>  | 
            
            
              | 127 | 
                                                          </tr>  | 
            
            
              | 128 | 
                                                      [% END %]  | 
            
            
              | 129 | 
                                                  </tbody>  | 
            
            
              | 130 | 
                                              </table>  | 
            
            
              | 131 | 
                                              <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />  | 
            
            
              | 132 | 
                                              <fieldset class="action"><input type="submit" value="Select" /></fieldset>  | 
            
            
              | 133 | 
                                          </fieldset>  | 
            
            
              | 134 | 
                                      </form>  | 
            
            
              | 135 | 
                                  [% ELSIF !patron %]  | 
            
            
              | 136 | 
                                      <form id="article_requests_patronsearch" action="request-article.pl" method="post">  | 
            
            
              | 137 | 
                                          <fieldset class="brief">  | 
            
            
              | 138 | 
                                              <label for="patron">Patron: </label>  | 
            
            
              | 139 | 
                                              <div class="hint">Enter patron card number or partial name:</div>  | 
            
            
              | 140 | 
                                              <input type="text" size="40" id="patron" class="focus" name="patron_cardnumber" />  | 
            
            
              | 141 | 
                                              <input type="submit" value="Search" />  | 
            
            
              | 142 | 
                                              <input type="hidden" name="biblionumber" value="[% biblio.id | html %]" />  | 
            
            
              | 143 | 
                                          </fieldset>  | 
            
            
              | 144 | 
                                      </form>  | 
            
        
          | 145 | 
                              [% ELSE %]  | 
          110 | 
                              [% ELSE %]  | 
        
        
          | 146 | 
                                  [% IF biblio.can_article_request( patron ) %]  | 
          111 | 
                                  [% IF biblio.can_article_request( patron ) %]  | 
        
        
          | 147 | 
                                      [% IF article_request_fee > 0 %]  | 
          112 | 
                                      [% IF article_request_fee > 0 %]  | 
        
  
    | 
      
            Lines 396-434
          
      
      
        Link Here
      
     | 
  
        
          | 396 | 
                  });  | 
          361 | 
                  });  | 
        
        
          | 397 | 
           | 
          362 | 
           | 
        
        
          | 398 | 
                  $(document).ready(function() { | 
          363 | 
                  $(document).ready(function() { | 
        
            
              | 399 | 
                          if ( $( "#patron" ).size() ){ | 
               | 
               | 
            
            
              | 400 | 
                              $( "#patron" ).autocomplete({ | 
            
            
              | 401 | 
                                  source: "/cgi-bin/koha/circ/ysearch.pl",  | 
            
            
              | 402 | 
                                  minLength: 3,  | 
            
            
              | 403 | 
                                  select: function( event, ui ) { | 
            
            
              | 404 | 
                                      $( "#patron" ).val( ui.item.cardnumber );  | 
            
            
              | 405 | 
                                      $( "#holds_patronsearch" ).submit();  | 
            
            
              | 406 | 
                                      return false;  | 
            
            
              | 407 | 
                                  }  | 
            
            
              | 408 | 
                              })  | 
            
            
              | 409 | 
                              .data( "ui-autocomplete" )._renderItem = function( ul, item ) { | 
            
            
              | 410 | 
                                  return $( "<li></li>" )  | 
            
            
              | 411 | 
                                  .data( "ui-autocomplete-item", item )  | 
            
            
              | 412 | 
                                  .append(  | 
            
            
              | 413 | 
                                      "<a>"  | 
            
            
              | 414 | 
                                          + ( item.surname ? item.surname.escapeHtml() : "" )  | 
            
            
              | 415 | 
                                          + ", "  | 
            
            
              | 416 | 
                                          + ( item.firstname ? item.firstname.escapeHtml() : "" )  | 
            
            
              | 417 | 
                                          + " (" + ( item.cardnumber ? item.cardnumber.escapeHtml() : "" ) + ")" | 
            
            
              | 418 | 
                                          + " "  | 
            
            
              | 419 | 
                                          + "<small>"  | 
            
            
              | 420 | 
                                              + ( item.address ? item.address.escapeHtml() : "" )  | 
            
            
              | 421 | 
                                              + " "  | 
            
            
              | 422 | 
                                              + ( item.city ? item.city.escapeHtml() : "" )  | 
            
            
              | 423 | 
                                              + " "  | 
            
            
              | 424 | 
                                              + ( item.zipcode ? item.zipcode.escapeHtml() : "" )  | 
            
            
              | 425 | 
                                              + " "  | 
            
            
              | 426 | 
                                              + ( item.country ? item.country.escapeHtml() : "" )  | 
            
            
              | 427 | 
                                          + "</small>"  | 
            
            
              | 428 | 
                                      + "</a>" )  | 
            
            
              | 429 | 
                                  .appendTo( ul );  | 
            
            
              | 430 | 
                              };  | 
            
            
              | 431 | 
                          }  | 
            
        
          | 432 | 
           | 
          364 | 
           | 
        
        
          | 433 | 
                      $( ".ar-update-branchcode" ).on('focus', function(){ | 
          365 | 
                      $( ".ar-update-branchcode" ).on('focus', function(){ | 
        
        
          | 434 | 
                          previous_branchcode = this.value;  | 
          366 | 
                          previous_branchcode = this.value;  | 
        
  
    | 
      
            Lines 503-508
          
      
      
        Link Here
      
     | 
  
        
          | 503 | 
                      }  | 
          435 | 
                      }  | 
        
        
          | 504 | 
                  });  | 
          436 | 
                  });  | 
        
        
          | 505 | 
              </script>  | 
          437 | 
              </script>  | 
        
            
               | 
               | 
              438 | 
               | 
            
            
              | 439 | 
                  [% PROCESS patron_search_js  | 
            
            
              | 440 | 
                      table_id    => 'table_borrowers',  | 
            
            
              | 441 | 
                      categories  => categories,  | 
            
            
              | 442 | 
                      libraries   => libraries,  | 
            
            
              | 443 | 
                      extended_attribute_types => attribute_type_codes,  | 
            
            
              | 444 | 
                      columns     => columns,  | 
            
            
              | 445 | 
                      open_on_row_click => 1,  | 
            
            
              | 446 | 
                      on_click_url      => '/cgi-bin/koha/circ/request-article.pl?biblionumber=' _ biblio.biblionumber,  | 
            
            
              | 447 | 
                      redirect_if_one_result => 1,  | 
            
            
              | 448 | 
                      redirect_url           => '/cgi-bin/koha/circ/request-article.pl?biblionumber=' _ biblio.biblionumber,  | 
            
            
              | 449 | 
                  %]  | 
            
            
              | 450 | 
               | 
            
        
          | 506 | 
          [% END %]  | 
          451 | 
          [% END %]  | 
        
        
          | 507 | 
           | 
          452 | 
           | 
        
        
          | 508 | 
          [% INCLUDE 'intranet-bottom.inc' %]  | 
          453 | 
          [% INCLUDE 'intranet-bottom.inc' %]  | 
        
            
              | 509 | 
              -   | 
               | 
               |