You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Web Form docType is rendered, the context for the default template is unsetting "banner_image" so default nav bar is not rendering the brand image.
Also sets the "webform_banner_image" to self.banner_image AFTER loading custom context from the custom app, so at the end is not possible to override the custom context configured values for the web form.
Context information (for bug reports)
Output of bench version
frappe 15.23.0
Tested on
Version frappe 15.23.0
Version frappe 15.24.1
Steps to reproduce the issue
Set a banner_image on the Website Settings configuration for the navbar
Create a Web Form without banner_image, with is_standard as True web form context py file is generated
Add to the context py file of the web form a line to add a form_banner_image image.
Observed result
When you access the Web Form, you will not see the brand / nav bar image
You will not see the image set on the custom context py file for the form_banner_image variable, in case you set banner image on the Web Form you will always see that one instead of the used in the custom context py file.
Expected result
Nav bar always renders the defined banner / brand image.
On a Web form the custom context values defined in the py file should override any default one.
Additional information
The issue is on frappe/website/doctype/web_form/web_form.py file at line 248 and 259
self.add_custom_context_and_script() is called BEFORE context.webform_banner_image = self.banner_image so any custom value for that variable will be override.
Also the last line context.pop("banner_image", None) will unset brand / navbar banner_image as the context key is exactly that.
The text was updated successfully, but these errors were encountered:
Description of the issue
When a Web Form docType is rendered, the context for the default template is unsetting "banner_image" so default nav bar is not rendering the brand image.
Also sets the "webform_banner_image" to self.banner_image AFTER loading custom context from the custom app, so at the end is not possible to override the custom context configured values for the web form.
Context information (for bug reports)
Output of
bench version
Tested on
Version frappe 15.23.0
Version frappe 15.24.1
Steps to reproduce the issue
Observed result
Expected result
Additional information
The issue is on frappe/website/doctype/web_form/web_form.py file at line 248 and 259
frappe/frappe/website/doctype/web_form/web_form.py
Lines 241 to 249 in 1a18956
self.add_custom_context_and_script() is called BEFORE context.webform_banner_image = self.banner_image so any custom value for that variable will be override.
Also the last line context.pop("banner_image", None) will unset brand / navbar banner_image as the context key is exactly that.
The text was updated successfully, but these errors were encountered: