<commit_before>= simple_form_for @link do |f|
  .ui.error.message
    = f.error_notification

  .field
    = f.input :name
    = f.input :description
    = f.input :url
    = f.input :tags, :collection => @tags, :selected => @selected, :label_method => :name, input_html: { :class => "ui dropdown" }, prompt: "Select a tag"
    .ui.segments
      .ui.segment
        .field
          .ui.toggle.checkbox
            = f.input :does_expire
      .ui.green.secondary.segment#date-segment{:style => "display: none"}
        = f.input :experies_on, as: :date, :html5 => true
  .actions
    - if @link.id
      = link_to "Delete link", @link, method: :delete, data: { confirm: 'Are you sure?' }, :class => "ui basic red button"
    = f.button :button, :type => :submit
:javascript
  $('.simple_form.ui.form')
  .form({
    fields: {
      link_name: {
        rules: [
          {
            type: 'empty',
            prompt: 'Name can not be empty'
          }
        ]
      },
      link_url: {
        rules: [
          {
            type: 'empty',
            prompt: 'URL can not be empty'
          }
        ]
      }
    },
    onFailure: function() {
    $('.loading.disabled').removeClass('disabled loading');
    return false;
    }
  });

  $('.ui.dropdown')
    .dropdown()
  ;
  if ($('.boolean').checkbox().first().checkbox("is checked")) {
    $('#date-segment').show();
  }
  $('.boolean').checkbox().first().checkbox({
    onChecked: function() {
      $('#date-segment').show();
    },
    onUnchecked: function() {
      $('#date-segment').hide();
    }
  });
<commit_msg>quick fix to non existing date select<commit_after>= simple_form_for @link do |f|
  .ui.error.message
    = f.error_notification

  .field
    = f.input :name
    = f.input :description
    = f.input :url
    = f.input :tags, :collection => @tags, :selected => @selected, :label_method => :name, input_html: { :class => "ui dropdown" }, prompt: "Select a tag"
    .ui.segments
      .ui.segment
        .field
          .ui.toggle.checkbox
            = f.input :does_expire
      .ui.green.secondary.segment#date-segment{:style => "display: none"}
        = f.input :experies_on, as: :date, :html5 => true, :placeholder => "DD/MM/YYYY"
  .actions
    - if @link.id
      = link_to "Delete link", @link, method: :delete, data: { confirm: 'Are you sure?' }, :class => "ui basic red button"
    = f.button :button, :type => :submit
:javascript
  $('.simple_form.ui.form')
  .form({
    fields: {
      link_name: {
        rules: [
          {
            type: 'empty',
            prompt: 'Name can not be empty'
          }
        ]
      },
      link_url: {
        rules: [
          {
            type: 'empty',
            prompt: 'URL can not be empty'
          }
        ]
      }
    },
    onFailure: function() {
    $('.loading.disabled').removeClass('disabled loading');
    return false;
    }
  });

  $('.ui.dropdown')
    .dropdown()
  ;
  if ($('.boolean').checkbox().first().checkbox("is checked")) {
    $('#date-segment').show();
  }
  $('.boolean').checkbox().first().checkbox({
    onChecked: function() {
      $('#date-segment').show();
    },
    onUnchecked: function() {
      $('#date-segment').hide();
    }
  });

{'fraction_non_alphanumeric': 0.17850525015441632, 'fraction_numerical': 0.0006176652254478073, 'mean_word_length': 2.0327715355805243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 20, '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': '1983455', 'n_tokens_mistral': 1031, 'n_tokens_neox': 1032, 'n_words': 230}