【发布时间】:2012-04-18 09:52:45
【问题描述】:
使用文档,我可以为我的领域的布局设置自己的助手,但我还想个性化一些由 play 给出的领域。
主要原因是 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>
我该怎么做? 感谢您的帮助!
【问题讨论】:
标签: templates scala playframework-2.0