The controller /event/<event_id>/page/<page> raise exception if page is not existing.
Allow to pass the template reference when user are creating a new page.
Without it, it is impossible for the end user to create a website_event page without
change manually the xml id because the xml id is based on the module from the template.
This fix is retro compatible, because from_template will be ignored until next update
of website. And during update from website, website_event will be updated because it's a
dependance and so the default_page template created.
The content of an asset can change according to which modules
are installed, but cannot change according to the user rights,
according to which user is connected.
Otherwise, the assets is re-generated and stored
in the filesystem too often, which is against the
concept of the assets.
opw-657046
This is possible to have a child menu without URL.
The condition checking if the `active` class
must be added or not must take that into account.
opw-653132
Difficulty for the user to understand how to change the images.
Some options summernote being in the bar and the other in the snippets editor.
Need to merge this options.
This is not impossible to have a submenu without URL.
The condition to set the menu item as active or not
must therefore take that into account.
opw-652688
* add CSRF token as core.csrf_token
* add CSRF tokens to client-generated and/or JS-submitted forms
* remove broken "compatibility" mode of web.ajax.post
/cc @dmo-odoo I've no idea how that was supposed to work, from looking
things up all modern browsers seem to support FormData, and old IEs
which don't don't support fallbacks either and would require
submitting an actual form as fallback so...
* make CSRF protection the default on all non-SAFE methods
note: there currently is no way to call a CSRF-protected endpoint
without a form-encoded entity-body as that's the only place we get the
CSRF token from.
* simple CSRF token generation: just use the HMAC'd session id, no
generating a new random token per session then HMAC it
* use constant-time equal function to avoid timing attacks
* assert that a database secret is configured before hashing/validating
the CSRF token
* opt-out database manager from CSRF: The super-admin password serves
the purpose of a CSRF token in the database manager screens.
There is no request database to obtain the
secret and generate a CSRF token.
For some strange reason, two CSS rules had different priorities between
firefox and chrome (which forced chrome to always display published and
unpublished at the same time).
The chosen solution is to change the value of the button in published/
unpublished instead of toggling and relying on CSS classes (with this
method, the DOM looks better too).
There was also duplicated code in website for assets_backend.
1. A menu with `/page/website.***` should be flagged as `active`
if the current url is `/page/***`. This is a retro-compatibility
patch for c9d41679fb, so the
menu is marked as active without having to rename it, by
removing this `website.` thing.
2. If you defined two menus with as url `/page/test` and `/page/test2`
Both menus were flagged as `active` when you browsed the url
`/page/test2`, because it started by both menus urls.
Fixes#3059Closes#3070
The original commit by fka used to define less variables like this:
@px-4: 4px
@px-8: 8px
The goal was to be able to change the margin values in
media queries for smaller screens.
However, as the less is only compiled once in css, those
variables didn't really help as you couldn't redefine them
from inside a media query and have the less magically
reassign the margins on the fly.
I created less helper functions to be able to easily redefine
the margins for smaller screens from inside media queries.
The task also required to replace the nbsp in the html by the
newly created mr and ml classes.
This is also the first phase of the sass -> less transition.
Add oe_dark in color list for 'background color', else end user cannot change the color
Force background-color and not background, else background-size from oe_img is overrided
and so the background is displayed with a size:auto instead of cover
This hack was just good to print, but break all repsonsive snippets.
Previous commit specify the use of col-md when printing, and so avoid
to add xs anywhere !
* select2 was linked in both backend and frontend (by web and website)
* select2-bootstrap was in website and linked only in frontend but it
is in fact needed in backend too
+ Remove useless link of the lib by other modules
In view inheritance, selecting an element based on the attribute `string` is
broken, since this attribute may be translated before the inheritance is
applied. This fixes existing views to avoid such selections.