Commit Graph
6 Commits
Author SHA1 Message Date
Xavier Morel e3a2448ebe [ADD] form builder whitelisting: ACL check
Only users who can edit the website's structure should be allowed to
whitelist fields.
2015-11-30 16:39:13 +01:00
Xavier Morel 2afb5b43ef [IMP] form builder fields blacklisting
* blacklist all fields by default
* don't use blacklist in get_authorized_fields which is called to see if
  a field can be added to a form, instead only use it afterwards to see
  if the field can be written to by the formbuilder. That way
  formbuilder can whitelist fields which are actually added to forms
  on-demand resulting in a more secure interaction
2015-11-30 16:39:13 +01:00
Nicolas Lempereur 6f02ba9cbf [IMP] website_form: don't remove newline
In some instance, the mail content of a sent form would only be text
formatted. This could lead to a message with no newline, thus making it
illegible.

This fix has to be ugly since body_html field of a mail.mail is of type
text.
2015-11-18 11:41:25 +01:00
Nicolas Lempereur a4cfe7f6ec [FIX] website_form: be consistent when concatenating string
In the form builder, custom field name could contain special char but
the get key values are of the type str whilst the value are in unicode
type.

Thus when concatenating them, one should be converted so they are
uniform and don't lead to an encoding error.

opw-656745
2015-11-18 10:49:24 +01:00
David Monjoie d210744ef0 [IMP] website_form: various improvements
- Fixed the module name and category in manifest
- Fixed website_form_blacklisted being ignored
- Unauthorized readonly and magic fields
- Reset the form on successfull submit
- Added missing date field
- Added date and datetime validation
2015-09-15 14:00:36 +02:00
David Monjoie a77f5cf42f [ADD] website_form: generic form controller
Contains a new ajax post function that comes from mdo's
original code and that I was not able to get rid of.
2015-08-26 16:01:19 +02:00