<commit_before>%style
  :sass
    #promotego-search
      :background-color #{@widget_params[:background_color]}
      :color #{@widget_params[:text_color]}
      :padding 5px
      :width #{@widget_params[:width]}
      :height #{@widget_params[:height]}
      :font-family #{@widget_params[:font_family]}
      :font-size #{@widget_params[:font_size]}
      :position relative
      p
        :position relative
        :margin 0px
      input#address
        :position relative
        :left -3px
        :width= 100%
        :font-family #{@widget_params[:font_family]}
        :font-size #{@widget_params[:input_font_size]}
      a
        :color #{@widget_params[:text_color]}
        :text-decoration none
        &:hover
          :color #{@widget_params[:text_color]}
          :text-decoration underline
      form
        :margin 0px
      .top-row
        :margin 2px 0px 2px 0px
      .bottom-row
        :position absolute
        :width 100%
        :margin 3px 0px 2px 0px
        :bottom 0px
        &>a
          :position absolute
          :bottom 2px
      .clear_on_click
        :color #{@widget_params[:hint_color]}
      #submit_button
        :margin-right 8px
        :float right

- hint_text = t 'widget.search.hint'
:javascript
  defaultText = "#{escape_javascript(hint_text)}"
  function clickclear(thisfield) {
    if (thisfield.value == defaultText) {
      thisfield.value = "";
      thisfield.setAttribute("class", "")
    }
  }
  function clickrecall(thisfield) {
    if (thisfield.value == "") {
      thisfield.value = defaultText;
      thisfield.setAttribute("class", "clear_on_click")
    }
  }

#promotego-search
  .top-row= t 'widget.search.title'
  - form_tag({:controller => :search, :action => :radius, :only_path => false}, {:method => :get, :onsubmit => 'clickclear(this.address)', :target => '_blank'}) do
    .middle-row
      %label{:for => :address, :style => 'display: none;'}= t 'widget.search.label'
      = text_field_tag :address, hint_text, :size => 30, :class => 'clear_on_click', :onfocus => 'clickclear(this)', :onblur => 'clickrecall(this)'
    .bottom-row
      = link_to 'PromoteGo.org', :controller => :widgets, :action => :index, :only_path => false
      = hidden_field_tag :radius, '25'
      = submit_tag t('widget.search.submit'), :id => 'submit_button'<commit_msg>Changing promotego.org link in search widget to link to root url instead of to widgets url<commit_after>%style
  :sass
    #promotego-search
      :background-color #{@widget_params[:background_color]}
      :color #{@widget_params[:text_color]}
      :padding 5px
      :width #{@widget_params[:width]}
      :height #{@widget_params[:height]}
      :font-family #{@widget_params[:font_family]}
      :font-size #{@widget_params[:font_size]}
      :position relative
      p
        :position relative
        :margin 0px
      input#address
        :position relative
        :left -3px
        :width= 100%
        :font-family #{@widget_params[:font_family]}
        :font-size #{@widget_params[:input_font_size]}
      a
        :color #{@widget_params[:text_color]}
        :text-decoration none
        &:hover
          :color #{@widget_params[:text_color]}
          :text-decoration underline
      form
        :margin 0px
      .top-row
        :margin 2px 0px 2px 0px
      .bottom-row
        :position absolute
        :width 100%
        :margin 3px 0px 2px 0px
        :bottom 0px
        &>a
          :position absolute
          :bottom 2px
      .clear_on_click
        :color #{@widget_params[:hint_color]}
      #submit_button
        :margin-right 8px
        :float right

- hint_text = t 'widget.search.hint'
:javascript
  defaultText = "#{escape_javascript(hint_text)}"
  function clickclear(thisfield) {
    if (thisfield.value == defaultText) {
      thisfield.value = "";
      thisfield.setAttribute("class", "")
    }
  }
  function clickrecall(thisfield) {
    if (thisfield.value == "") {
      thisfield.value = defaultText;
      thisfield.setAttribute("class", "clear_on_click")
    }
  }

#promotego-search
  .top-row= t 'widget.search.title'
  - form_tag({:controller => :search, :action => :radius, :only_path => false}, {:method => :get, :onsubmit => 'clickclear(this.address)', :target => '_blank'}) do
    .middle-row
      %label{:for => :address, :style => 'display: none;'}= t 'widget.search.label'
      = text_field_tag :address, hint_text, :size => 30, :class => 'clear_on_click', :onfocus => 'clickclear(this)', :onblur => 'clickrecall(this)'
    .bottom-row
      = link_to 'PromoteGo.org', root_url
      = hidden_field_tag :radius, '25'
      = submit_tag t('widget.search.submit'), :id => 'submit_button'
{'fraction_non_alphanumeric': 0.14145717937792926, 'fraction_numerical': 0.010651896037494673, 'mean_word_length': 2.723235527359239, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 34, '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': '1875103', 'n_tokens_mistral': 1523, 'n_tokens_neox': 1473, 'n_words': 313}