<commit_before><?php
/**
 * @version     $Id$
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Newsfeeds
 * @copyright   Copyright (C) 2011 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.tooltip') ?>
<?= @helper('behavior.validator') ?>

<script src="media://lib_koowa/js/koowa.js" />

<script>
if(Form && Form.Validator) {
    Form.Validator.add('validate-count', {
        errorMsg: <?= json_encode(@text('Please enter a higher number than 0.')) ?>,
        test: function(field){
            return field.get('value').toInt() > 0;
        }
    });
}
</script>

<form action="<?= @route('id='.$newsfeed->id) ?>" method="post" class="-koowa-form">
    <div class="grid_8">
        <div class="panel title group">
        	<input class="inputbox required" type="text" name="name" id="title" size="40" maxlength="255" value="<?= $newsfeed->name; ?>" placeholder="<?= @text( 'Title' ); ?>" />
            <label for="alias">
                <?= @text( 'Alias' ); ?>:
                <input class="inputbox" type="text" name="alias" id="alias" size="40" maxlength="255" value="<?= $newsfeed->slug; ?>" />
            </label>
        </div>
        <fieldset class="adminform">
            <legend><?= @text( 'Details' ) ?></legend>
            <table class="admintable">
            <tr>
                <td class="key">
                    <label for="link">
                        <?= @text( 'Link' ) ?>:
                    </label>
                </td>
                <td>
                    <input class="inputbox required validate-url" type="text" size="60" name="link" id="link" value="<?= $newsfeed->link ?>" />
                </td>
            </tr>
            <tr>
                <td class="key">
                    <label for="numarticles">
                        <?= @text( 'Number of Articles' ) ?>:
                    </label>
                </td>
                <td>
                    <input class="inputbox required validate-integer validate-count" type="text" size="2" name="numarticles" id="numarticles" value="<?= $newsfeed->numarticles ?>" />
                </td>
            </tr>
            <tr><commit_msg>re #101: Rename alias to slug<commit_after><?php
/**
 * @version     $Id$
 * @category	Nooku
 * @package     Nooku_Server
 * @subpackage  Newsfeeds
 * @copyright   Copyright (C) 2011 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.tooltip') ?>
<?= @helper('behavior.validator') ?>

<script src="media://lib_koowa/js/koowa.js" />

<script>
if(Form && Form.Validator) {
    Form.Validator.add('validate-count', {
        errorMsg: <?= json_encode(@text('Please enter a higher number than 0.')) ?>,
        test: function(field){
            return field.get('value').toInt() > 0;
        }
    });
}
</script>

<form action="<?= @route('id='.$newsfeed->id) ?>" method="post" class="-koowa-form">
    <div class="grid_8">
        <div class="panel title group">
        	<input class="inputbox required" type="text" name="name" id="title" size="40" maxlength="255" value="<?= $newsfeed->name; ?>" placeholder="<?= @text( 'Title' ); ?>" />
            <label for="slug">
                <?= @text( 'Slug' ); ?>:
                <input class="inputbox" type="text" name="slug" id="slug" size="40" maxlength="255" value="<?= $newsfeed->slug; ?>" placeholder="<?= @text( 'Slug' ); ?>" />
            </label>
        </div>
        <fieldset class="adminform">
            <legend><?= @text( 'Details' ) ?></legend>
            <table class="admintable">
            <tr>
                <td class="key">
                    <label for="link">
                        <?= @text( 'Link' ) ?>:
                    </label>
                </td>
                <td>
                    <input class="inputbox required validate-url" type="text" size="60" name="link" id="link" value="<?= $newsfeed->link ?>" />
                </td>
            </tr>
            <tr>
                <td class="key">
                    <label for="numarticles">
                        <?= @text( 'Number of Articles' ) ?>:
                    </label>
                </td>
                <td>
                    <input class="inputbox required validate-integer validate-count" type="text" size="2" name="numarticles" id="numarticles" value="<?= $newsfeed->numarticles ?>" />
                </td>
            </tr>
            <tr>
{'fraction_non_alphanumeric': 0.19435075885328837, 'fraction_numerical': 0.00948566610455312, 'mean_word_length': 1.9344465058750773, 'pattern_counts': {'":': 0, '<': 102, '<?xml version=': 0, '>': 114, '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': '2563002', 'n_tokens_mistral': 1493, 'n_tokens_neox': 1429, 'n_words': 299}