<?php

echo print_form('open', 'POST', '', 'edit_form');
$contentType = array('type' => 'text', 'name' => 'content_type', 'id' => 'content_type', 'value' => $oldValues['content_type'], 'placeholder' => 'Content Type', 'label' => '', 'labelFor' => '', 'labelClass' => '', 'mandatory' => TRUE, 'showError' => TRUE, 'error' => isset($errors['content_type']) ? $errors['content_type'] : '');
echo print_field($contentType);
echo print_submit_buttons(array($submit));
echo print_form('close');
$relativePath = array('type' => 'text', 'name' => 'relative_path', 'id' => 'relative_path', 'value' => $oldValues['relative_path'], 'placeholder' => 'Path', 'label' => 'Path', 'labelFor' => 'relative_path', 'labelClass' => '', 'mandatory' => TRUE, 'showError' => TRUE, 'error' => isset($errors['relative_path']) ? $errors['relative_path'] : '');
echo print_field($relativePath);
$lang = array('type' => 'select', 'name' => 'lang', 'id' => 'lang', 'options' => $this->config->item('langs', 'factotum'), 'value' => isset($oldValues['lang']) ? $oldValues['lang'] : $this->config->item('default_lang', 'factotum'), 'label' => 'Language', 'labelFor' => 'lang', 'mandatory' => true, 'showError' => true, 'error' => isset($errors['lang']) ? $errors['lang'] : '');
echo print_field($lang);
if (count($fields) > 0) {
    foreach ($fields as $field) {
        echo print_field($field);
    }
}
?>
	</section>
	<section id="section-2">
<?php 
if (count($categories) > 0) {
    $categoriesField = array('type' => 'multicheckbox', 'name' => 'categories', 'id' => 'categories', 'value' => $oldValues['categories'], 'options' => $categories, 'label' => 'Content Categories', 'labelFor' => 'categories', 'labelClass' => '', 'mandatory' => TRUE, 'showError' => TRUE, 'error' => isset($errors['categories']) ? $errors['categories'] : '');
    echo print_field($categoriesField);
} else {
    ?>
	<h4>No categories</h4>
<?php 
}
?>
	</section>

	<section id="section-3">
		pages and other stuff
	</section>
</div>
<?php 
echo print_submit_buttons($submits);
echo print_form('close');