<commit_before>- options = {}
- options[:url] = @form_url if @form_url
- options.deep_merge!(data: {dialog: params[:dialog]}) if params[:dialog]
- options[:namespace] = params[:namespace] if params[:namespace]

= ekylibre_form_for(resource, options) do |f|
  - if params[:redirect]
    = hidden_field_tag(:redirect, params[:redirect])
  - f.add(:submit, :create.tl, data: { disable_with: :please_wait.tl }, class: 'primary')
  - if local_assigns[:with_continue]
    - f.add(:submit, :create_and_continue.tl, data: { disable_with: :please_wait.tl }, class: 'primary', name: :create_and_continue)

  - if params[:form_partial]
    = f.fields(params[:form_partial])
  - else
    = f.fields

  - f.add(:link, :cancel.tl, (params[:redirect] || local_assigns[:cancel_url] || {action: :index}), (params[:dialog] ? {class: 'btn', data: {close_dialog: params[:dialog]}} : {class: 'btn'}))
  = f.actions
<commit_msg>Removing 'Create and next' when displaying a form in a popup<commit_after>- options = {}
- options[:url] = @form_url if @form_url
- options.deep_merge!(data: {dialog: params[:dialog]}) if params[:dialog]
- options[:namespace] = params[:namespace] if params[:namespace]

= ekylibre_form_for(resource, options) do |f|
  - if params[:redirect]
    = hidden_field_tag(:redirect, params[:redirect])
  - f.add(:submit, :create.tl, data: { disable_with: :please_wait.tl }, class: 'primary')
  - if local_assigns[:with_continue] && !params[:dialog]
    - f.add(:submit, :create_and_continue.tl, data: { disable_with: :please_wait.tl }, class: 'primary', name: :create_and_continue)

  - if params[:form_partial]
    = f.fields(params[:form_partial])
  - else
    = f.fields

  - f.add(:link, :cancel.tl, (params[:redirect] || local_assigns[:cancel_url] || {action: :index}), (params[:dialog] ? {class: 'btn', data: {close_dialog: params[:dialog]}} : {class: 'btn'}))
  = f.actions

{'fraction_non_alphanumeric': 0.18520489622139436, 'fraction_numerical': 0.0, 'mean_word_length': 5.245847176079734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3729431', 'n_tokens_mistral': 650, 'n_tokens_neox': 637, 'n_words': 133}