This commit is contained in:
rangansen%netscape.com 2001-10-18 19:09:03 +00:00
Родитель f897328529
Коммит deae863813
3 изменённых файлов: 21 добавлений и 20 удалений

Просмотреть файл

@ -36,7 +36,7 @@
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["signonRememberSignons", "encryptEnabled"];
var _elementIDs = ["signonRememberSignons", "encryptEnabled", "encryptExpire"];
]]>
</script>
@ -63,6 +63,23 @@
wallet.WALLET_InitReencryptCallback(window);
}
function encryptionTest() {
var checkbox = document.getElementById("encryptExpire");
var checked = checkbox.getAttribute("checked");
var wallet = Components.classes['@mozilla.org/wallet/wallet-service;1'];
wallet = wallet.getService();
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
try {
wallet.WALLET_Encrypt("dummy");
} catch (ex) {
// user could not supply master password, leave checkbox in original state
checkbox.setAttribute("checked", !checked);
return false;
}
return true;
}
]]>
</script>
@ -91,6 +108,9 @@
<checkbox id="encryptEnabled" label="&encryptEnabled.label;" accesskey="&encryptEnabled.accesskey;"
pref="true" preftype="bool" prefstring="wallet.crypto"
prefattribute="checked" oncommand="initReencryptCallback();"/>
<checkbox id="encryptExpire" label="&encryptExpire.label;" accesskey="&encryptExpire.accesskey;"
pref="true" preftype="bool" prefstring="signon.expireMasterPassword"
prefattribute="checked" oncommand="encryptionTest();"/>
</vbox>
</groupbox>

Просмотреть файл

@ -93,9 +93,6 @@ function changePasswordSettings()
break;
}
internal_token.setAskPasswordDefaults(askTimes, timeout);
var askEveryTimeHidden = document.getElementById("askEveryTimeHidden");
askEveryTimeHidden.setAttribute("checked",(radiogroup.value == 1)?"true":"false");
}
function ChangePW()

Просмотреть файл

@ -38,17 +38,6 @@
<script type="application/x-javascript" src="chrome://pippki/content/pref-masterpass.js"/>
<!-- List elements to manage for prefs -->
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["askEveryTimeHidden",
"changePasswordButton",
"resetPasswordButton",
"passwordAskTimes",
"passwordTimeout"];
]]>
</script>
<!-- Fancy panel header -->
<hbox class="box-smallheader" title="&lheader;"/>
@ -67,11 +56,6 @@
<!-- Password Prefs -->
<groupbox orient="vertical">
<checkbox id="askEveryTimeHidden"
pref="true" preftype="bool" prefstring="signon.expireMasterPassword"
prefattribute="checked" hidden="true"/>
<caption label="&managepassword.label;"/>
<html>&managepassword.text;</html>
<hbox autostretch="never">