<commit_before><div class="panel panel-default" id="content-panel">
  <% if can?(:update, @user) && (controller.action_name == "edit" || (controller.action_name == "update" && !@user.errors.empty?)) %>
    <div class="panel-heading panel-title">Sandbox</div>
    <%= simple_form_for @user, url: user_path(@user, panel: "sandbox"), html: { role: "form", remote: true } do |f| %>
      <div class="panel-body">
        <%= f.input :sandbox_id, :as => :hidden, :input_html => { :value => 'sandbox.'+ @user.random_suffix } %>
        <%= f.input :sandbox_name, label: "Sandbox Name", input_html: { class: "form-user" } %>
        <%= f.input :email, label: "Contact Email", input_html: { class: "form-user" } %>
      </div>
      <div class="panel-footer">
        <div class="form-group pull-right">
          <%= link_to 'Cancel', user_path(@user, panel: "sandbox"), { :remote => true, :class => 'btn btn-sm' } %>
          <%= f.submit "Save ", class: "btn btn-sm btn-fill" %>
        </div>
        <div class="clearfix"/>
      </div>
    <% end %>
  <% else %>
    <div class="panel-heading panel-title">DataCite Sandbox</div>
    <div class="panel-body">
      <% if @user.sandbox %>
        <dl class="dl-horizontal">
          <dt>Sandbox Name</dt>
          <dd><%= link_to h(@user.sandbox_name), @user.sandbox_url %></dd>
        </dl>
        <br/>
        <div>
          Use your sandbox to test DOI registration in a <a href="https://en.wikipedia.org/wiki/Sandbox_(software_development)">sandboxed</a> environment. Contact <a href="mailto:<EMAIL>">DataCite Support</a> if you want to add other users to your sandbox.
        </div>
      <% else %>
        <%= link_to "Create your sandbox", edit_user_path(@user, panel: "sandbox"), remote: true %> to test DOI registration in a <a href="https://en.wikipedia.org/wiki/Sandbox_(software_development)">sandboxed</a> environment. Or ask <a href="mailto:<EMAIL>">DataCite Support</a> to be added to the sandbox of another user.
      <% end %>
    </div>
  <% end %>
</div>
<commit_msg>collect email for sandbox only when needed<commit_after><div class="panel panel-default" id="content-panel">
  <% if can?(:update, @user) && (controller.action_name == "edit" || (controller.action_name == "update" && !@user.errors.empty?)) %>
    <div class="panel-heading panel-title">Sandbox</div>
    <%= simple_form_for @user, url: user_path(@user, panel: "sandbox"), html: { role: "form", remote: true } do |f| %>
      <div class="panel-body">
        <%= f.input :sandbox_id, :as => :hidden, :input_html => { :value => 'sandbox.'+ @user.random_suffix } %>
        <%= f.input :sandbox_name, label: "Sandbox Name", input_html: { class: "form-user" } %>

        <% if @user.email.blank? %>
          <%= f.input :email, label: "Contact Email", input_html: { class: "form-user" } %>
        <% end %>
      </div>
      <div class="panel-footer">
        <div class="form-group pull-right">
          <%= link_to 'Cancel', user_path(@user, panel: "sandbox"), { :remote => true, :class => 'btn btn-sm' } %>
          <%= f.submit "Save ", class: "btn btn-sm btn-fill" %>
        </div>
        <div class="clearfix"/>
      </div>
    <% end %>
  <% else %>
    <div class="panel-heading panel-title">DataCite Sandbox</div>
    <div class="panel-body">
      <% if @user.sandbox %>
        <dl class="dl-horizontal">
          <dt>Sandbox Name</dt>
          <dd><%= link_to h(@user.sandbox_name), @user.sandbox_url %></dd>
        </dl>
        <br/>
        <div>
          Use your sandbox to test DOI registration in a <a href="https://en.wikipedia.org/wiki/Sandbox_(software_development)">sandboxed</a> environment. Contact <a href="mailto:<EMAIL>">DataCite Support</a> if you want to add other users to your sandbox.
        </div>
      <% else %>
        <%= link_to "Create your sandbox", edit_user_path(@user, panel: "sandbox"), remote: true %> to test DOI registration in a <a href="https://en.wikipedia.org/wiki/Sandbox_(software_development)">sandboxed</a> environment. Or ask <a href="mailto:<EMAIL>">DataCite Support</a> to be added to the sandbox of another user.
      <% end %>
    </div>
  <% end %>
</div>

{'fraction_non_alphanumeric': 0.1892668902731193, 'fraction_numerical': 0.0, 'mean_word_length': 3.065238558909445, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 113, 'https://': 4, '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': '105850', 'n_tokens_mistral': 1474, 'n_tokens_neox': 1360, 'n_words': 341}