我正在 Rails 4 ActiveAdmin 和 Money-Rails 上使用。有没有办法在一行文本中有两个或多个输入?
para "Please enter the amount"
f.input :amount_due_currency, :label => "Dollars ",:input_html => {:style => 'width:3%'}
para "and"
f.input :amount_due_cents, :label => "cents ", :input_html => {:style => 'width:10%'}
para "to deposit on your account."
我需要的输出看起来像
请输入要存入您帐户的金额 __ 美元和 __ 美分。
我尝试了字符串插值,但失败了。有人能帮助我吗?
我相信你可以使用Arbrecolumns http://activeadmin.info/12-arbre-components.html#columns布局表单。为了更好的控制,我使用 CSS 来覆盖各个输入的样式,例如:
form.subscription {
#details {
li:nth-child(n+2):nth-child(-n+5) {
display: inline-block;
width: 48%;
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)