Dominique Fournier 3c98dd7c39 form : add the methods getOldValues, getOldErrors, saveValuesErrors and
saveValuesErrorsReset to simplify the codes.
    In views :
      $form = new \form ();
      $values = array ();
      $errors = array ();
      // If there is saved values, use them, else return the provided $values
      $values = $form->getOldValues ($values);
      $errors = $form->getOldErrors ($errors);
    In index.php :
      $form = new \form ();
      $values = $form->values ();
      $errors = $ipsetsObj->verify ($values);
      $form->saveValuesErrors ($values, $errors);
      if (count ($errors)) $route->redirect ("/ipsets/add");
      $ipsetsObj->createSet ($values["setname"], $values["typename"]);
      // If there is no error (catched by exception), clear the form for next 
      // time
      $form->saveValuesErrorsReset ();
      $route->redirect ("/ipsets", "");


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2697 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-04-15 15:08:02 +00:00
2016-03-08 09:29:57 +00:00
2015-09-25 09:40:10 +00:00
2016-03-08 09:33:16 +00:00
2016-03-14 10:49:41 +00:00
2015-10-21 12:49:10 +00:00
2016-02-21 19:21:29 +00:00
2016-02-29 13:42:27 +00:00
2016-03-14 10:48:53 +00:00
2015-03-26 10:35:06 +00:00
2016-02-21 19:21:29 +00:00
2016-02-21 19:21:29 +00:00
2016-02-21 19:21:29 +00:00
2016-02-21 19:21:29 +00:00
2016-02-21 19:21:29 +00:00
2014-06-16 13:50:53 +00:00
2016-02-23 13:56:27 +00:00
Description
DomFramework is a small PHP Framework. Database abstraction, authentication methods, routing, sessions are the keywords
https://domframework.fournier38.fr
5.1 MiB
Languages
PHP 100%