= simple_form_for(@gerador_de_lote_bancario, url: gera_lotes_contabilidade_lotes_bancarios_path, html: { class: "form-vertical" }) do |f| fieldset legend strong | Gerar Lotes Bancários | Perfil .form-group .row .col-sm-3 = f.input :tipo, collection: [["Lotes Individuais", 1], ["Agrupado por Banco e Agência", 2]], as: :radio_buttons = error_for @gerador_de_lote_bancario, :base .row .col-sm-12 = link_to "Selecionar Todos", "#", class: "btn btn-default btn-sm mb-xs", onclick: "selectionarTodos()" ==< link_to "Desmarcar Todos", "#", class: "btn btn-default btn-sm mb-xs", onclick: "desmarcarTodos()" .table-responsive table.table.table-hover thead tr th width="50" Selecionar th Número th Qtd. de Contas th Liquidação th Empenho th Fornecedor th th width="180" Valor das Retenções th width="180" Valor tbody - @gerador_de_lote_bancario.pagamentos_pendentes(contexto_atual.id).each do |pagamento| tr td input class="form-check-input is-valid boolean optional checkbox_id" type="checkbox" value="#{pagamento.id}" name="contabilidade_gerador_de_lote_bancario[pagamentos_ids][]" id="contabilidade_gerador_de_lote_bancario_pagamentos_ids_#{pagamento.id}" td = pagamento.numero td = pagamento.contas_bancarias_por_pagamento.size td = pagamento.liquidacao.empenho_e_numero td = pagamento.liquidacao.empenho.numero_do_empenho td = pagamento.credor.nome_e_cpf_ou_cnpj.to_s td width="180px" .form-group.select.optional.contabilidade_gerador_de_lote_bancario_tipos select#contabilidade_gerador_de_lote_bancario_tipos.form-control.select.optional name="contabilidade_gerador_de_lote_bancario[envios_ao_banco][]" option value="#{pagamento.id}_2" Arquivo - if pagamento.try(:conta_bancaria).try(:agencia).try(:relatorio?) option value="#{pagamento.id}_1" selected="selected" Relatório - else option value="#{pagamento.id}_1" Relatório td = pagamento.valor_das_retencoes.to_f.real_contabil td b = pagamento.valor.to_f.real_contabil .form-actions .row .col-sm-12 = f.submit "Salvar", class: "btn btn-primary" = link_to "Cancelar", contabilidade_lotes_bancarios_path, class: "btn btn-default" javascript: $(document).ready(function() { selectionarTodos(); }); function selectionarTodos() { $.each($('.checkbox_id'), function () { $(this).prop( "checked", true ); }); } function desmarcarTodos() { $.each($('.checkbox_id'), function () { $(this).prop( "checked", false ); }); }