<commit_before>{strip}
{assign var=form_layout value='vertical'}
{assign var=form_class value='form-vertical'}
{if isset($layout)}
    {assign var=form_layout value="/:/"|preg_split:$layout scope=parent}
    {if count($form_layout) > 0}
        {if $form_layout[0]==='horizontal'}
            {assign var=form_class value="form-horizontal"}
        {elseif $form_layout[0]==='inline'}
            {assign var=form_class value="form-inline"}
        {/if}
    {/if}
{/if}
{if isset($class) && is_string($class)}
    {assign var=class value="{$form_class} {$class}"}
    {assign var=class value=$form_class|trim}
{else}
    {assign var=class value=$form_class}
{/if}
{assign var=use_ajax value=false}
{if isset($method)}
    {assign var=method value={$method|lower}}
    {if $method==='ajax-get'}
        {assign var=use_ajax value=true}
        {assign var=method value='get'}
    {elseif $method==='ajax-post'}
        {assign var=use_ajax value=true}
        {assign var=method value='post'}
    {elseif $method==='ajax-delete'}
        {assign var=use_ajax value=true}
        {assign var=method value='delete'}
    {/if}
{/if}
<form data-toggle="nabu-form"{include file="general-attrs.tpl"}
      {if isset($name) && is_string($name) && strlen($name)>0} name="{$name}"{/if}
      {if $use_ajax}
          {if isset($method) && ($method==='get' || $method==='put' || $method==='post' || $method==='delete')} data-ajax-method="{$method}"{/if}
      {elseif isset($method) && ($method==='get' || $method==='post')} method="{$method}"
      {/if}
      {if isset($action) && is_string($action) && strlen($action)>0} action="{$action}"{/if}
      {if isset($action_template) && is_string($action_template) && strlen($action_template)>0} data-action-template="{$action_template}"{/if}
      {if isset($action_template_field) && is_string($action_template_field) && strlen($action_template_field)>0} data-action-template-field="{$action_template_field}"{/if}
      {if isset($charset) && is_string($charset) && strlen($charset)>0} accept-charset="{$charset}"{/if}
      {if isset($enctype) && is_string($enctype) && strlen($enctype)>0} enctype="{$enctype}" data-enctype="{$enctype}"{/if}
      {if isset($target) && is_string($target) && strlen($target)>0} target="{$target}"{/if}
      {if isset($autocomplete) && ($autocomplete==='on' || $autocomplete==='off')} autocomplete="{$autocomplete}"{/if}
      {if isset($evaluate) && ($evaluate==='all' || $evaluate==='visible')} data-evaluate="{$evaluate}"{/if}
      {if isset($validation) && ($validation==='onchange' || $validation==='live')} data-validation="{$validation}"{/if}
      {if isset($reflection) && is_string($reflection) && strlen($reflection)>0} data-reflection="{$reflection}" data-reflection-success="has-success" data-reflection-warning="has-warning" data-reflection-error="has-error"{/if}
      {if $use_ajax} data-ajax="true"{if isset($ajax_target) && is_string($ajax_target) && strlen($ajax_target)>0} data-ajax-target="{$ajax_target}"{/if}{/if}
      {if isset($multiform) && is_string($multiform) && strlen($multiform)>0} data-multiform-part="{$multiform}"{/if}
>
{/strip}
<commit_msg>Add ajax-put action<commit_after>{strip}
{assign var=form_layout value='vertical'}
{assign var=form_class value='form-vertical'}
{if isset($layout)}
    {assign var=form_layout value="/:/"|preg_split:$layout scope=parent}
    {if count($form_layout) > 0}
        {if $form_layout[0]==='horizontal'}
            {assign var=form_class value="form-horizontal"}
        {elseif $form_layout[0]==='inline'}
            {assign var=form_class value="form-inline"}
        {/if}
    {/if}
{/if}
{if isset($class) && is_string($class)}
    {assign var=class value="{$form_class} {$class}"}
    {assign var=class value=$form_class|trim}
{else}
    {assign var=class value=$form_class}
{/if}
{assign var=use_ajax value=false}
{if isset($method)}
    {assign var=method value={$method|lower}}
    {if $method==='ajax-get'}
        {assign var=use_ajax value=true}
        {assign var=method value='get'}
    {elseif $method==='ajax-post'}
        {assign var=use_ajax value=true}
        {assign var=method value='post'}
    {elseif $method==='ajax-put'}
        {assign var=use_ajax value=true}
        {assign var=method value='put'}
    {elseif $method==='ajax-delete'}
        {assign var=use_ajax value=true}
        {assign var=method value='delete'}
    {/if}
{/if}
<form data-toggle="nabu-form"{include file="general-attrs.tpl"}
      {if isset($name) && is_string($name) && strlen($name)>0} name="{$name}"{/if}
      {if $use_ajax}
          {if isset($method) && ($method==='get' || $method==='put' || $method==='post' || $method==='delete')} data-ajax-method="{$method}"{/if}
      {elseif isset($method) && ($method==='get' || $method==='post')} method="{$method}"
      {/if}
      {if isset($action) && is_string($action) && strlen($action)>0} action="{$action}"{/if}
      {if isset($action_template) && is_string($action_template) && strlen($action_template)>0} data-action-template="{$action_template}"{/if}
      {if isset($action_template_field) && is_string($action_template_field) && strlen($action_template_field)>0} data-action-template-field="{$action_template_field}"{/if}
      {if isset($charset) && is_string($charset) && strlen($charset)>0} accept-charset="{$charset}"{/if}
      {if isset($enctype) && is_string($enctype) && strlen($enctype)>0} enctype="{$enctype}" data-enctype="{$enctype}"{/if}
      {if isset($target) && is_string($target) && strlen($target)>0} target="{$target}"{/if}
      {if isset($autocomplete) && ($autocomplete==='on' || $autocomplete==='off')} autocomplete="{$autocomplete}"{/if}
      {if isset($evaluate) && ($evaluate==='all' || $evaluate==='visible')} data-evaluate="{$evaluate}"{/if}
      {if isset($validation) && ($validation==='onchange' || $validation==='live')} data-validation="{$validation}"{/if}
      {if isset($reflection) && is_string($reflection) && strlen($reflection)>0} data-reflection="{$reflection}" data-reflection-success="has-success" data-reflection-warning="has-warning" data-reflection-error="has-error"{/if}
      {if $use_ajax} data-ajax="true"{if isset($ajax_target) && is_string($ajax_target) && strlen($ajax_target)>0} data-ajax-target="{$ajax_target}"{/if}{/if}
      {if isset($multiform) && is_string($multiform) && strlen($multiform)>0} data-multiform-part="{$multiform}"{/if}
>
{/strip}

{'fraction_non_alphanumeric': 0.22056307357287291, 'fraction_numerical': 0.004044174832788925, 'mean_word_length': 5.106362773029439, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '2638190', 'n_tokens_mistral': 2178, 'n_tokens_neox': 2175, 'n_words': 346}