<commit_before>-register = !defined?(Ekylibre::DONT_REGISTER)
-bad_browser = false
-if request.env["HTTP_USER_AGENT"].to_s.match(/MSIE (\d+\.\d+);/)
  -bad_browser = ($1.to_f <= 6)
-if bad_browser
  #bad_browser.login{:style=>"margin: 64px;"}
    .logoban
    %h2=tc("bad_browser.title")
    %p=tc("bad_browser.explanation")
    %p=tc("bad_browser.proposal")
    %table.browsers.actions
      %tr
        %td=link_to(tc("bad_browser.wb.firefox"), "http://www.mozilla.com/")
        %td=link_to(tc("bad_browser.wb.chrome"), "http://www.google.com/chrome")
        %td=link_to(tc("bad_browser.wb.safari"), "http://www.apple.com/fr/safari/")
        %td=link_to(tc("bad_browser.wb.opera"), "http://www.opera.com/browser/")
        %td=link_to(tc("bad_browser.wb.ie"), "http://www.microsoft.com/france/windows/ie/")
  .clearfix
-else
  #login.login{:style=>"display:none"}
    .logoban{:title=>Ekylibre.version}
    =form_tag({:action=>:create, :company=>nil, :redirect=>params[:redirect]}) do
      %table
        -if @current_company or @users
          %tr
            %td.label=Company.model_name.human
            %td.value
              -if @users
                =select_tag("company", options_for_select(@users.collect{|x| [x.company.name, x.company.code]}))
              -else
                =link_to(@current_company.name, {:action=>:new, :company=>nil})
                =hidden_field :company, @current_company.code
        -if ::I18n.active_locales.size > 1
          %tr
            %td.label=tc(:locale)
            %td.value=locale_selector
        %tr
          %td.label=tc :username
          %td.input=text_field_tag :name, params[:name], :tabindex=>1, "data-autofocus"=>"true"
        %tr
          %td.label=tc :password
          %td.input=password_field_tag :password, nil, :tabindex=>2
        %tr
          %td.button{:colspan=>2}=submit_tag(tc(:connect), :tabindex=>3)
  -if register
    #register.login.register{:style=>"display:none"}
      %span.toolbar
        %span.tool=link_to(t("actions.companies.register"), {:controller=>:companies, :action=>:register, :locale=>params[:locale]}, :class=>"icon im-register", :tabindex=>4) 
  #nojavascript.login{"data-toggle-now-with"=>"#login, #register"}
    .logoban
    %p.message=tc('no_javascript')
<commit_msg>Re-set new form<commit_after>-register = !defined?(Ekylibre::DONT_REGISTER)
-bad_browser = false
-if request.env["HTTP_USER_AGENT"].to_s.match(/MSIE (\d+\.\d+);/)
  -bad_browser = ($1.to_f <= 6)
-if bad_browser
  #bad_browser.login{:style=>"margin: 64px;"}
    .logoban
    %h2=tc("bad_browser.title")
    %p=tc("bad_browser.explanation")
    %p=tc("bad_browser.proposal")
    %table.browsers.actions
      %tr
        %td=link_to(tc("bad_browser.wb.firefox"), "http://www.mozilla.com/")
        %td=link_to(tc("bad_browser.wb.chrome"), "http://www.google.com/chrome")
        %td=link_to(tc("bad_browser.wb.safari"), "http://www.apple.com/fr/safari/")
        %td=link_to(tc("bad_browser.wb.opera"), "http://www.opera.com/browser/")
        %td=link_to(tc("bad_browser.wb.ie"), "http://www.microsoft.com/france/windows/ie/")
  .clearfix
-else
  #login.login{:style=>"display:none"}
    .logoban{:title=>Ekylibre.version}
    =form_tag({:action=>:create, :company=>params[:company], :redirect=>params[:redirect]}) do
      %table
        -if @current_company or @users
          %tr
            %td.label=Company.model_name.human
            %td.value
              -if @users
                =select_tag("company", options_for_select(@users.collect{|x| [x.company.name, x.company.code]}))
              -else
                =link_to(@current_company.name, {:action=>:new, :company=>nil})
        -if ::I18n.active_locales.size > 1
          %tr
            %td.label=tc(:locale)
            %td.value=locale_selector
        %tr
          %td.label=tc :username
          %td.input=text_field_tag :name, params[:name], :tabindex=>1, "data-autofocus"=>"true"
        %tr
          %td.label=tc :password
          %td.input=password_field_tag :password, nil, :tabindex=>2
        %tr
          %td.button{:colspan=>2}=submit_tag(tc(:connect), :tabindex=>3)
  -if register
    #register.login.register{:style=>"display:none"}
      %span.toolbar
        %span.tool=link_to(t("actions.companies.register"), {:controller=>:companies, :action=>:register, :locale=>params[:locale]}, :class=>"icon im-register", :tabindex=>4) 
  #nojavascript.login{"data-toggle-now-with"=>"#login, #register"}
    .logoban
    %p.message=tc('no_javascript')

{'fraction_non_alphanumeric': 0.18955983189559833, 'fraction_numerical': 0.0057509400575094, 'mean_word_length': 3.073873873873874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, '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': '1860387', 'n_tokens_mistral': 1647, 'n_tokens_neox': 1611, 'n_words': 195}