Exemple #1
0
 function __construct(array $totalarray_in, array $post_in = null)
 {
     parent::__construct($totalarray_in, $post_in);
     $this->display = new \cmu\html\form\products\CompositeForm();
     $this->display->setClass("thisform");
     $formarray = array('class' => 'arrayclass', 'id' => 'myForm', 'action' => 'form.php', 'hintobjarray' => array('hintobj' => "\\cmu\\html\\general\\products\\Span", 'att' => array('class' => 'hint', 'spandata' => "__hintmessage")));
     $this->display->setThisProperty($formarray);
 }
 function process(\cmu\html\products\AbstractHtmlDisplayClient $formclient)
 {
     $processarray = ['Add', 'Update', 'Confirm Delete'];
     $confirmarray = ['Delete'];
     ////////PROCESS
     if (null !== $formclient->getRequestKey('action') && $formclient->getDisplay()->validateForm() && in_array($formclient->getRequestKey('action'), $processarray)) {
         //set properties?  //check here to see if we need to add CONFIRM to button
         $formclient->processAndRedir();
         return;
     }
     /////////////BUTTONS
     if (!empty($formclient->getRequestKey('dn')[0])) {
         ///we have data passed
         if (in_array($formclient->getRequestKey('action'), $confirmarray)) {
             // 'Confirm" is not in button, echo confirmation button
             (new FormButtonsConfirm($formclient))->addToForm();
             //show the form with a 'confirm' button
         } else {
             (new FormButtonsExisting($formclient))->addToForm();
             //errors or existing, re-display buttons
         }
         return;
     }
     (new FormButtonsAdd($formclient))->addToForm();
     //Add, default
 }
Exemple #3
0
 function __construct(array $totalarray_in, array $post_in = null)
 {
     parent::__construct($totalarray_in, $post_in);
     $this->display = new \cmu\html\table\products\CompositeTable();
     $this->display->setClass("table");
 }