Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.23 KB | None | 0 0
  1. <div id="info-username" class="additional-info">
  2. <p>Your username will be used as a way of <em>uniquely</em> identifying you when you log into your account. You can still log in using your email address in case you forget your username.</p>
  3. <p>It must be between 2-25 characters long and start with a letter. The following characters are permitted: letter, number, dot, underscore, dash.</p>
  4. </div>
  5.  
  6. ->add('username', TextType::class, array(
  7. 'info' => '<p>Your username will be used as a way of <em>uniquely</em> identifying you when you log into your account. You can still log in using your email address in case you forget your username.</p>
  8. <p>It must be between 2-25 characters long and start with a letter. The following characters are permitted: letter, number, dot, underscore, dash.</p>'
  9. )
  10.  
  11. ->add('username', TextType::class, array(
  12. 'help' => '<p>Your username will be used as a way of <em>uniquely</em> identifying you when you log into your account. You can still log in using your email address in case you forget your username.</p>
  13. <p>It must be between 2-25 characters long and start with a letter. The following characters are permitted: letter, number, dot, underscore, dash.</p>'
  14. )
  15.  
  16. ->add('username', TextType::class, array(
  17. 'attr' => array(
  18. 'help' => '<p>Your username will be used as a way of <em>uniquely</em> identifying you when you log into your account. You can still log in using your email address in case you forget your username.</p>
  19. <p>It must be between 2-25 characters long and start with a letter. The following characters are permitted: letter, number, dot, underscore, dash.</p>'
  20. ),
  21. )
  22. )
  23.  
  24. {# appResourcesviewsformform_div_layout.html.twig #}
  25. {% block form_row %}
  26. {% spaceless %}
  27. <div class="form-group">
  28. {{ form_label(form) }}
  29. <div class="col-sm-10">
  30. {{ form_widget(form) }}
  31. {{ form_errors(form) }}
  32. {% for attrname,attrvalue in attr %}
  33. {% if attrname == 'help' %}
  34. <div id="info-{{ id }}" class="additional-info alert alert-info alert-dismissible">
  35. <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  36. {{ attrvalue | raw }}
  37. </div>
  38. {% endif %}
  39. {% endfor %}
  40. </div>
  41. </div>
  42. {% endspaceless %}
  43. {% endblock form_row %}
  44.  
  45. {# appResourcesviewsformform_div_layout.html.twig #}
  46. {%- block widget_attributes -%}
  47. id="{{ id }}" name="{{ full_name }}"
  48. {%- if disabled %} disabled="disabled"{% endif -%}
  49. {%- if required %} required="required"{% endif -%}
  50. {%- for attrname, attrvalue in attr -%}
  51. {%- if attrname == 'help' -%}
  52. {# Prevent output of the help attribute #}
  53. {%- else -%}
  54. {{- " " -}}
  55. {%- if attrname in ['placeholder', 'title'] -%}
  56. {{- attrname }}="{{ translation_domain is same as(false) ? attrvalue : attrvalue|trans({}, translation_domain) }}"
  57. {%- elseif attrvalue is same as(true) -%}
  58. {{- attrname }}="{{ attrname }}"
  59. {%- elseif attrvalue is not same as(false) -%}
  60. {{- attrname }}="{{ attrvalue }}"
  61. {%- endif -%}
  62. {%- endif -%}
  63. {%- endfor -%}
  64. {%- endblock widget_attributes -%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement