Skip to content

Commit

Permalink
[fc] Repository: plone.app.z3cform
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2021-09-28T18:28:35+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.z3cform@a7f60a0

Fix form error alert, includes rendering for invariants

Files changed:
A news/129.bugfix
M plone/app/z3cform/templates/macros.pt
Repository: plone.app.z3cform

Branch: refs/heads/master
Date: 2021-10-02T15:07:56+02:00
Author: agitator (agitator) <agitator@users.noreply.github.com>
Commit: plone/plone.app.z3cform@c19e788

Merge pull request #129 from plone/fix-formerror-alert

Fix form error alert, includes rendering for invariants

Files changed:
A news/129.bugfix
M plone/app/z3cform/templates/macros.pt
  • Loading branch information
agitator committed Oct 2, 2021
1 parent bc01fbb commit b68cd9a
Showing 1 changed file with 17 additions and 49 deletions.
66 changes: 17 additions & 49 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,66 +1,34 @@
Repository: plone.recipe.zope2instance
Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2021-09-30T09:22:54+02:00
Author: Jens Vagelpohl (dataflake) <jens@plyp.com>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/906d5607801f326d8b504cd552b453294aea8cc3
Date: 2021-09-28T18:28:35+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/plone.app.z3cform/commit/a7f60a0f6b1620d750ddad2059af4bccbcbe3e00

- Fix `python-dotenv` dependency for Python 2 compatibility
Fix form error alert, includes rendering for invariants

Files changed:
A news/181.bugfix
M setup.py
A news/129.bugfix
M plone/app/z3cform/templates/macros.pt

b'diff --git a/news/181.bugfix b/news/181.bugfix\nnew file mode 100644\nindex 0000000..74d79ef\n--- /dev/null\n+++ b/news/181.bugfix\n@@ -0,0 +1 @@\n+- Fix `python-dotenv` dependency for Python 2 compatibility [dataflake] (#181)\ndiff --git a/setup.py b/setup.py\nindex 443f850..6e14226 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -54,7 +54,7 @@\n "ZEO",\n "waitress >= 1.2.0",\n "Paste",\n- "python-dotenv",\n+ "python-dotenv < 0.19",\n ],\n extras_require={\n "test": [\n'
b'diff --git a/news/129.bugfix b/news/129.bugfix\nnew file mode 100644\nindex 0000000..bc6218e\n--- /dev/null\n+++ b/news/129.bugfix\n@@ -0,0 +1,2 @@\n+Fix form-error alert for BS5 (including invariants errors). [jensens]\n+\ndiff --git a/plone/app/z3cform/templates/macros.pt b/plone/app/z3cform/templates/macros.pt\nindex 26b81c1..b920f4a 100644\n--- a/plone/app/z3cform/templates/macros.pt\n+++ b/plone/app/z3cform/templates/macros.pt\n@@ -13,28 +13,45 @@\n </metal:title-slot>\n \n <metal:define define-macro="titlelessform"\n- tal:define="status view/status;\n- has_error python:view.widgets.errors or status == getattr(view, \'formErrorsMessage\', None)"\n i18n:domain="plone">\n \n- <tal:status condition="status">\n- <div class="alert alert-danger" tal:condition="has_error" role="alert">\n- <span tal:replace="status" />\n+ <tal:status tal:define="status view/status;\n+ has_error python:view.widgets.errors or status == getattr(view, \'formErrorsMessage\', None);\n+ errors view/widgets/errors;\n+ icons nocall: context/@@iconresolver"\n+ tal:condition="python: status">\n+ <div tal:condition="python:not (has_error or errors)"\n+ class="portalMessage statusmessage statusmessage-info alter alert-info"\n+ role="alert">\n+ <tal:icon tal:replace="structure python:icons.tag(\'plone-statusmessage-info\', tag_alt=\'Info\', tag_class=\'statusmessage-icon mb-1 me-2\')" i18n:attributes="alt"/>\n+ <span class="content"\n+ tal:replace="structure status | nothing"\n+ i18n:translate="">\n+ The info status message.\n+ </span>\n </div>\n- <div class="alert alert-info" tal:condition="not:has_error" role="alert">\n- <span tal:replace="status" />\n+ <div tal:condition="python:has_error or errors"\n+ class="portalMessage statusmessage statusmessage-error alert alert-danger"\n+ role="alert">\n+ <tal:icon tal:replace="structure python:icons.tag(\'plone-statusmessage-error\', tag_alt=\'Error\', tag_class=\'statusmessage-icon mb-1 me-2\')" i18n:attributes="alt"/>\n+ <span class="content"\n+ tal:replace="structure status | nothing"\n+ i18n:translate="">\n+ The error status message.\n+ </span>\n+ <div class="mt-2 field error" tal:condition="python:[e for e in errors if not getattr(e, \'widget\', None)]">\n+ <ul>\n+ <tal:loop tal:repeat="error errors">\n+ <li tal:condition="not:nocall:error/widget"\n+ tal:content="structure error/render">\n+ Error\n+ </li>\n+ </tal:loop>\n+ </ul>\n+ </div>\n </div>\n </tal:status>\n \n- <tal:errors define="errors view/widgets/errors" condition="errors">\n- <tal:error repeat="error errors">\n- <div class="field error"\n- tal:condition="not:nocall:error/widget"\n- tal:content="structure error/render">\n- Error\n- </div>\n- </tal:error>\n- </tal:errors>\n \n <form data-pat-autotoc="levels: legend; section: fieldset; className: autotabs"\n class="rowlike enableUnloadProtection" action="." method="post" novalidate\n'

Repository: plone.recipe.zope2instance
Repository: plone.app.z3cform


Branch: refs/heads/master
Date: 2021-09-30T11:00:11+02:00
Author: Jens Vagelpohl (dataflake) <jens@netz.ooo>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/0d852c7362bf2d11ff16b4c6791874e65dd65693
Date: 2021-10-02T15:07:56+02:00
Author: agitator (agitator) <agitator@users.noreply.github.com>
Commit: https://github.com/plone/plone.app.z3cform/commit/c19e7884a7b344ee2cccf2f4210dc63f8b3226f8

Update setup.py
Merge pull request #129 from plone/fix-formerror-alert

Co-authored-by: Jens W. Klein &lt;jk@kleinundpartner.at&gt;
Fix form error alert, includes rendering for invariants

Files changed:
M setup.py
A news/129.bugfix
M plone/app/z3cform/templates/macros.pt

b'diff --git a/setup.py b/setup.py\nindex 6e14226..eb55330 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -54,7 +54,7 @@\n "ZEO",\n "waitress >= 1.2.0",\n "Paste",\n- "python-dotenv < 0.19",\n+ "python-dotenv < 0.19", # python 2 support\n ],\n extras_require={\n "test": [\n'

Repository: plone.recipe.zope2instance


Branch: refs/heads/master
Date: 2021-09-30T11:26:05+02:00
Author: Jens Vagelpohl (dataflake) <jens@plyp.com>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/b710b814e446fb874b19b5e136850fb32aaea940

- restrict only on Python &lt;3

Files changed:
M setup.py

b'diff --git a/setup.py b/setup.py\nindex eb55330..ed76903 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -54,7 +54,8 @@\n "ZEO",\n "waitress >= 1.2.0",\n "Paste",\n- "python-dotenv < 0.19", # python 2 support\n+ \'python-dotenv < 0.19; python_version<"3"\',\n+ \'python-dotenv; python_version>="3"\',\n ],\n extras_require={\n "test": [\n'

Repository: plone.recipe.zope2instance


Branch: refs/heads/master
Date: 2021-09-30T15:06:23+02:00
Author: Jens Vagelpohl (dataflake) <jens@plyp.com>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/0d12dcf5c89474402b958e2c024970292ee322f6

Merge pull request #182 from plone/dataflake/issue_181

Fix `python-dotenv` dependency for Python 2 compatibility

Files changed:
A news/181.bugfix
M setup.py

b'diff --git a/news/181.bugfix b/news/181.bugfix\nnew file mode 100644\nindex 0000000..74d79ef\n--- /dev/null\n+++ b/news/181.bugfix\n@@ -0,0 +1 @@\n+- Fix `python-dotenv` dependency for Python 2 compatibility [dataflake] (#181)\ndiff --git a/setup.py b/setup.py\nindex 443f850..ed76903 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -54,7 +54,8 @@\n "ZEO",\n "waitress >= 1.2.0",\n "Paste",\n- "python-dotenv",\n+ \'python-dotenv < 0.19; python_version<"3"\',\n+ \'python-dotenv; python_version>="3"\',\n ],\n extras_require={\n "test": [\n'
b'diff --git a/news/129.bugfix b/news/129.bugfix\nnew file mode 100644\nindex 0000000..bc6218e\n--- /dev/null\n+++ b/news/129.bugfix\n@@ -0,0 +1,2 @@\n+Fix form-error alert for BS5 (including invariants errors). [jensens]\n+\ndiff --git a/plone/app/z3cform/templates/macros.pt b/plone/app/z3cform/templates/macros.pt\nindex 26b81c1..b920f4a 100644\n--- a/plone/app/z3cform/templates/macros.pt\n+++ b/plone/app/z3cform/templates/macros.pt\n@@ -13,28 +13,45 @@\n </metal:title-slot>\n \n <metal:define define-macro="titlelessform"\n- tal:define="status view/status;\n- has_error python:view.widgets.errors or status == getattr(view, \'formErrorsMessage\', None)"\n i18n:domain="plone">\n \n- <tal:status condition="status">\n- <div class="alert alert-danger" tal:condition="has_error" role="alert">\n- <span tal:replace="status" />\n+ <tal:status tal:define="status view/status;\n+ has_error python:view.widgets.errors or status == getattr(view, \'formErrorsMessage\', None);\n+ errors view/widgets/errors;\n+ icons nocall: context/@@iconresolver"\n+ tal:condition="python: status">\n+ <div tal:condition="python:not (has_error or errors)"\n+ class="portalMessage statusmessage statusmessage-info alter alert-info"\n+ role="alert">\n+ <tal:icon tal:replace="structure python:icons.tag(\'plone-statusmessage-info\', tag_alt=\'Info\', tag_class=\'statusmessage-icon mb-1 me-2\')" i18n:attributes="alt"/>\n+ <span class="content"\n+ tal:replace="structure status | nothing"\n+ i18n:translate="">\n+ The info status message.\n+ </span>\n </div>\n- <div class="alert alert-info" tal:condition="not:has_error" role="alert">\n- <span tal:replace="status" />\n+ <div tal:condition="python:has_error or errors"\n+ class="portalMessage statusmessage statusmessage-error alert alert-danger"\n+ role="alert">\n+ <tal:icon tal:replace="structure python:icons.tag(\'plone-statusmessage-error\', tag_alt=\'Error\', tag_class=\'statusmessage-icon mb-1 me-2\')" i18n:attributes="alt"/>\n+ <span class="content"\n+ tal:replace="structure status | nothing"\n+ i18n:translate="">\n+ The error status message.\n+ </span>\n+ <div class="mt-2 field error" tal:condition="python:[e for e in errors if not getattr(e, \'widget\', None)]">\n+ <ul>\n+ <tal:loop tal:repeat="error errors">\n+ <li tal:condition="not:nocall:error/widget"\n+ tal:content="structure error/render">\n+ Error\n+ </li>\n+ </tal:loop>\n+ </ul>\n+ </div>\n </div>\n </tal:status>\n \n- <tal:errors define="errors view/widgets/errors" condition="errors">\n- <tal:error repeat="error errors">\n- <div class="field error"\n- tal:condition="not:nocall:error/widget"\n- tal:content="structure error/render">\n- Error\n- </div>\n- </tal:error>\n- </tal:errors>\n \n <form data-pat-autotoc="levels: legend; section: fieldset; className: autotabs"\n class="rowlike enableUnloadProtection" action="." method="post" novalidate\n'

0 comments on commit b68cd9a

Please sign in to comment.