<?php

/**
 * Contao Repository :: Template to add a new extension
 * @copyright  Peter Koch 2008-2010
 * @author     Peter Koch, IBK Software AG
 * @license    See accompaning file LICENSE.txt
 */

$rep = &$this->rep;
$theme = &$rep->theme;
$text = &$GLOBALS['TL_LANG']['tl_repository'];
$state_options = &$GLOBALS['TL_LANG']['tl_repository_state_options'];
$tabindex = 1;

?>

<div id="tl_buttons">
  <a href="<?= $rep->homeLink ?>" class="header_back" title="<?= $text['goback'] ?>" accesskey="b" onclick="Backend.getScrollOffset()"><?= $text['goback'] ?></a>
</div>

<h2 class="sub_headline"><?= $text['editextension'] ?></h2>

<div class="mod_repository">
  <form action="<?= $rep->f_link ?>" id="repository_editform" method="post" >
    <div class="tl_formbody_edit">
      <input type="hidden" name="repository_action" value="<?= $rep->f_action ?>">
      <input type="hidden" name="REQUEST_TOKEN" value="<?= REQUEST_TOKEN ?>">
      <div class="tl_tbox">
        <h3><label for="repository_lickey"><?= $text['lickey'][0] ?></label></h3>
        <input type="text" tabindex="<?= $tabindex++ ?>" maxlength="255" name="repository_lickey" id="repository_lickey" value="<?= $rep->f_lickey ?>" class="tl_text">
        <p class="tl_help tl_tip"><?= $text['lickey'][1] ?></p>
        <fieldset class="tl_checkbox_container">
          <legend><?= $text['status'] ?></legend>
          <input type="checkbox" name="repository_alpha" id="repository_alpha" tabindex="<?= $tabindex++ ?>" class="tl_checkbox" value="1"<?php if ($rep->f_alpha) echo ' checked="checked"'; ?>> <label for="repository_alpha"><?= $state_options['alpha'] ?></label><br>
          <input type="checkbox" name="repository_beta" id="repository_beta" tabindex="<?= $tabindex++ ?>" class="tl_checkbox" value="1"<?php if ($rep->f_beta) echo ' checked="checked"'; ?>> <label for="repository_beta"><?= $state_options['beta'] ?></label><br>
          <input type="checkbox" name="repository_rc" id="repository_rc" tabindex="<?= $tabindex++ ?>" class="tl_checkbox" value="1"<?php if ($rep->f_rc) echo ' checked="checked"'; ?>> <label for="repository_rc"><?= $state_options['rc'] ?></label><br>
          <input type="checkbox" name="repository_stable" id="repository_stable" tabindex="<?= $tabindex++ ?>" class="tl_checkbox" value="1"<?php if ($rep->f_stable) echo ' checked="checked"'; ?>> <label for="repository_stable"><?= $state_options['stable'] ?></label>
        </fieldset>
        <p class="tl_help tl_tip"><?= $text['updatehint'] ?></p>
        <div class="tl_checkbox_single_container">
          <input type="checkbox" name="repository_delprot" id="repository_delprot" tabindex="<?= $tabindex++ ?>" class="tl_checkbox" value="1"<?php if ($rep->f_delprot) echo ' checked="checked"'; ?>> <label for="repository_delprot"><?= $text['uninstprotect'][0] ?></label>
        </div>
        <p class="tl_help tl_tip"><?= $text['uninstprotect'][1] ?></p>
        <div class="tl_checkbox_single_container">
          <input type="checkbox" name="repository_updprot" id="repository_updprot" tabindex="<?= $tabindex++ ?>" class="tl_checkbox" value="1"<?php if ($rep->f_updprot) echo ' checked="checked"'; ?>> <label for="repository_updprot"><?= $text['updateprotect'][0] ?></label>
        </div>
        <p class="tl_help tl_tip"><?= $text['updateprotect'][1] ?></p>
      </div>
    </div>
    <div class="mod_repository_submit tl_formbody_submit">
      <div class="tl_submit_container">
        <input type="submit" name="repository_submitbutton" class="tl_submit" value="<?= $text['save'] ?>">
        <input type="submit" name="repository_cancelbutton" class="tl_submit" value="<?= $text['cancel'] ?>">
      </div>
    </div>
  </form>
</div>
