<h1><?= ucfirst($this->localization['nowy_element']); ?></h1>
<form id="new_element_form" method="post" action="">
    <fieldset>
        <p>
                <label for="category_id"><?= ucfirst($this->localization['kategoria']);?> *</label>
                <?php
                    $category_id_html_attributes = 'id="category_id" class="required"';
                    echo form_dropdown('category_id',$categories,set_value('category_id'),$category_id_html_attributes, (isset($setting['category_id']) ? $setting['category_id']:null) );
                ?>
        </p>
        <p>
                <label for="name"><?= ucfirst($this->localization['nazwa']);?> *</label>
                <input id="name" name="name" class="required" size="100" value="<?php echo (isset($setting['name']) ? $setting['name']:''); ?>"/>
        </p>
        <p>
                <label for="type"><?= ucfirst($this->localization['typ']);?> *</label>
                <?php
                    $type_html_attributes = 'id="type" class="required"';
                    echo form_dropdown('type',$types,set_value('type'),$type_html_attributes, (isset($setting['type']) ? $setting['type']:null) );
                ?>
        </p>
        <p>
                <label for="order"><?= ucfirst($this->localization['kolejnosc']);?></label>
                <input id="order" name="order" class="number" size="100" value="<?php echo (isset($setting['order']) ? $setting['order']:null); ?>"/>
        </p>
        <p>
                <label for="lang_id"><?= ucfirst($this->localization['jezyk']);?></label>
                <?php
                    $lang_id_html_attributes = 'id="lang_id"';
                    echo form_dropdown('lang_id',$languages,set_value('lang_id'), $lang_id_html_attributes, (isset($setting_language['lang_id']) ? $setting_language['lang_id']:null) );
                ?>
        </p>
        <p>
                <label for="value"><?= ucfirst($this->localization['wartosc']);?> *</label>
                <textarea cols="100" rows="10" class="required" name="value" id="value"><?php echo (isset($setting_language['value']) ? $setting_language['value']:null);  ?></textarea>
        </p>
        <p>
                <label for="description"><?= ucfirst($this->localization['opis']);?></label>
                <textarea cols="100" rows="10" class="" name="description" id="description"><?php echo (isset($setting_language['description']) ? $setting_language['description']:null); ?></textarea>
        </p>
        <p>
            * - <?= ($this->localization['pole_wymagane']) ?><br /><br />
        </p>
        <p>
                <input class="submit" type="submit" value="<?= ucfirst($this->localization['zatwierdz']);?>"/>
                &nbsp;&nbsp;&nbsp;<input type="button" value="<?= ucfirst($this->localization['anuluj']);?>" onClick="location.href='/admin/galleries'"/>
        </p>
    </fieldset>
</form>
<script type="text/javascript">
$(document).ready(function() {
    $("#new_element_form").validate();
});
</script>