= javascript_include_tag 'bomcobox' = javascript_include_tag 'totalizando' = stylesheet_link_tag "inputs_select2" = javascript_include_tag "funcoes_lodash" = javascript_include_tag "select2_com_input" = simple_form_for(@centro_de_custo) do |f| = f.error_notification = f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? fieldset legend strong = @centro_de_custo.new_record? ? 'Cadastrar' : 'Editar' ' Centro de Custos div style="margin-top: 10px;" table.table.table-bordered.table-hover.table-responsive thead tr th Nome th width='8%' tbody#centro_de_custos_filhos = f.fields_for :centro_de_custos_filhos, @centro_de_custo.centro_de_custos_filhos.where(status: 1) do |centro_de_custo_filho| = render 'centro_de_custo_filho_fields', f: centro_de_custo_filho tfoot tr td.text-right colspan="2" = link_to_add_association ' Adicionar'.html_safe, f, :centro_de_custos_filhos, :"data-association-insertion-node" => "tbody#centro_de_custos_filhos", :"data-association-insertion-method" => "append", class: 'btn btn-primary btn-sm', id: 'btn-add-centro_de_custos_filhos' .form-group h6 ' (*) Campos Obrigatórios .form-actions .row .col-sm-12 = f.submit "Salvar", class: "btn btn-primary" = link_to "Cancelar", controladoria_centro_de_custos_path, class: "btn btn-default" - content_for :js do javascript: $(function(){ $('form').on('cocoon:after-insert', function(e, insertedItem) { }) })