Mercurial > p > roundup > code
diff doc/upgrading.txt @ 6753:2bca9fcef70d
Don't display submit button with readoly use of _generic.item.html
_generic.item.html in all templates except jinja2 displays the
submit button even when the user has no edit rights.
Check for is_edit_ok before emitting the submit button.
The jinja2 template doesn't have an _generic.item.html template.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 04 Jul 2022 23:43:49 -0400 |
| parents | d32d43e4a5ba |
| children | 15238a434368 |
line wrap: on
line diff
--- a/doc/upgrading.txt Mon Jul 04 22:21:05 2022 -0400 +++ b/doc/upgrading.txt Mon Jul 04 23:43:49 2022 -0400 @@ -228,6 +228,26 @@ the roundup-users at lists.sourceforge.net mailing list so we can enable it by default in a future release. + +Hide submit button during readonly use of _generic.item.html (optional) +----------------------------------------------------------------------- + +The submit button in _generic.item.html always shows up even when the +user doesn't have edit perms. Change the ``context/submit`` html to +read:: + + <td colspan=3 tal:content="structure context/submit" + tal:condition="context/is_edit_ok"> + +in your TAL based templates. The ``jinja2`` based templates are +missing this file, but if you implemented one you want to surround the +jinja2 code with:: + + {% if context.is_view_ok() %} + <submit button code here> + {% endif %} + + Migrating from 2.0.0 to 2.1.0 =============================
