%= form_with(model: house_pn_fund, local: true) do |form| %> <%= render partial: "shared/show_errors", locals: {record: house_pn_fund} %> <%= edit_table_open %> <% if !pundit_user.has_house_policyscope?(HousePn) %> <%= edit_table_row (form.label :house_id), (form.collection_select :house_id, House.all.ordered_by_name, :id, :format_for_formselect, include_blank: true) %> <% else %> <%= form.hidden_field :house_id, :value => pundit_user.user.person.house_id %> <% end %> <%= edit_table_row (form.label :descrizione), (form.text_field :descrizione, id: :house_pn_fund_descrizione) %> <% if current_user.nil? ? false : current_user.admin? %> <%= edit_table_row (form.label :is_default), (form.check_box :is_default, id: :house_pn_fund_is_default) %> <% end %> <%= edit_table_close %>