<commit_before>%p= t('groups.edit.advanced.description')

.form-group
  = form.label :membership_mode
  = form.select :membership_mode, group_membership_modes, {}, class: 'form-control'
.form-group#link_code.membership-mode-option
  = form.label :link_code
  = form.text_field :link_code, class: 'form-control'
  %span.help-block= t('groups.edit.class_link_code.help_html')
.form-group#parents_of.membership-mode-option
  = form.label :parents_of
  = form.select :parents_of, [['(' + t('none') + ')', '']] + (Group.where(hidden: false).order('name').to_a - [@group]).map { |g| [g.name, g.id] }, {}, class: 'form-control'
  %span.help-block= t('groups.edit.parents_of.help_html')
.form-group
  = form.submit t('save_changes'), class: 'btn btn-success'

.box.box-warning{ style: 'margin-top:50px' }
  .box-header
    %h3.box-title= t('groups.hide.heading')
  .box-body
    %p= t('groups.hide.intro')
    - if @group.hidden?
      = link_to group_path(@group, 'group[hidden]' => false), data: { method: 'put', confirm: t('are_you_sure') }, class: 'btn btn-success' do
        = icon 'fa fa-eye'
        = t('groups.hide.unhide_button')
    - else
      = link_to group_path(@group, 'group[hidden]' => true), data: { method: 'put', confirm: t('are_you_sure') }, class: 'btn btn-warning' do
        = icon 'fa fa-eye-slash'
        = t('groups.hide.button')

.box.box-danger{ style: 'margin-top:50px' }
  .box-header
    %h3.box-title= t('groups.delete.heading')
  .box-body
    %p= t('groups.delete.intro')
    = link_to @group, data: { method: 'delete', confirm: t('are_you_sure') }, class: 'btn btn-danger' do
      = icon 'fa fa-trash'
      = t('groups.delete.button')<commit_msg>Fix new group url error.<commit_after>%p= t('groups.edit.advanced.description')

.form-group
  = form.label :membership_mode
  = form.select :membership_mode, group_membership_modes, {}, class: 'form-control'
.form-group#link_code.membership-mode-option
  = form.label :link_code
  = form.text_field :link_code, class: 'form-control'
  %span.help-block= t('groups.edit.class_link_code.help_html')
.form-group#parents_of.membership-mode-option
  = form.label :parents_of
  = form.select :parents_of, [['(' + t('none') + ')', '']] + (Group.where(hidden: false).order('name').to_a - [@group]).map { |g| [g.name, g.id] }, {}, class: 'form-control'
  %span.help-block= t('groups.edit.parents_of.help_html')
.form-group
  = form.submit t('save_changes'), class: 'btn btn-success'

.box.box-warning{ style: 'margin-top:50px' }
  .box-header
    %h3.box-title= t('groups.hide.heading')
  .box-body
    %p= t('groups.hide.intro')
    - if @group.hidden?
      = link_to group_path(@group, 'group[hidden]' => false), data: { method: 'put', confirm: t('are_you_sure') }, class: 'btn btn-success' do
        = icon 'fa fa-eye'
        = t('groups.hide.unhide_button')
    - elsif @group.id
      = link_to group_path(@group, 'group[hidden]' => true), data: { method: 'put', confirm: t('are_you_sure') }, class: 'btn btn-warning' do
        = icon 'fa fa-eye-slash'
        = t('groups.hide.button')

.box.box-danger{ style: 'margin-top:50px' }
  .box-header
    %h3.box-title= t('groups.delete.heading')
  .box-body
    %p= t('groups.delete.intro')
    = link_to @group, data: { method: 'delete', confirm: t('are_you_sure') }, class: 'btn btn-danger' do
      = icon 'fa fa-trash'
      = t('groups.delete.button')
{'fraction_non_alphanumeric': 0.19544648137196924, 'fraction_numerical': 0.0035481963335304554, 'mean_word_length': 3.7647887323943663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5813934', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1250, 'n_words': 226}