<commit_before><?php

namespace Lacroix\Form;

use Zend\Form\Form;

class Reading extends Form {
  public function __construct($t, $em) {
    parent::__construct('reading');

    // ---

    $product = new \Zend\Form\Element\Select('product_id');
    $product->setLabel($t->translate('Product'));

    $options = array();
    foreach ($em->getRepository('Lacroix\Entity\Product')->findAll() as $item) {
      $options[$item->getId()] = $item->getName();
    };
    $product->setValueOptions($options);

    $reading = new \Zend\Form\Element\Text('reading');
    $reading->setLabel($t->translate('Reading'));

    $employees = new \Zend\Form\Element\Text('employees');
    $employees->setLabel($t->translate('Employees'));

    $notes = new \Zend\Form\Element\Text('notes');
    $notes->setLabel($t->translate('Notes'));

    // ---

    // ---

    $this->add($product);
    $this->add($reading);
    $this->add($employees);
    $this->add($notes);
  }
}<commit_msg>Change: notes field in the reading modal was changed from a text field to a select input.<commit_after><?php

namespace Lacroix\Form;

use Zend\Form\Form;

class Reading extends Form {
  public function __construct($t, $em) {
    parent::__construct('reading');

    // ---

    $product = new \Zend\Form\Element\Select('product_id');
    $product->setLabel($t->translate('Product'));

    $options = array();
    foreach ($em->getRepository('Lacroix\Entity\Product')->findAll() as $item) {
      $options[$item->getId()] = $item->getName();
    };
    $product->setValueOptions($options);

    $reading = new \Zend\Form\Element\Text('reading');
    $reading->setLabel($t->translate('Reading'));

    $employees = new \Zend\Form\Element\Text('employees');
    $employees->setLabel($t->translate('Employees'));

    $notes = new \Zend\Form\Element\Select('notes');
    $notes->setLabel($t->translate('Notes'));

    $options = array('' => '');
    foreach ($em->getRepository('Lacroix\Entity\NoteTemplate')->findAll() as $item) {
      $options[$item->getContent()] = $item->getContent();
    };
    $notes->setValueOptions($options);

    // ---

    // ---

    $this->add($product);
    $this->add($reading);
    $this->add($employees);
    $this->add($notes);
  }
}
{'fraction_non_alphanumeric': 0.21307072515666964, 'fraction_numerical': 0.0, 'mean_word_length': 3.5334685598377282, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '6260803', 'n_tokens_mistral': 741, 'n_tokens_neox': 704, 'n_words': 111}