使用文档,我可以为围绕字段的布局设置自己的辅助程序,但我也想个性化一些由play提供的字段。
主要原因是为了Twitter Bootstrap 2,在checkbox.scala.html中需要更改。
如何实现这个功能? 感谢您的帮助!
主要原因是为了Twitter Bootstrap 2,在checkbox.scala.html中需要更改。
@input(field, args:_*) { (id, name, value, htmlArgs) =>
<input type="checkbox" id="@id" name="@name" value="@boxValue" @(if(value == Some(boxValue)) "checked" else "") @toHtmlArgs(htmlArgs.filterKeys(_ == 'value))>
<span>@args.toMap.get('_text)</span>
}
致:
<label class="checkbox">
<input type="checkbox" name="@name" id="@id" value="@boxValue" @(if(value == Some(boxValue)) "checked" else "") @toHtmlArgs(htmlArgs.filterKeys(_ == 'value)) />
@args.toMap.get('_text)
</label>
如何实现这个功能? 感谢您的帮助!