<commit_before>= nested_form_for @order,
                  html: { class: "ui form #{"error" if has_errors?}" } do |f|

  - if has_errors?
    .ui.error.message
      .header Hubo un problema guardando la orden
      ul
        - f.object.errors.full_messages.each do |msg|
          li = msg

  .ui.grid
    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :nombres
        = f.text_field :nombres,
                       required: true,
                       placeholder: "Nombres completos"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :email
        = f.email_field :email,
                        required: true,
                        placeholder: "<EMAIL>"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :organizacion, "Organización"
        = f.text_field :organizacion,
                       required: true,
                       placeholder: "Establecimiento"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :telefono, "Teléfono de contacto"
        = f.telephone_field :telefono,
                            required: true,
                            placeholder: "(099) 663-1191"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :cedula, "Cédula/RUC/Pasaporte"
        = f.text_field :cedula,
                        required: true,
                        placeholder: "1104332357"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :direccion, "Dirección de entrega"
        = f.telephone_field :direccion,
                            required: true,
                            placeholder: "Calle principal y secundaria"

      .field
        = f.telephone_field :direccion_2,
                            placeholder: "Referencia o número de departamento"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :observaciones
        = f.text_area :observaciones,
                      rows: 2,
                      placeholder: "Notas adicionales"

    .column.eight.wide.computer.only

    = render "order_items_form", f: f

    .column.sixteen.wide.center.aligned
      = f.submit "Ordenar",
                 class: "ui massive teal button"<commit_msg>disable submit btn while submitting form<commit_after>= nested_form_for @order,
                  html: { class: "ui form #{"error" if has_errors?}" } do |f|

  - if has_errors?
    .ui.error.message
      .header Hubo un problema guardando la orden
      ul
        - f.object.errors.full_messages.each do |msg|
          li = msg

  .ui.grid
    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :nombres
        = f.text_field :nombres,
                       required: true,
                       placeholder: "<NAME>"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :email
        = f.email_field :email,
                        required: true,
                        placeholder: "<EMAIL>"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :organizacion, "Organización"
        = f.text_field :organizacion,
                       required: true,
                       placeholder: "Establecimiento"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :telefono, "Teléfono de contacto"
        = f.telephone_field :telefono,
                            required: true,
                            placeholder: "(099) 663-1191"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :cedula, "Cédula/RUC/Pasaporte"
        = f.text_field :cedula,
                        required: true,
                        placeholder: "1104332357"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :direccion, "Dirección de entrega"
        = f.telephone_field :direccion,
                            required: true,
                            placeholder: "Calle principal y secundaria"

      .field
        = f.telephone_field :direccion_2,
                            placeholder: "Referencia o número de departamento"

    .column.eight.wide.computer.only

    .column.eight.wide.computer.sixteen.wide.mobile
      .field
        = f.label :observaciones
        = f.text_area :observaciones,
                      rows: 2,
                      placeholder: "Notas adicionales"

    .column.eight.wide.computer.only

    = render "order_items_form", f: f

    .column.sixteen.wide.center.aligned
      = f.submit "Ordenar",
                 class: "ui massive teal button",
                 data: { disable_with: "Ordenando..." }
{'fraction_non_alphanumeric': 0.10153071110249952, 'fraction_numerical': 0.008525479558225151, 'mean_word_length': 1.565606361829026, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '2624688', 'n_tokens_mistral': 1598, 'n_tokens_neox': 1490, 'n_words': 288}