<commit_before><?php
/**
 * An extension of the MultiElements class which works only with single fields
 * instead of complex containers.
 * 
 * @author ekow
 * @ingroup Forms
 */
class MultiFields extends MultiElements
{
    public function __construct($template = null)
    {
        parent::__construct($template);
    }
    
    public function setTemplate($template)
    {
        $this->template = $template;
        $buttons = new ButtonBar();
        $buttons->setId("multi-form-buttons");
        $buttons->addButton("Clear");
        $buttons->buttons[0]->addAttribute("onclick","fapiMultiFormRemove('{$this->index}', '--index--')");
        $this->template->setName($this->template->getName()."[]");
        $this->templateName = $template->getName();
        $template->setId("multiform-content---index--");
        return $this;        
    }
}<commit_msg>added clear button id for mulfifields<commit_after><?php
/**
 * An extension of the MultiElements class which works only with single fields
 * instead of complex containers.
 * 
 * @author ekow
 * @ingroup Forms
 */
class MultiFields extends MultiElements
{
    public function __construct($template = null)
    {
        parent::__construct($template);
    }
    
    public function setTemplate($template)
    {
        $this->template = $template;
        $buttons = new ButtonBar();
        $buttons->setId("multi-form-buttons");
        $buttons->addButton("Clear");
        $buttons->buttons[0]->setId("clear_{$this->index}_--index--");
        $buttons->buttons[0]->addAttribute("onclick","fapiMultiFormRemove('{$this->index}', '--index--')");
        $this->template->setName($this->template->getName()."[]");
        $this->templateName = $template->getName();
        $template->setId("multiform-content---index--");
        return $this;        
    }
}
{'fraction_non_alphanumeric': 0.16748499727223132, 'fraction_numerical': 0.0016366612111292963, 'mean_word_length': 3.0219298245614037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '2613572', 'n_tokens_mistral': 503, 'n_tokens_neox': 501, 'n_words': 102}