<commit_before>- if @scenario.errors.any?
  .alert.alert-danger
    %strong Sorry, there were errors updating the scenario.

.row
  .span12
    = simple_form_for [:data, @scenario],
        :url => @scenario.new_record? ? inspect_scenarios_path : inspect_scenario_path(:id => @scenario) do |f|
      = f.input :author
      = f.input :protected, :as => :boolean, :hint => "Protected scenarios are migrated during deploys, and are read-only through the API"
      = f.input :end_year
      = f.input :area_code, collection: grouped_region_types, as: :grouped_select, group_method: :regions, group_label_method: :human_name, value_method: :key, label_method: :key, include_blank: false
      = f.input :user_values, label: 'User values (YAML)', as: :text, :hint => "Position (values) of all the sliders", input_html: { data: { codemirror: 'yaml' } }
      = f.input :balanced_values, label: 'Balanced values (YAML)', as: :text, :hint => "Values set automatically by ETEngine ensuring groups sum to 100%", input_html: { data: { codemirror: 'yaml' } }
      = f.input :metadata, label: 'Metadata (JSON)', as: :text, input_html: { data: { codemirror: 'application/json' } }
      = f.simple_fields_for :heat_network_order, @scenario.heat_network_order do |hno|
        = hno.input :order, as: :text, input_html: { value: user_sortable_list(@scenario.heat_network_order) }, label: 'Heat network dispatchables order', hint: 'Delete all lines to revert to default'
      = f.button :submit

  :css
    #scenario_user_values_as_yaml,<commit_msg>Make "create / update scenario" button larger<commit_after>- if @scenario.errors.any?
  .alert.alert-danger
    %strong Sorry, there were errors updating the scenario.

.row
  .span12
    = simple_form_for [:data, @scenario],
        :url => @scenario.new_record? ? inspect_scenarios_path : inspect_scenario_path(:id => @scenario) do |f|
      = f.input :author
      = f.input :protected, :as => :boolean, :hint => "Protected scenarios are migrated during deploys, and are read-only through the API"
      = f.input :end_year
      = f.input :area_code, collection: grouped_region_types, as: :grouped_select, group_method: :regions, group_label_method: :human_name, value_method: :key, label_method: :key, include_blank: false
      = f.input :user_values, label: 'User values (YAML)', as: :text, :hint => "Position (values) of all the sliders", input_html: { data: { codemirror: 'yaml' } }
      = f.input :balanced_values, label: 'Balanced values (YAML)', as: :text, :hint => "Values set automatically by ETEngine ensuring groups sum to 100%", input_html: { data: { codemirror: 'yaml' } }
      = f.input :metadata, label: 'Metadata (JSON)', as: :text, input_html: { data: { codemirror: 'application/json' } }
      = f.simple_fields_for :heat_network_order, @scenario.heat_network_order do |hno|
        = hno.input :order, as: :text, input_html: { value: user_sortable_list(@scenario.heat_network_order) }, label: 'Heat network dispatchables order', hint: 'Delete all lines to revert to default'
      = f.button :submit, class: 'btn btn-primary btn-large'

  :css
    #scenario_user_values_as_yaml,
{'fraction_non_alphanumeric': 0.13152866242038216, 'fraction_numerical': 0.0031847133757961785, 'mean_word_length': 4.305743243243243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4031540', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1016, 'n_words': 294}