Commit Graph

58 Commits

Author SHA1 Message Date
2a7341832a form : manage correctely the checkboxes with values (the values can be defined and set to no "unset")
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3106 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-30 13:49:24 +00:00
2ea05e91ca form : display correctely the checkboxes (add label and div='checkbox')
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3105 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-30 11:15:56 +00:00
2dfb75ee72 form : put the focus on first field NOT readonly and NOT hidden
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3060 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-21 10:00:46 +00:00
230dcf9409 form : don't force a <br/> at the end of the help messages
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3055 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-21 08:58:42 +00:00
7062d307a9 form : overwriting of hidden or readonly fields
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3040 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-20 06:42:47 +00:00
7b40408677 form : the hidden fields must use the "defaults" value, the readonly the "values" value
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3039 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-19 14:56:09 +00:00
01c1556672 form : the overwriting of hidden and read-only fields is done on values !
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3037 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-19 14:30:16 +00:00
8b2a64d649 BUG form->values () : must overwrite readonly and hidden fields (the user can modify them, but it is not allowed)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3021 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-09-01 14:37:08 +00:00
a04d3a4f4a Cosmetics changes : remove ending lines spaces
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3012 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-08-31 07:20:24 +00:00
82abb600c8 form : Allow to define a class text to form object
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2792 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-06-28 09:01:43 +00:00
d621438f0c CSRF : Allow to get the CSRF token from the CSRF or FORM classes
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2790 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-06-28 08:43:18 +00:00
7ca9bb179d form : if a convertDate field provided is empty, do no generate an error
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2778 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-06-28 06:54:57 +00:00
4c470b9306 form : add the conversion format for dates
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2765 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-06-27 09:24:22 +00:00
fb56a83583 csrf : Split CSRF from form to external package
form : require the external csrf file


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2736 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-05-24 10:28:21 +00:00
7d00d6d315 form : update docComment
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2727 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-05-23 12:46:30 +00:00
bc23495eec form : add maxlength support
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2707 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-04-26 13:01:11 +00:00
191b795627 form : add the verify of forms. Actually check only the mandatory part
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2705 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-04-26 12:27:00 +00:00
9f8d9ddc30 form : fieldwidth is now functionnal
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2701 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-04-21 14:14:50 +00:00
5ad792d251 form : if the provided error for a field is not an array, use the default error class and use the value as message
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2698 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-04-15 15:08:27 +00:00
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
3a635ce39a form : add the javascript to focus on the first field if there is no error, or on the first error when there is one
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2534 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2016-02-23 08:53:30 +00:00
de8bda851e form : add the placeholder support
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2387 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-11-13 12:35:22 +00:00
7aed0c63e1 form : variable typo
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2224 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 13:10:32 +00:00
25632eb4c8 form : allow to define the bootstrap width for titles and fields columns
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2223 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 12:54:16 +00:00
b189725fa2 form : the help are always in "text-muted" and not in error when there is a detected error
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2219 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 08:54:41 +00:00
83175e10b1 form : checkboxes : better management of defaults/values
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2218 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 08:24:41 +00:00
20d58f427d form : allow the checkboxes to be unique or multiple. Manage correctely the defaults/values
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2217 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-07 08:17:07 +00:00
a04807bf0b form : add support to save the values and errors to redisplay the form in without code line ! Just add "$form->saveValuesErrors ($values, $errors);" in post routing to save the data, and in get they will be automatically re-displayed
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2216 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-06 14:28:55 +00:00
52b0da9bc8 form : checkbox are not correctely aligned when using "<div class='checkbox'>"
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2215 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-06 12:41:48 +00:00
8a7857e403 form : remove the \n after the help to have a beautiful HTML code
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2214 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-06 12:10:44 +00:00
aa658fac3a form : allow checkbox to be multiple (in an array) or simple (in text)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2213 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-06 12:06:56 +00:00
0a5d7edfad form : display the help with the error if both are defined
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2212 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-06 11:50:05 +00:00
3ae5bcf8c3 form : comment update
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2211 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-05 12:08:53 +00:00
59ae5b8e28 * form : don't allow to display a form without defined fields
* form : add a "addfield" method to add a field in form
  * form : remove the &nbsp; in labels to be W3C compliant
  * form : rework the checkbox/radio to be compliant with bootstrap and ARIA
  * form : add the help support (which is hidden when there is an error)


git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2207 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-08-05 11:48:20 +00:00
51ad1233c2 form : remove the error_reporting (E_ALL)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2189 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-06-08 11:42:33 +00:00
126bd24022 BUG form : allow the values and the errors to be displayed
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2187 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-06-08 09:57:42 +00:00
d88dbce612 form : remove the prefix, which is not compatible with the definition of values. The developper must use it's own prefix method
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2169 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-05-12 14:30:06 +00:00
5c6efd369e form : fields are now extendable by the user
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2167 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-05-12 09:28:45 +00:00
a17171e83a form : add the cols,rows and prefix for fields
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2166 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-05-12 09:03:24 +00:00
0b3d621317 form : add the prefix to allow the form to be subitted in array
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2165 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-05-12 08:09:28 +00:00
31568bc327 form : add textarea support
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2131 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-05-04 13:00:14 +00:00
b9d5add7b6 form : formfield (group) management : error when no group is defined on the last place
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2067 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-03-27 11:48:35 +00:00
70da442226 form : correct formfield (groups)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2066 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-03-27 11:43:04 +00:00
aa72825d21 form : allow selected to be disabled and to send correctely the data
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2058 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2015-03-23 14:53:04 +00:00
a9295d0fe5 form : the submit text can be defined in the label too
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1874 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-11-20 20:02:43 +00:00
c333b251d6 form : add hidden support to fields
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1873 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-11-20 19:56:01 +00:00
6b9198f27c Form : CSRF createToken return now the token calculated
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1867 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-11-20 13:44:22 +00:00
b8a3e1aa23 Update domframework to be gettext package compliant
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1661 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-06 13:16:43 +00:00
9fef934b71 Cosmetics : remove spaces at the end of lines and correct lines with more than 80 chars
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1643 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-08-01 07:11:14 +00:00
027cbccdcf PHPDoc support : correct the erroneous entries
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1463 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
2014-06-16 13:46:39 +00:00