如何对齐输入字段和删除按钮茧

时间:2017-01-09 03:23:35

标签: ruby-on-rails ruby twitter-bootstrap haml cocoon-gem

我正在尝试对齐输入字段并删除嵌套表单上的按钮。我使用的是rails 4,haml,BS4和cocoon。这就是我所拥有的:

_form.html.haml

    .row-fluid
        .col-md-12
            %h3 Bullet Points
            #bps-form
                = f.simple_fields_for :bps do |bp|
                    = render 'bp_fields', f: bp
                .links
                = link_to_add_association 'Add Bp', f, :bps,  class: 'btn btn-secondary add-button'

_bp_fields.html.haml

.form-inline.clearfix
    .row
        .nested-fields
            = f.input :bp,  placeholder: "Enter a bullet point", label: false, input_html: { class: "form-input form-control", style: 'width:80%;'}

            = link_to_remove_association "Remove", f, class: "form-control btn btn-secondary", style: 'height:20%; display:inline; float:right;' 

更新enter image description here

0 个答案:

没有答案