<commit_before><div class="panel panel-default">
  <div class="panel-heading">
    <a href="#" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i></a>
    <h3 class="panel-title"><%= form_caption %></h3>
  </div>
  <div class="panel-body">
    <%= form_for transaction, url: submit_url, method: method, remote: true, html: { class: 'form transaction-form' }, builder: SmartBuilder do |form| %>

      <div class="row">
        <div class="col-lg-7 col-md-12">
          <%= form.amount_input %>
          <%= form.select :category_id, options: options_for_select(Category.ordered.map { |c| [c.title, c.id] }, transaction.category_id) %>
        </div>
        <div class="col-lg-5 col-md-12">
          <%= form.account_select :account_id %>
          <%= form.currency_select :amount_currency %>
        </div>
      </div>

      <%= form.datetime :created_at, placeholder: 'Default is now' %>
      <%= form.area :memo, placeholder: 'Optional notes' %>
      <%= form.popup_submit_group caption: submit_caption %>
    <% end %>
  </div>
</div>

<script>
  $(function() {
    "use strict";

    $(".select-account-id").select2({
      theme: "bootstrap",
      allowClear: false,
      minimumResultsForSearch: Infinity
    }).change(function() {
      var currency = $(".select-account-id option:selected").data("currency");
      $(".select-amount-currency").val(currency).trigger("change");
    });

    $(".select-amount-currency, .select-category-id").select2({
      theme: "bootstrap",
      allowClear: false
    });
<commit_msg>Form layout<commit_after><div class="panel panel-default">
  <div class="panel-heading">
    <a href="#" class="close" data-dismiss="modal" aria-label="Close"><i class="fa fa-times"></i></a>
    <h3 class="panel-title"><%= form_caption %></h3>
  </div>
  <div class="panel-body">
    <%= form_for transaction, url: submit_url, method: method, remote: true, html: { class: 'form transaction-form' }, builder: SmartBuilder do |form| %>

      <%= form.amount_input %>

      <div class="row">
        <div class="col-lg-6">
          <%= form.account_select :account_id %>
        </div>
        <div class="col-lg-6">
          <%= form.currency_select :amount_currency %>
        </div>
      </div>

      <div class="row">
        <div class="col-md-6">
          <%= form.select :category_id, options: options_for_select(Category.ordered.map { |c| [c.title, c.id] }, transaction.category_id) %>
        </div>
        <div class="col-md-6">
          <%= form.datetime :created_at, placeholder: 'Default is now' %>
        </div>
      </div>

      <%= form.area :memo, placeholder: 'Optional notes' %>
      <%= form.popup_submit_group caption: submit_caption %>
    <% end %>
  </div>
</div>

<script>
  $(function() {
    "use strict";

    $(".select-account-id").select2({
      theme: "bootstrap",
      allowClear: false,
      minimumResultsForSearch: Infinity
    }).change(function() {
      var currency = $(".select-account-id option:selected").data("currency");
      $(".select-amount-currency").val(currency).trigger("change");
    });

    $(".select-amount-currency, .select-category-id").select2({
      theme: "bootstrap",
      allowClear: false
    });

{'fraction_non_alphanumeric': 0.19156144133045888, 'fraction_numerical': 0.00554357868801971, 'mean_word_length': 2.941747572815534, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, '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': '2748390', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1016, 'n_words': 206}