<commit_before><?php if(!$form->getObject()->isNew() && isset($status) && isset($status[$form->getObject()->getId()]) && $status[$form->getObject()->getId()]->getStatus()=="closed"):?>
  <div class="closed_message"><?php echo __('Loan closed on %date%.',array('%date%'=>$status[$form->getObject()->getId()]->getDate()));?></div>
<?php endif;?>
<table>
  <tbody>
    <?php echo $form->renderGlobalErrors() ?>
    <tr>
      <th><?php echo $form['name']->renderLabel() ?></th>
      <td>
        <?php echo $form['name']->renderError() ?>
        <?php echo $form['name'] ?>
      </td>
      <th><?php echo $form['from_date']->renderLabel() ?></th>
      <td>
        <?php echo $form['from_date']->renderError() ?>
        <?php echo $form['from_date'] ?>
      </td>

      <th></th>
      <td>
      </td>
    </tr>
    <tr>
      <th></th>
      <td></td>

      <th><?php echo $form['to_date']->renderLabel() ?></th>
      <td>
        <?php echo $form['to_date']->renderError() ?>
        <?php echo $form['to_date'] ?>
      </td>


      <th><?php echo $form['extended_to_date']->renderLabel() ?></th>
      <td>
        <?php echo $form['extended_to_date']->renderError() ?>
        <?php echo $form['extended_to_date'] ?>
      </td>
    </tr>
    <tr>
      <th><?php echo $form['description']->renderLabel() ?></th>
      <td colspan="5">
        <?php echo $form['description']->renderError() ?>
        <?php echo $form['description'] ?>
      </td>
    </tr>
    <?php if(! $form->getObject()->isNew()):?>
    <tr>
      <td colspan="6">
        <div>
          <a href="#" id="loan_sync" title="<?php echo __('This will take a snapshot of the loan for archiving purposes.');?>">
            <?php echo image_tag('arrow_refresh.png', 'id=arrow_spin');?> <?php echo __('Take a snapshot of the loan.');?>
          </a>
          <div class="last_sync_message">
            <?php $hist = $form->getObject()->fetchHistories();
            if(empty($hist)):?>
              <?php echo __('Never synchronized');?>
            <?php else:?>
              <?php echo __('Last Synchronization on %date%', array('%date%'=> strftime("%d/%m/%Y %H:%M", strtotime($hist[0]['date']))));?>
            <?php endif;?>
          </div>
        </div>
        <script type="text/javascript">
          $(document).ready(function () {
            $('#loan_sync').click(function(event)
            {
              event.preventDefault();
              el = $(this);
              var answer = confirm('<?php echo __('Are you sure you want to do an archive of your loan ?');?>');
              if(answer) {
                should_rotate = true;
                rotate();
                $.ajax({
                  url: '<?php echo url_for('loan/sync?id='.$form->getObject()->getId());?>',
                  success: function(html){
                    should_rotate = false;
                  }
                });<commit_msg>Adjust translation case<commit_after><?php if(!$form->getObject()->isNew() && isset($status) && isset($status[$form->getObject()->getId()]) && $status[$form->getObject()->getId()]->getStatus()=="closed"):?>
  <div class="closed_message"><?php echo __('Loan closed on %date%.',array('%date%'=>$status[$form->getObject()->getId()]->getDate()));?></div>
<?php endif;?>
<table>
  <tbody>
    <?php echo $form->renderGlobalErrors() ?>
    <tr>
      <th><?php echo $form['name']->renderLabel() ?></th>
      <td>
        <?php echo $form['name']->renderError() ?>
        <?php echo $form['name'] ?>
      </td>
      <th><?php echo $form['from_date']->renderLabel() ?></th>
      <td>
        <?php echo $form['from_date']->renderError() ?>
        <?php echo $form['from_date'] ?>
      </td>

      <th></th>
      <td>
      </td>
    </tr>
    <tr>
      <th></th>
      <td></td>

      <th><?php echo $form['to_date']->renderLabel() ?></th>
      <td>
        <?php echo $form['to_date']->renderError() ?>
        <?php echo $form['to_date'] ?>
      </td>


      <th><?php echo $form['extended_to_date']->renderLabel() ?></th>
      <td>
        <?php echo $form['extended_to_date']->renderError() ?>
        <?php echo $form['extended_to_date'] ?>
      </td>
    </tr>
    <tr>
      <th><?php echo $form['description']->renderLabel() ?></th>
      <td colspan="5">
        <?php echo $form['description']->renderError() ?>
        <?php echo $form['description'] ?>
      </td>
    </tr>
    <?php if(! $form->getObject()->isNew()):?>
    <tr>
      <td colspan="6">
        <div>
          <a href="#" id="loan_sync" title="<?php echo __('This will take a snapshot of the loan for archiving purposes.');?>">
            <?php echo image_tag('arrow_refresh.png', 'id=arrow_spin');?> <?php echo __('Take a snapshot of the loan.');?>
          </a>
          <div class="last_sync_message">
            <?php $hist = $form->getObject()->fetchHistories();
            if(empty($hist)):?>
              <?php echo __('Never synchronized');?>
            <?php else:?>
              <?php echo __('Last synchronization on %date%', array('%date%'=> strftime("%d/%m/%Y %H:%M", strtotime($hist[0]['date']))));?>
            <?php endif;?>
          </div>
        </div>
        <script type="text/javascript">
          $(document).ready(function () {
            $('#loan_sync').click(function(event)
            {
              event.preventDefault();
              el = $(this);
              var answer = confirm('<?php echo __('Are you sure you want to do an archive of your loan ?');?>');
              if(answer) {
                should_rotate = true;
                rotate();
                $.ajax({
                  url: '<?php echo url_for('loan/sync?id='.$form->getObject()->getId());?>',
                  success: function(html){
                    should_rotate = false;
                  }
                });
{'fraction_non_alphanumeric': 0.2243502051983584, 'fraction_numerical': 0.0010259917920656635, 'mean_word_length': 2.2261445118587977, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 215, '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': '2010129', 'n_tokens_mistral': 1802, 'n_tokens_neox': 1800, 'n_words': 380}