<commit_before><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @subpackage  Categories
 * @copyright   Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */
defined('KOOWA') or die( 'Restricted access' ); ?>

<?= @helper('behavior.validator') ?>

<!--
<script src="media://lib_koowa/js/koowa.js" />
<style src="media://lib_koowa/css/koowa.css" />
-->

<?= @template('com://admin/default.view.form.toolbar'); ?>

<form action="" method="post" class="-koowa-form" id="category-form">
    <div class="form-body">
		<div class="title">
			<input class="required" type="text" name="title" maxlength="255" value="<?= $category->title; ?>" placeholder="<?= @text( 'Title' ); ?>" />
		</div>

		<div class="form-content">
			<fieldset class="form-horizontal">
				<legend><?= @text( 'Details' ); ?></legend>
				<div class="control-group">
				    <label class="control-label" for=""><?= @text( 'Description' ); ?></label>
				    <div class="controls">
				        <textarea rows="9" name="description"><?= $category->description; ?></textarea>
				    </div>
				</div>
			</fieldset>
			<fieldset class="form-horizontal">
				<legend><?= @text( 'Image' ); ?></legend>
				<div class="control-group">
				    <label class="control-label" for="image"><?= @text( 'Image' ); ?></label>
				    <div class="controls">
				        <?= @helper('image.listbox', array('name' => 'image')); ?>
				    </div>
				</div>
				<div class="control-group">
				    <label class="control-label" for="image_position"><?= @text( 'Image Position' ); ?></label>
				    <div class="controls">
				        <?=  @helper('image.position'); ?>
				    </div>
				</div>
			</fieldset>
		</div>
	</div>

    <div class="sidebar">
    	<fieldset class="form-horizontal">
    		<legend><?= @text( 'Publish' ); ?></legend>
    		<div class="control-group">
    		    <label class="control-label" for="enabled"><?= @text('Published') ?></label>
    		    <div class="controls">
    		        <?= @helper('select.booleanlist', array('name' => 'enabled', 'selected' => $category->enabled)) ?>
    		    </div>
    		</div>
    		<? $section = $category->id ? $category->section_id : $state->section ?>
    		<? if(substr($section, 0, 3) != 'com' || $section =='com_articles') : ?>
    		<div class="control-group">
    		    <label class="control-label" for="section_id"><?= @text('Section') ?></label>
    		    <div class="controls">
    		        <input type="hidden" name="old_parent" value="<?= $category->section_id ?>" />
    		        <?= @helper('listbox.sections', array(
    		        	'name' => 'section_id', 
    		        	'selected' => $category->section_id, 
    		        	'attribs' => array('id' => 'section_id', 'class' => 'required'),
    		        	'deselect' => false,
    		        	'uncategorised' => false
    		        )) ?>
    		    </div>
    		</div>
    		<? else : ?>
    		    <input type="hidden" name="section_id" value="<?= $section ?>" />
    		<? endif ?>
    		<div class="control-group">
    		    <label class="control-label" for="access"><?= @text('Access Level') ?></label>
    		    <div class="controls">
    		        <?= @helper('listbox.access', array('name' => 'access', 'state' => $category, 'deselect' => false)) ?>
    		    </div>
    		</div>
    	</fieldset>
    </div>
</form><commit_msg>re #229 : Removed image position handling. Use the categories template listbox helper.<commit_after><?php
/**
 * @version     $Id$
 * @package     Nooku_Server
 * @subpackage  Categories
 * @copyright   Copyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */
defined('KOOWA') or die( 'Restricted access' ); ?>

<?= @helper('behavior.validator') ?>

<!--
<script src="media://lib_koowa/js/koowa.js" />
<style src="media://lib_koowa/css/koowa.css" />
-->

<?= @template('com://admin/default.view.form.toolbar'); ?>

<form action="" method="post" class="-koowa-form" id="category-form">
    <div class="form-body">
		<div class="title">
			<input class="required" type="text" name="title" maxlength="255" value="<?= $category->title; ?>" placeholder="<?= @text( 'Title' ); ?>" />
		</div>

		<div class="form-content">
			<fieldset class="form-horizontal">
				<legend><?= @text( 'Details' ); ?></legend>
				<div class="control-group">
				    <label class="control-label" for=""><?= @text( 'Description' ); ?></label>
				    <div class="controls">
				        <textarea rows="9" name="description"><?= $category->description; ?></textarea>
				    </div>
				</div>
			</fieldset>
			<fieldset class="form-horizontal">
				<legend><?= @text( 'Image' ); ?></legend>
				<div class="control-group">
				    <label class="control-label" for="image"><?= @text( 'Image' ); ?></label>
				    <div class="controls">
				        <?= @helper('image.listbox', array('name' => 'image')); ?>
				    </div>
				</div>
			</fieldset>
		</div>

	</div>

    <div class="sidebar">
    	<fieldset class="form-horizontal">
    		<legend><?= @text( 'Publish' ); ?></legend>
    		<div class="control-group">
    		    <label class="control-label" for="enabled"><?= @text('Published') ?></label>
    		    <div class="controls">
    		        <?= @helper('select.booleanlist', array('name' => 'enabled', 'selected' => $category->enabled)) ?>
    		    </div>
    		</div>
    		<div class="control-group">
    		    <label class="control-label" for="access"><?= @text('Access Level') ?></label>
    		    <div class="controls">
    		        <?= @helper('listbox.access', array('name' => 'access', 'state' => $category, 'deselect' => false)) ?>
    		    </div>
    		</div>
    	</fieldset>
        <fieldset class="categories group">
            <legend><?= @text('Parent') ?></legend>
            <div class="control-group">
                <?= @helper('com://admin/categories.template.helper.listbox.categories', array(
                'name'      => 'category_id',
                'selected'  => $category->parent_id,
                'attribs'   => array('id' => 'category_id', 'class' => 'required'),
                'prompt'    => '- None -',
                'max_depth' => 1
            )) ?>
            </div>
        </fieldset>
    </div>
</form>
{'fraction_non_alphanumeric': 0.22375562102651575, 'fraction_numerical': 0.004962009613893627, 'mean_word_length': 2.6941580756013748, 'pattern_counts': {'":': 0, '<': 173, '<?xml version=': 0, '>': 211, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6649307', 'n_tokens_mistral': 2316, 'n_tokens_neox': 2117, 'n_words': 399}