test SSL cert before login (this will catch the folks who Cancel such dialogs), and...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 Sep 2008 08:13:45 +0000 (08:13 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 22 Sep 2008 08:13:45 +0000 (08:13 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10676 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/xul/staff_client/chrome/content/auth/controller.js
Open-ILS/xul/staff_client/chrome/content/main/main.xul

index 10018c8..d7eb188 100644 (file)
 <!ENTITY staff.main.auth.offline.interface.accesskey "S">
 <!ENTITY staff.main.auth.retest "Re-Test Server">
 <!ENTITY staff.main.auth.retest.accesskey "R">
+<!ENTITY staff.main.auth.add_ssl_exception "Add SSL Exception">
 <!ENTITY staff.main.auth.server "Server">
 <!ENTITY staff.main.auth.status "Status">
 <!ENTITY staff.main.auth.version "Version">
index f49f3c1..42ab924 100644 (file)
@@ -84,6 +84,37 @@ auth.controller.prototype = {
                                                        obj.test_server( obj.controller.view.server_prompt.value );
                                                }
                                        ],
+                    'ssl_exception' : [
+                        ['render'],
+                        function(e) {
+                            return function() {
+                                try {
+                                    obj.controller.view.cmd_ssl_exception.setAttribute('hidden','true');
+                                    var x = new XMLHttpRequest();
+                                    x.open("GET",'chrome://pippki/content/exceptionDialog.xul',false);
+                                    x.send(null);
+                                    obj.controller.view.cmd_ssl_exception.setAttribute('hidden','false');
+                                } catch(E) {
+                                    obj.controller.view.cmd_ssl_exception.setAttribute('hidden','true');
+                                }
+                            };
+                        }
+                    ],
+                    'cmd_ssl_exception' : [
+                        ['command'],
+                        function() {
+                            window.openDialog(
+                                'chrome://pippki/content/exceptionDialog.xul',
+                                '', 
+                                'chrome,centerscreen,modal', 
+                                { 
+                                    'location' : 'https://' + obj.controller.view.server_prompt.value, 
+                                    'prefetchCert' : true 
+                                } 
+                            );
+                                   obj.test_server( obj.controller.view.server_prompt.value );
+                        }
+                    ],
                                        'server_prompt' : [
                                                ['keypress'],
                                                handle_keypress
index de6297e..4f20549 100644 (file)
@@ -69,6 +69,7 @@
                <command id="cmd_js_console"/>
                <command id="cmd_clear_cache"/>
                <command id="cmd_test_server"/>
+               <command id="cmd_ssl_exception" hidden="true"/>
        </commandset>
 
        <keyset id="auth_keys">
                                                <label value="&staff.main.auth.hostname;" control="server_prompt" accesskey="&staff.main.auth.hostname.accesskey;"/>
                                                <vbox>
                                                        <textbox id="server_prompt"/>
-                                                       <button label="&staff.main.auth.retest;" id="retest" accesskey="&staff.main.auth.retest.accesskey;" command="cmd_test_server"/>
+                            <hbox>
+                                                           <button label="&staff.main.auth.retest;" id="retest" accesskey="&staff.main.auth.retest.accesskey;" command="cmd_test_server"/>
+                                                           <button label="&staff.main.auth.add_ssl_exception;" id="ssl_exception" command="cmd_ssl_exception"/>
+                            </hbox>
                                                </vbox>
                                        </row>
                                        <row>