.nested-fields.refer .form-group .row.destino - if f.object.unidade_gestora.present? && f.object.persisted? .col-sm-3 label Unidade Gestora Destino input.form-control.input-md.unidade readonly="readonly" value="#{f.object.unidade_gestora.codigo_e_nome}" = hidden_field_tag :unidade_gestora, value="#{f.object.unidade_gestora.id}" - else .col-sm-3 = f.input :unidade_gestora_id, label: "Unidade Gestora Destino", collection: @unidades_gestoras, label_method: :codigo_e_nome, include_blank: "Selecione", input_html: { class: "s2 unidade", data: { id: "unidade_destino" } } - if f.object.centro_de_custo.present? && f.object.persisted? .col-sm-3 label Centro de Custos input.form-control.input-md readonly="readonly" value="#{f.object.centro_de_custo.codigo_e_descricao_e_mae_principal}" = hidden_field_tag :centro_de_custo, value="#{f.object.centro_de_custo.id}" - else .col-sm-3 = f.input :centro_de_custo_id, label: "Centro de Custos", collection: @centros_destinos, label_method: :codigo_e_descricao_e_mae_principal, include_blank: "Selecione", input_html: { class: "s2 centro_de_custo", id: "centro_de_custo_destino" } .col-sm-4 label Responsável pelo Centro de Custos - if f.object.responsavel.present? && f.object.persisted? input.form-control.input-md readonly="readonly" id="responsavel_centro_de_custo_destino" value="#{f.object.responsavel.cpf_e_nome}" - else input.form-control.input-md readonly="readonly" id="responsavel_centro_de_custo_destino" = f.input :responsavel_id, as: :hidden, input_html: { class: 'responsavel_destino' } .col-sm-2.remover = link_to_remove_association " Remover", f, class: "btn btn-sm btn-danger icone-anular"