= turbo_frame_tag "questions_table" do = form_with(model: InterviewQuestion.new, url: [@project, @respondent_category, InterviewQuestion.new], local: false, html: { "id" => "interviewQuestionForm" }) do table.table.table-striped thead tr th | Query th.text-center Section th th tbody tr data-controller="new-question-row" td style="width: 70%;" textarea.form-control name="interview_question[question]" data-action="keydown.ctrl+enter->new-question-row#submit" data-new-question-row-target="newQuestion" small.text-muted Tip: Press CTRL+Enter to submit td select.form-control name="interview_question[master_section_id]" required="required" option value="" disabled="disabled" selected="selected" - @project.master_sections.order(:name).each do |section| option value="#{section.id}"= section.name td colspan="2" button.btn.btn-primary.w-100 data-new-question-row-target="submitButton" i.bi.bi-plus-lg table.table.table-striped thead tr th | Query th.text-center Section th th tbody - @interview_questions.each do | interview_question | tr td.align-middle = interview_question.question td.align-middle = interview_question.master_section&.name td.align-middle = link_to "Edit Section", edit_project_respondent_category_interview_question_path(@project, @respondent_category, interview_question), class: "btn btn-secondary btn-sm ms-2", style: "font-weight: bold; font-size: 0.7rem; white-space: nowrap; padding: 5px; padding-top: 0px; padding-bottom: 0px;" / td.align-middle / = link_to edit_project_respondent_category_interview_question_path(@project, @respondent_category, interview_question), class: "btn btn-link" do / i.bi.bi-pencil td.align-middle = button_to [@project, @respondent_category, interview_question], method: :delete, form: { data: { turbo_method: :delete, turbo_confirm: 'Are you sure you want to delete this question?' } }, class: "btn btn-link text-danger" do i.feather-14 data-feather="trash-2"