diff --git a/contributing-frontend.md b/contributing-frontend.md index 5a6a203ea86..76fd8a2fde7 100644 --- a/contributing-frontend.md +++ b/contributing-frontend.md @@ -19,7 +19,7 @@ A react root element (or the first container element within it) must include the If your react component isn't dependent on any Knockout observables or Vue components you can integrate it by adding a small script and a component reference directly in the HTML code. The following example integrates MyComponent as a react root in an HTML/mako file. ```HTML - + % endif % if not conf.DEV.get(): - + % endif % for bundle in get_hue_bundles('login' if section == 'login' else 'hue', 'LOGIN' if section == 'login' else 'DEFAULT'): ${ render_bundle(bundle, config='LOGIN' if section == 'login' else 'DEFAULT') | n,unicode } % endfor - - - - - - - + + + + + + + % if user.is_authenticated: ${ hueAceAutocompleter.hueAceAutocompleter() } @@ -168,9 +168,9 @@ if USE_NEW_EDITOR.get(): ${ commonHeaderFooterComponents.header_pollers(user, is_s3_enabled, apps) } % if user.is_authenticated: - + - % endif @@ -556,8 +556,8 @@ ${ hueIcons.symbols() } - - + - - - - - - - - - - - - - + + % if not conf.DEV.get(): - + % endif @@ -110,8 +112,8 @@ - - + - - - - + + + + + - - - - + + + + - + - @@ -334,7 +337,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode } -${ commonHeaderFooterComponents.footer(messages) } +${ commonHeaderFooterComponents.footer(messages, nonce) } ## This includes common knockout templates that are shared with the Job Browser page and the mini job browser panel ## available in the upper right corner throughout Hue diff --git a/desktop/core/src/desktop/templates/hue_ace_autocompleter.mako b/desktop/core/src/desktop/templates/hue_ace_autocompleter.mako index e958e2586b8..aa0f94d4089 100644 --- a/desktop/core/src/desktop/templates/hue_ace_autocompleter.mako +++ b/desktop/core/src/desktop/templates/hue_ace_autocompleter.mako @@ -23,6 +23,7 @@ if sys.version_info[0] > 2: from django.utils.translation import gettext as _ else: from django.utils.translation import ugettext as _ +from desktop.lib.django_util import nonce_attribute %> <%def name="hueAceAutocompleter()"> @@ -356,7 +357,7 @@ else: - - -${ commonfooter(None, messages) | n,unicode } +${ commonfooter(request, messages, nonce ) | n,unicode } diff --git a/desktop/core/src/desktop/templates/login_modal.mako b/desktop/core/src/desktop/templates/login_modal.mako index 73778d86896..1187e296e9b 100644 --- a/desktop/core/src/desktop/templates/login_modal.mako +++ b/desktop/core/src/desktop/templates/login_modal.mako @@ -22,7 +22,7 @@ from django.utils.translation import gettext as _ else: from django.utils.translation import ugettext as _ - + from desktop.lib.django_util import nonce_attribute from useradmin.hue_password_policy import is_password_policy_enabled, get_password_hint %> @@ -49,7 +49,7 @@ -