浏览代码

[FrameworkBundle] Fixed maxlength attribute in TextField in PHP templates

Bernhard Schussek 14 年之前
父节点
当前提交
17acdd971c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/text_field.php

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/text_field.php

@@ -3,6 +3,6 @@
     name="<?php echo $field->getName() ?>"
     value="<?php echo $field->getDisplayedData() ?>"
     <?php if ($field->isDisabled()): ?>disabled="disabled"<?php endif ?>
-    <?php // FIXME if (!isset($attr['maxlength']) && $field->getMaxLength() > 0) $attr['maxlength'] = $field->getMaxLength() ?>
+    <?php if (!isset($attr['maxlength']) && $field->getMaxLength() > 0) $attr['maxlength'] = $field->getMaxLength() ?>
     <?php echo $view['form']->attributes($attr) ?>
 />