<commit_before>%table.table.interactions.market{data: { type: "market_model_table" } }
  %thead
    %th{data: {header: 'stakeholder_from' }}
      = I18n.t("market_model.table.headers.stakeholder_from")
    %th{data: {header: 'stakeholder_to' }}
      = I18n.t("market_model.table.headers.stakeholder_to")
    %th{data: {header: 'foundation' }}
      = I18n.t("market_model.table.headers.foundation")
    %th{data: {header: 'applied_stakeholder' }}
      = I18n.t("market_model.table.headers.applied_stakeholder")
    %th.tariff-type{data: {header: 'tariff_type' }}
      = I18n.t("market_model.table.headers.tariff_type")
    %th.col-sm-2{data: {header: 'tariff' }}
      = I18n.t("market_model.table.headers.tariff")
    %th
    %th

  %tbody
    - market_model.interactions.each do |interaction|
      %tr
        %td.editable.select
          %select.form-control.from
            = stakeholder_options(selected: interaction["stakeholder_from"])

        %td.editable.select
          %select.form-control.to
            = stakeholder_options(selected: interaction["stakeholder_to"])

        %td.editable.select
          %select.form-control.foundation
            = foundation_options(selected: interaction["foundation"])

        %td.editable.select
          %select.form-control.applied
            = options_for_stakeholders(selected: interaction["applied_stakeholder"])

        %td.editable.tariff-type
          %input{ name: "tariff_type", type: "hidden", value: interaction["tariff_type"].presence || 'fixed' }

        %td.editable.input-switch{data: {price: interaction["tariff"]}}
          .input-group
            .input-group-btn
              %button.btn.btn-default.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"}
                %span.glyphicon.glyphicon-euro
                %span.caret
              %ul.dropdown-menu
                %li
                  %a{:href => "#", 'data-type' => 'fixed'}
                    %span.glyphicon.glyphicon-euro
                    = t('tariff.type.fixed')
                %li
                  %a{:href => "#", 'data-type' => 'curve'}
                    %span.glyphicon.glyphicon-signal
                    = t('tariff.type.curve')
                %li
                  %a{:href => "#", 'data-type' => 'merit'}
                    %span.glyphicon.glyphicon-sort-by-attributes
                    = t('tariff.type.merit')

            .fixed-tariff
              %input.form-control
            .curve-tariff
              %select.form-control
                = financial_profile_options
            .merit-tariff.btn.btn-default.disabled
              Merit price

        %td
          = link_to "#", class: "add-row text-success" do
            %span.glyphicon.glyphicon-plus
        %td
          = link_to "#", class: "remove-row text-danger" do
            %span.glyphicon.glyphicon-remove

<commit_msg>Fix stakeholder select on new market model form<commit_after>%table.table.interactions.market{data: { type: "market_model_table" } }
  %thead
    %th{data: {header: 'stakeholder_from' }}
      = I18n.t("market_model.table.headers.stakeholder_from")
    %th{data: {header: 'stakeholder_to' }}
      = I18n.t("market_model.table.headers.stakeholder_to")
    %th{data: {header: 'foundation' }}
      = I18n.t("market_model.table.headers.foundation")
    %th{data: {header: 'applied_stakeholder' }}
      = I18n.t("market_model.table.headers.applied_stakeholder")
    %th.tariff-type{data: {header: 'tariff_type' }}
      = I18n.t("market_model.table.headers.tariff_type")
    %th.col-sm-2{data: {header: 'tariff' }}
      = I18n.t("market_model.table.headers.tariff")
    %th
    %th

  %tbody
    - market_model.interactions.each do |interaction|
      %tr
        %td.editable.select
          %select.form-control.from
            = stakeholder_options(selected: interaction["stakeholder_from"])

        %td.editable.select
          %select.form-control.to
            = stakeholder_options(selected: interaction["stakeholder_to"])

        %td.editable.select
          %select.form-control.foundation
            = foundation_options(selected: interaction["foundation"])

        %td.editable.select
          %select.form-control.applied
            - if @testing_ground
              = options_for_stakeholders(selected: interaction["applied_stakeholder"])
            - else
              = options_for_all_stakeholders(selected: interaction["applied_stakeholder"])

        %td.editable.tariff-type
          %input{ name: "tariff_type", type: "hidden", value: interaction["tariff_type"].presence || 'fixed' }

        %td.editable.input-switch{data: {price: interaction["tariff"]}}
          .input-group
            .input-group-btn
              %button.btn.btn-default.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", :type => "button"}
                %span.glyphicon.glyphicon-euro
                %span.caret
              %ul.dropdown-menu
                %li
                  %a{:href => "#", 'data-type' => 'fixed'}
                    %span.glyphicon.glyphicon-euro
                    = t('tariff.type.fixed')
                %li
                  %a{:href => "#", 'data-type' => 'curve'}
                    %span.glyphicon.glyphicon-signal
                    = t('tariff.type.curve')
                %li
                  %a{:href => "#", 'data-type' => 'merit'}
                    %span.glyphicon.glyphicon-sort-by-attributes
                    = t('tariff.type.merit')

            .fixed-tariff
              %input.form-control
            .curve-tariff
              %select.form-control
                = financial_profile_options
            .merit-tariff.btn.btn-default.disabled
              Merit price

        %td
          = link_to "#", class: "add-row text-success" do
            %span.glyphicon.glyphicon-plus
        %td
          = link_to "#", class: "remove-row text-danger" do
            %span.glyphicon.glyphicon-remove


{'fraction_non_alphanumeric': 0.14158562716334266, 'fraction_numerical': 0.004285478819845063, 'mean_word_length': 2.009920634920635, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6950310', 'n_tokens_mistral': 1939, 'n_tokens_neox': 1842, 'n_words': 244}