Commit 2215c7ad authored by Jérome Perrin's avatar Jérome Perrin

Revert "HACK dms: transparently support password protected PDFs in PDF Viewer"

This reverts commit 50133064d632a3c3774c2714193c47c76d3e7fe6.

This was just a proof of concept, it breaks when the
PDF_getTravellerDataEncryptionPassword script is not present (and for now it's
not - and also it seems a bit misnamed this is not limited to "Traveller")
parent dce4472b
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<list> <list>
<string>data_url</string> <string>data_url</string>
<string>default</string> <string>default</string>
<string>renderjs_extra</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -68,12 +67,6 @@ ...@@ -68,12 +67,6 @@
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -97,12 +90,6 @@ ...@@ -97,12 +90,6 @@
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value> <value> <string>Base_viewFieldLibrary</string> </value>
</item> </item>
<item>
<key> <string>renderjs_extra</string> </key>
<value>
<list/>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -122,17 +109,4 @@ ...@@ -122,17 +109,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'editor\', context.Base_getEditorFieldPreferredTextEditor()), (\'portal_type\', context.getPortalType()), (\'maximize\', \'listbox\' not in field.id), (\'pdf_password\', context.PDF_getTravellerDataEncryptionPassword())]</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -21,16 +21,6 @@ ...@@ -21,16 +21,6 @@
window.document.head.removeChild(el); window.document.head.removeChild(el);
}); });
this.props.key = options.key; this.props.key = options.key;
PasswordPrompt._original_open = PasswordPrompt.open;
var retries = 0;
PasswordPrompt.open = function () {
if (retries) {
return this._original_open()
}
console.log("password", retries);
retries++;
return this.updatePassword(options.pdf_password);
}
webViewerLoad(options.value); webViewerLoad(options.value);
// hide few buttons for now // hide few buttons for now
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
run: options.run || false, run: options.run || false,
key: options.key, key: options.key,
language_support_url: options.language_support_url || "", language_support_url: options.language_support_url || "",
pdf_password: options.pdf_password || "",
// Force calling subfield render // Force calling subfield render
// as user may have modified the input value // as user may have modified the input value
render_timestamp: new Date().getTime() render_timestamp: new Date().getTime()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment