[% META title = 'Call barring' %]

  <div id="headimg">
    <img src="/grafik/area.jpg" width="869" height="69" alt="" />
  </div>
  <div id="headtxt">[% Catalyst.loc('Call barring for incoming and outgoing calls.') %]</div>
  
  <div id="main">
    
    <div id="topmsg">
      <p> [% messages.topmsg %] </p>
    </div>
    <div id="toperr">
      <p> [% messages.toperr %] </p>
      <p> [% messages.prov_error %] </p>
    </div>

    <div class="sperrehead">
      <h3>[% Catalyst.loc('Call barring') %]</h3>
      <h2 class="umleitungfuer">[% Catalyst.loc('Settings for [_1]', subscriber.active_number) %]</h2>
    </div>
    
    <div id="spalten11">
      
      <div class="spalte1">
        
        <h3 class="blueh3">[% Catalyst.loc('Incoming calls') %]</h3>
        <div class="fsperre">
          <fieldset class="fieldblockmode">
            <form action="/callblock/save" method="post">
              <input type="radio" id="block_in_mode0" name="block_in_mode" value="0" [% subscriber.blk.inmode0_checked %] />
              <label for="block_in_mode0">[% Catalyst.loc('Allow everything except ...') %]</label><br />
              <input type="radio" id="block_in_mode1" name="block_in_mode" value="1" [% subscriber.blk.inmode1_checked %] />
              <label for="block_in_mode1">[% Catalyst.loc('Block everything except ...') %]</label>
              <p class="save">
                <label for="save_blockinmode">[% Catalyst.loc('save settings') %]</label>
                <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockinmode">
              </p>
            </form>
          </fieldset>

          <table class="anrufliste sperre">
            [% FOREACH blockentry = subscriber.block_in_list %]
              <tr class="[% blockentry.background %]">
                <td class="sperrenummer"><div [% UNLESS blockentry.active %]class="blockentry_inactive"[% END %]>&nbsp;[% blockentry.number %]&nbsp;</div></td>
                <td class="sperresave">
                  <form action="/callblock/save" method="post">
                    <div class="save">
                      <input type="hidden" name="block_in_del" value="[% blockentry.number %]" />
                      <input type="hidden" name="block_in_stat" value="[% blockentry.active %]" />
                      <label for="save_blockindel[% blockentry.id %]">[% Catalyst.loc('delete') %]</label>
                      <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockindel[% blockentry.id %]">
                    </div>
                  </form>
                </td>
                <td class="sperresave">
                  <form action="/callblock/save" method="post">
                    <div class="save">
                      [% IF    blockentry.active  == 1 %]
                        <input type="hidden" name="block_in_act" value="[% blockentry.number %]" />
                        <input type="hidden" name="block_in_stat" value="1" />
                        <label for="save_blockinact[% blockentry.id %]">[% Catalyst.loc('disable') %]</label>
                        <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockinact[% blockentry.id %]">
                      [% ELSIF blockentry.active  == 0 %]
                        <input type="hidden" name="block_in_act" value="[% blockentry.number %]" />
                        <input type="hidden" name="block_in_stat" value="0" />
                        <label for="save_blockinact[% blockentry.id %]">[% Catalyst.loc('enable') %]</label>
                        <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockinact[% blockentry.id %]">
                      [% END %]
                    </div>
                  </form>
                </td>
              </tr>
            [% END %]
          </table>

          <fieldset class="sperreadd">
            <form action="/callblock/save" method="post">
              <label for="save_blockinaddtxt">[% Catalyst.loc('new entry:') %]</label>
              <input type="text" size="20" name="block_in_add" id="save_blockinaddtxt" value="[% refill.blockinaddtxt %]" />
              <div id="errormsg"><p>[% messages.msginadd %]</p></div>
              <p class="save">
                <label for="save_blockinadd">[% Catalyst.loc('add number') %]</label>
                <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockinadd">
              </p><br clear="all" />
              <p class="info">
                [% Catalyst.loc('Please use digits only and include the area code of the number.') %]
                [% Catalyst.loc('You may use the wildcard characters "?" for one and "*" for an indefinite number of arbitrary digits.') %]
                [% Catalyst.loc('To block anonymous calls you may just submit the empty string.') %]
              </p>
            </form>
          </fieldset>
        </div>
        
      </div>

      <div class="spalte2">
        
        <h3 class="blueh3">[% Catalyst.loc('Outgoing calls') %]</h3>
        <div class="fsperre">
          <fieldset class="fieldblockmode">
            <form action="/callblock/save" method="post">
              <p><label class="no_border"><input type="checkbox" id="clir" name="clir"
                                            [% IF subscriber.clir %]
                                              checked="checked"
                                            [% END %]
                                          /> [% Catalyst.loc('hide own number on outgoing calls') %]</label></p>
              <input type="radio" id="block_out_mode0" name="block_out_mode" value="0" [% subscriber.blk.outmode0_checked %] />
              <label for="block_out_mode0">[% Catalyst.loc('Allow everything except ...') %]</label><br />
              <input type="radio" id="block_out_mode1" name="block_out_mode" value="1" [% subscriber.blk.outmode1_checked %] />
              <label for="block_out_mode1">[% Catalyst.loc('Block everything except ...') %]</label>
              <p class="save">
                <label for="save_blockoutmode">[% Catalyst.loc('save settings') %]</label>
                <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockoutmode">
              </p>
            </form>
          </fieldset>

          <table class="anrufliste sperre">
            [% FOREACH blockentry = subscriber.block_out_list %]
              <tr class="[% blockentry.background %]">
                <td class="sperrenummer"><div [% UNLESS blockentry.active %]class="blockentry_inactive"[% END %]>&nbsp;[% blockentry.number %]&nbsp;</div></td>
                <td class="sperresave">
                  <form action="/callblock/save" method="post">
                    <div class="save">
                      <input type="hidden" name="block_out_del" value="[% blockentry.number %]" />
                      <input type="hidden" name="block_out_stat" value="[% blockentry.active %]" />
                      <label for="save_blockoutdel[% blockentry.id %]">[% Catalyst.loc('delete') %]</label>
                      <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockoutdel[% blockentry.id %]">
                    </div>
                  </form>
                </td>
                <td class="sperresave">
                  <form action="/callblock/save" method="post">
                    <div class="save">
                      [% IF    blockentry.active  == 1 %]
                        <input type="hidden" name="block_out_act" value="[% blockentry.number %]" />
                        <input type="hidden" name="block_out_stat" value="1" />
                        <label for="save_blockoutact[% blockentry.id %]">[% Catalyst.loc('disable') %]</label>
                        <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockoutact[% blockentry.id %]">
                      [% ELSIF blockentry.active  == 0 %]
                        <input type="hidden" name="block_out_act" value="[% blockentry.number %]" />
                        <input type="hidden" name="block_out_stat" value="0" />
                        <label for="save_blockoutact[% blockentry.id %]">[% Catalyst.loc('enable') %]</label>
                        <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockoutact[% blockentry.id %]">
                      [% END %]
                    </div>
                  </form>
                </td>
              </tr>
            [% END %]
          </table>
          <fieldset class="sperreadd">
            <form action="/callblock/save" method="post">
              <label for="save_blockoutaddtxt">[% Catalyst.loc('new entry:') %]</label>
              <input type="text" size="20" name="block_out_add" id="save_blockoutaddtxt" value="[% refill.blockoutaddtxt %]" />
              <div id="errormsg"><p>[% messages.msgoutadd %]</p></div>
              <p class="save">
                <label for="save_blockoutadd">[% Catalyst.loc('add number') %]</label>
                <input type="image" class="hidden" src="/grafik/dot_trans.gif" alt="" id="save_blockoutadd">
              </p><br clear="all" />
              <p class="info">
                [% Catalyst.loc('Please use digits only and include the area code of the number.') %]
                [% Catalyst.loc('You may use the wildcard characters "?" for one and "*" for an indefinite number of arbitrary digits.') %]
              </p>
            </form>
          </fieldset>
        </div><br clear="all" />
        
      </div>
      
    </div>
    
  </div><br clear="all" />
