<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html metal:use-macro="container/page_macro/macros/master_page">

<span tal:omit-tag="" metal:fill-slot="main_content_slot">
  <h2>L_editing_settings</h2>
  <form action="pealkirjaMuutmisLeht">
     <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="eeeeee">
        <tr>
          <td class="t1" width="25%" i18n:translate="">L_it_quiz_title</td>
          <td class="t1"><input type="text" name="pealkiri" tal:attributes="value here/annaPealkiri"></td>
        </tr>
        <tr>
           <td class="t1">L_it_quiz_descr</td>
           <td><textarea name="kirjeldus" tal:content="here/annaKirjeldus"></textarea></td>
        </tr>
        <tr>
           <td class="t1">L_it_quiz_type</td>
           <td>
             <select name="tyyp">
                <span tal:repeat="t python:here.kysiTyypideNimed(request)" tal:omit-tag="">
                    <option tal:define="nr repeat/t/index" tal:attributes="value repeat/t/index; selected python:test(nr==here.kysiTyyp(request), 'selected', nothing)" tal:content="t"></option>
                </span>
             </select>
           </td>
        </tr>
        <tr tal:condition="python:here.kysiTyyp(request)==0">
           <td class="t1" i18n:translate="">L_it_have_quiz_timelimit</td>
           <td><input type="checkbox" name="lahendusaegPiiratud" tal:attributes="checked python:test(here.kasLahendusaegPiiratud(), 'checked', nothing)" /></td>
        </tr>
        <tr tal:condition="python:here.kysiTyyp(request)==0">
           <td class="t1" i18n:translate="">L_it_time_for_answering</td>
           <td>
              <input type="text" name="lahendusaegTunnid" tal:attributes="value here/kysiLahendusajaTunnid" size="5" /> :
              <input type="text" name="lahendusaegMinutid" tal:attributes="value here/kysiLahendusajaMinutid" size="5" />
           </td>
        </tr>

        <tr class="t1">
           <td class="t1" i18n:translate="">L_it_test_randomize</td>
           <td class="t1">
              <input type="checkbox" name="juhujarjestus" tal:attributes="checked python:test(here.kasKysimusteJuhuslikJarjekord(), 'checked', nothing)" />
           </td>
        </tr>
        <tr>
           <td class="t1" i18n:translate="">L_it_ca_visible</td>
           <td>
              <select name="nahtavus">
                 <span tal:repeat="t python:here.vastusteNahtavusedTekstina(request)">
                    <option tal:define="nr repeat/t/index" tal:attributes="value nr; selected python:test(nr==here.kysiVastusteNahtavus(), 'selected', nothing)" tal:content="t"></option>
                 </span>
              </select>
           </td>
        </tr>
        <tr><td colspan="2"><h3>L_it_description_of_permissions</h3></td></tr>
        <tr>
           <td class="t1" colspan="2">
              <input type="radio" name="testipass" value="suletud" tal:attributes="checked python:test(len(here.grupiLoad.objectValues())==0 and here.koigiLuba.algusAeg==-1 and len(here.isikuLoad.objectValues())==0, 'checked', nothing)"/>
                 <span i18n:translate="" tal:omit-tag="">L_it_notpublic</span>
           </td>
        </tr>
        <tr>
           <td class="t1" colspan="2">
              <input type="radio" name="testipass" value="ajapiirang" tal:attributes="checked python:test(here.koigiLuba.algusAeg!=-1, 'checked', nothing)" />
              <span i18n:translate="">L_it_timelimit</span>
                  <a i18n:translate="" tal:attributes="href python:'koigiLuba?liikumisURL='+here.fle_root().absolute_url()+'/testihaldus/'" tal:condition="python:here.koigiLuba.algusAeg!=-1">L_it_restrictions</a>
           </td>
        </tr>
        <tr>
           <td class="t1" colspan="2">
              <input type="radio" name="testipass" value="sisegr" tal:attributes="checked python:test(len(here.grupiLoad.objectValues())>0, 'checked', nothing)" />
              <span i18n:translate="">L_it_for_subgroups</span>
                  <a i18n:translate="" tal:attributes="href python:'grupiLubadeLisamisVorm'" tal:condition="python:len(here.grupiLoad.objectValues())>0">L_it_restrictions</a>
           </td>
        </tr>
        <tr>
           <td class="t1" colspan="2">
              <input type="radio" name="testipass" value="isikuline" tal:attributes="checked python:test(len(here.isikuLoad.objectValues())>0, 'checked', nothing)" />
              <span i18n:translate="">L_it_for_persons</span>
                  <a i18n:translate="" tal:attributes="href python:'isikuLubadeLisamisVorm'" tal:condition="python:len(here.isikuLoad.objectValues())>0">L_it_restrictions</a>
           </td>
        </tr>
     </table>
     <input type="hidden" name="liikumisURL" tal:condition="python:hasattr(request, 'liikumisURL')" tal:attributes="value request/liikumisURL"/>
     <input type="submit" value="OK" />
  </form>
</span>
</html>
