mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 260364 Fixup radiogroups to use new .value functionality of radio.xml - mail patch
p=me r=mscott
This commit is contained in:
parent
5d66148191
commit
1e020212f1
@ -30,7 +30,7 @@
|
||||
el.setAttribute("value", gPrefService.getIntPref(el.getAttribute("prefstring")) );
|
||||
|
||||
el = document.getElementById('passwordAskTimes');
|
||||
el.selectedItem = el.getElementsByAttribute('value', gPrefService.getIntPref(el.getAttribute("prefstring")))[0];
|
||||
el.value = gPrefService.getIntPref(el.getAttribute("prefstring"));
|
||||
|
||||
onMasterPasswordLoad();
|
||||
}
|
||||
@ -93,12 +93,12 @@
|
||||
flex="1">
|
||||
<!-- note that these values are different than what NSS uses, which
|
||||
are (0, -1, 1) respectively -->
|
||||
<radio value="0" label="&managepassword.askfirsttime;" id="askFirstTime"
|
||||
<radio value="0" label="&managepassword.askfirsttime;"
|
||||
style="margin: 0px;" oncommand="changePasswordSettings(false);"/>
|
||||
<radio value="1" label="&managepassword.askeverytime;" id="askEveryTime"
|
||||
<radio value="1" label="&managepassword.askeverytime;"
|
||||
style="margin: 0px;" oncommand="changePasswordSettings(false);"/>
|
||||
<hbox align="center">
|
||||
<radio value="2" label="&managepassword.asktimeout;" id="askTimeout"
|
||||
<radio value="2" label="&managepassword.asktimeout;"
|
||||
style="margin: 0px;" oncommand="changePasswordSettings(true);"/>
|
||||
<textbox id="passwordTimeout" size="4"
|
||||
preftype="int"
|
||||
|
@ -62,19 +62,7 @@ function onInit()
|
||||
|
||||
gEncryptionCertName.value = gIdentity.getUnicharAttribute("encryption_cert_name");
|
||||
|
||||
var selectedItemId = null;
|
||||
var encryptionPolicy = gIdentity.getIntAttribute("encryptionpolicy");
|
||||
switch (encryptionPolicy)
|
||||
{
|
||||
case 2:
|
||||
selectedItemId = 'encrypt_mail_always';
|
||||
break;
|
||||
default:
|
||||
selectedItemId = 'encrypt_mail_never';
|
||||
break;
|
||||
}
|
||||
|
||||
gEncryptionChoices.selectedItem = document.getElementById(selectedItemId);
|
||||
gEncryptionChoices.value = gIdentity.getIntAttribute("encryptionpolicy");
|
||||
|
||||
if (!gEncryptionCertName.value)
|
||||
{
|
||||
@ -112,7 +100,7 @@ function onPreInit(account, accountValues)
|
||||
function onSave()
|
||||
{
|
||||
// find out which radio for the encryption radio group is selected and set that on our hidden encryptionChoice pref....
|
||||
var newValue = gEncryptionChoices.selectedItem.value;
|
||||
var newValue = gEncryptionChoices.value;
|
||||
gHiddenEncryptionPolicy.setAttribute('value', newValue);
|
||||
gIdentity.setIntAttribute("encryptionpolicy", newValue);
|
||||
gIdentity.setUnicharAttribute("encryption_cert_name", gEncryptionCertName.value);
|
||||
@ -343,7 +331,7 @@ function enableEncryptionControls(do_enable)
|
||||
else {
|
||||
gEncryptAlways.setAttribute("disabled", "true");
|
||||
gNeverEncrypt.setAttribute("disabled", "true");
|
||||
gEncryptionChoices.selectedItem = document.getElementById('encrypt_mail_never');
|
||||
gEncryptionChoices.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user