<commit_before><div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4>Add</h4>
</div>
<div class="wizard" id="{$name}">
  <ul class="steps">
    {foreach $steps as $step}
    <li data-target="#{$name}_{$step@index + 1}"{if $step@index == 0} class="active"{/if}><span class="badge badge-info">{$step@index + 1}</span>{$step@key}<span class="chevron"></span></li>
    {/foreach}
  </ul>
</div>
<div class="row-divider"></div>
<form role="form" class="form-horizontal" id="wizard_form">
  <div class="step-content">
   {foreach $steps as $step}
   <div class="step-pane{if $step@index == 0} active{/if}" id="{$name}_{$step@index + 1}">
     {foreach $step['default'] as $component}
       {$formElements[$component['name']]['html']}
     {/foreach}
   </div>
   {/foreach}
  </div>
<div class="modal-footer">
  <button class="btn btn-default btn-prev" disabled>{t}Prev{/t}</button>
  <button class="btn btn-default btn-next" data-last="{t}Finish{/t}" id="wizard_submit">{t}Next{/t}</button>
</div>
</form>
<script>
$(function() {
  $(document).on('finished', function (event) {
    $.ajax({
      url: "{url_for url=$validateUrl}",
      type: "POST",
      dataType: 'json',
      data: $("#wizard_form").serializeArray(),
      context: document.body
    })
    .success(function(data, status, jqxhr) {
      alertClose();
      if (data.success) {
        {if isset($formRedirect) && $formRedirect}
          window.location='{url_for url=$formRedirectRoute}';
        {else}
          alertMessage("The object has been successfully saved", "alert-success");
        {/if}
        $('#modal').modal('hide');
        $('.dataTable').dataTable().fnDraw();
      } else {
        alertMessage("An error occured", "alert-danger");
      }
    });
    return false;
    });
    {$customJs}
});
</script>
<commit_msg>checks if var is initialized<commit_after><div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4>Add</h4>
</div>
<div class="wizard" id="{$name}">
  <ul class="steps">
    {foreach $steps as $step}
    <li data-target="#{$name}_{$step@index + 1}"{if $step@index == 0} class="active"{/if}><span class="badge badge-info">{$step@index + 1}</span>{$step@key}<span class="chevron"></span></li>
    {/foreach}
  </ul>
</div>
<div class="row-divider"></div>
<form role="form" class="form-horizontal" id="wizard_form">
  <div class="step-content">
   {foreach $steps as $step}
   <div class="step-pane{if $step@index == 0} active{/if}" id="{$name}_{$step@index + 1}">
     {foreach $step['default'] as $component}
       {$formElements[$component['name']]['html']}
     {/foreach}
   </div>
   {/foreach}
  </div>
<div class="modal-footer">
  <button class="btn btn-default btn-prev" disabled>{t}Prev{/t}</button>
  <button class="btn btn-default btn-next" data-last="{t}Finish{/t}" id="wizard_submit">{t}Next{/t}</button>
</div>
</form>
<script>
$(function() {
  {if $validateUrl}
  $(document).on('finished', function (event) {
    $.ajax({
      url: "{url_for url=$validateUrl}",
      type: "POST",
      dataType: 'json',
      data: $("#wizard_form").serializeArray(),
      context: document.body
    })
    .success(function(data, status, jqxhr) {
      alertClose();
      if (data.success) {
        {if isset($formRedirect) && $formRedirect}
          window.location='{url_for url=$formRedirectRoute}';
        {else}
          alertMessage("The object has been successfully saved", "alert-success");
        {/if}
        $('#modal').modal('hide');
        $('.dataTable').dataTable().fnDraw();
      } else {
        alertMessage("An error occured", "alert-danger");
      }
    });
    return false;
    });
    {/if}
    {$customJs}
});
</script>

{'fraction_non_alphanumeric': 0.22181340341655717, 'fraction_numerical': 0.0036793692509855453, 'mean_word_length': 3.7045735475896167, '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': '2883257', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1286, 'n_words': 251}