Development

#1891 ([PATCH] Admin generator filters HTML defect)

You must first sign up to be able to contribute.

Ticket #1891 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

[PATCH] Admin generator filters HTML defect

Reported by: Serg.Sokolenko Assigned to: fabien
Priority: minor Milestone: 1.0.9
Component: generator Version: 1.0.8
Keywords: generator filters label Cc:
Qualification: Unreviewed

Description

File: /generator/sfPropelAdmin/default/template/templates/_filters.php

The code:

14 	    <div class="form-row">
15 	    <label for="<?php echo $column->getName() ?>">[?php echo __('<?php echo str_replace("'", "\\'", $this->getParameterValue('list.fields.'.$column->getName().'.name')) ?>:') ?]</label>
16 	    <div class="content">
17 	    [?php echo <?php echo $this->getColumnFilterTag($column) ?> ?]
18 	<?php if ($this->getParameterValue('list.fields.'.$column->getName().'.filter_is_empty')): ?>
19 	    <div>[?php echo checkbox_tag('filters[<?php echo $column->getName() ?>_is_empty]', 1, isset($filters['<?php echo $column->getName() ?>_is_empty']) ? $filters['<?php echo $column->getName() ?>_is_empty'] : null) ?]&nbsp;<label for="filters[<?php echo $column->getName() ?>_is_empty]">[?php echo __('is empty') ?]</label></div>
20 	<?php endif; ?>
21 	    </div>
22 	    </div>

generates wrong value for label "for" attribute.

Generated code:

    <div class="form-row">
    <label for="id"><?php echo __('Id:') ?></label>
    <div class="content">
    <?php echo input_tag('filters[id]', isset($filters['id']) ? $filters['id'] : null, array (
  'size' => 7,
)) ?>
    </div>
    </div>

And finally generated HTML:

    <div class="form-row">
    <label for="id">Id:</label>
    <div class="content">
    <input type="text" name="filters[id]" id="filters_id" value="" size="15" /></div>
    </div>

As you see <label for="id">, but must be <label for="filters_id">

Attachments

_filters.php (3.9 kB) - added by Pascal.Borreli on 11/09/07 02:04:16.
Added the Patch and updated functional tests

Change History

11/09/07 02:04:16 changed by Pascal.Borreli

  • attachment _filters.php added.

Added the Patch and updated functional tests

11/09/07 02:05:31 changed by Pascal.Borreli

  • version changed from 1.0.4 to 1.0.8.
  • qualification set to Unreviewed.
  • summary changed from Admin generator filters HTML defect to [PATCH] Admin generator filters HTML defect.

11/13/07 18:08:57 changed by fabien

  • milestone set to 1.0.9.

11/13/07 18:10:59 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [5997]) fixed admin generator filters HTML defect (closes #1891 - patch from Pascal Borreli)

11/13/07 18:14:24 changed by fabien

(In [5998]) fixed admin generator filters HTML defect (closes #1891 - patch from Pascal Borreli)