form: don't display portfolio pickers if instructed to do so (#7182)

This commit is contained in:
Frédéric Péters 2015-12-02 10:20:42 +01:00
parent caf373d5ac
commit 72d2e60f7b
1 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,8 @@ from qommon.form import *
class FileWithPreviewAndStrongboxWidget(FileWithPreviewWidget):
def render_hint(self, hint):
t = CompositeWidget.render_hint(self, hint)
if not self.allow_portfolio_picking:
return t
root_url = get_publisher().get_root_url()
if get_publisher().has_site_option('strongbox') and get_request().user and not self.preview:
get_response().add_javascript(['../../aq/js/strongbox.js'])