Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12124

Provide a parameter in order to add a class to a displayer

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 7.1-milestone-2
    • Display
    • None
    • Unknown

    Description

      Example

      $doc.getObject('TotemCode.TotemClass').display('contentSize','edit')
      

      generates:

      <input size="30" id="TotemCode.TotemClass_0_contentSize" value="1000" name="TotemCode.TotemClass_0_contentSize" type="text">
      

      Desired result:

      <input size="30" id="TotemCode.TotemClass_0_contentSize" value="1000" name="TotemCode.TotemClass_0_contentSize" type="text" class="form-control"/>
      

      Currently there is no way to add a class (like class="form-control") for the output generated by the displayers.

      The displayer generates an ID which is good for JS, but when we want to apply a generic skin style for form controls we need classes.

      For example .form-control classes are used in Bootstrap to add style for form controls, see http://getbootstrap.com/css/#forms

      Currently the solution in order to add the needed classes is to manually write the HTML instead of using the displayers.

      Attachments

        Activity

          People

            Unassigned Unassigned
            evalica Ecaterina Moraru (Valica)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: