浏览代码

Merge pull request #667 from ivan1986/patch-1

change disabled to readonly
Thomas 13 年之前
父节点
当前提交
975e7fc136
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Resources/views/Form/silex_form_div_layout.html.twig

+ 1 - 1
Resources/views/Form/silex_form_div_layout.html.twig

@@ -284,7 +284,7 @@
 
 
 {% block widget_attributes %}
 {% block widget_attributes %}
 {% spaceless %}
 {% spaceless %}
-    id="{{ id }}" name="{{ full_name }}"{% if read_only %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
+    id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %}
     {% for attrname,attrvalue in attr %}{{attrname}}="{{attrvalue}}" {% endfor %}
     {% for attrname,attrvalue in attr %}{{attrname}}="{{attrvalue}}" {% endfor %}
 {% endspaceless %}
 {% endspaceless %}
 {% endblock widget_attributes %}
 {% endblock widget_attributes %}