.widget .widget-body = simple_form_for(@periodo_matriz_de_saldo_contabil, method: :patch, url: contabilidade_atualizar_campos_para_mapeamentos_manuais_path(@periodo_matriz_de_saldo_contabil)) do |f| legend strong Editar Campos do RREO/RGF table.table.table-bordered.table-hover.table-responsive thead tr th.text-center width="10%" Tipo th.text-center width="10%" Anexo th.text-center width="35%" Linha th.text-center width="10%" Coluna th.text-center width="10%" Mês th.text-center width="15%" Valor th.text-center width="10%" tbody#mapeamentos_manuais = f.fields_for :mapeamentos_manuais, @periodo_matriz_de_saldo_contabil.mapeamentos_manuais do |mapeamento_manual| = render 'mapeamento_manual_fields', f: mapeamento_manual tfoot tr td.links colspan="7" align="right" = link_to_add_association ' Adicionar'.html_safe, f, :mapeamentos_manuais, :"data-association-insertion-node" => "tbody#mapeamentos_manuais", :"data-association-insertion-method" => "append", class: 'btn btn-primary btn-sm', id: 'btn-add-mapeamentos_manuais' .row .col-sm-4 .col-sm-2 = f.submit "Salvar", class: "btn btn-primary" .col-sm-2 = link_to "Voltar", @periodo_matriz_de_saldo_contabil, class: "btn btn-default" / javascript: / $(function(){ / $('form').on('cocoon:after-insert', function(e, insertedItem) { / $('select.s2', insertedItem).select2(); / }) / }) / function limpaSelectBox(id){ / select_box = $(id).empty().select2({ / placeholder: "Selecione", / allowClear: true / }) / select_box.prepend(new Option('Selecione', '', true, true)); / select_box.trigger('change'); / return(select_box); / } / function populaSelectBox(select_box){ / select_box.prepend(new Option('Selecione', '', true, true)); / select_box.trigger('change'); / }