зеркало из https://github.com/mozilla/pjs.git
fix for 82375, password UI problems
r=javi,sr=blizzard,a=choffman for trunk (also for 0.9.2, checked in)
This commit is contained in:
Родитель
a5a71a6dd1
Коммит
a6bdb25cde
|
@ -31,7 +31,6 @@
|
||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
debug="false"
|
debug="false"
|
||||||
height="320"
|
|
||||||
width="300"
|
width="300"
|
||||||
onload="onLoad();"
|
onload="onLoad();"
|
||||||
>
|
>
|
||||||
|
@ -87,9 +86,6 @@
|
||||||
</rows>
|
</rows>
|
||||||
|
|
||||||
<columns>
|
<columns>
|
||||||
<column>
|
|
||||||
<text value="&setPassword.meter.bad;"/>
|
|
||||||
</column>
|
|
||||||
<column style="margin: 5px;">
|
<column style="margin: 5px;">
|
||||||
<progressmeter
|
<progressmeter
|
||||||
flex="1"
|
flex="1"
|
||||||
|
@ -102,40 +98,9 @@
|
||||||
style="forground-color: red"
|
style="forground-color: red"
|
||||||
/>
|
/>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
|
||||||
<text value="&setPassword.meter.good;"/>
|
|
||||||
</column>
|
|
||||||
</columns>
|
</columns>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
||||||
<grid>
|
|
||||||
<columns>
|
|
||||||
<column />
|
|
||||||
<column />
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.total;"/>
|
|
||||||
<textbox id="pwchars" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.numbers;"/>
|
|
||||||
<textbox id="pwnumbers" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.symbols;"/>
|
|
||||||
<textbox id="pwsymbols" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.upper;"/>
|
|
||||||
<textbox id="pwupper" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
|
|
||||||
|
|
||||||
<box>
|
<box>
|
||||||
<button id="ok-button" class="dialog" label="&ok.label;"
|
<button id="ok-button" class="dialog" label="&ok.label;"
|
||||||
style="width: 8ex" oncommand="setPassword();" disabled="true"/>
|
style="width: 8ex" oncommand="setPassword();" disabled="true"/>
|
||||||
|
|
|
@ -148,27 +148,23 @@ function setPasswordStrength()
|
||||||
var pwlength=(pw.length);
|
var pwlength=(pw.length);
|
||||||
if (pwlength>5)
|
if (pwlength>5)
|
||||||
pwlength=5;
|
pwlength=5;
|
||||||
document.getElementById('pwchars').setAttribute("value",pw.length);
|
|
||||||
|
|
||||||
|
|
||||||
//use of numbers in the password
|
//use of numbers in the password
|
||||||
var numnumeric = pw.replace (/[0-9]/g, "");
|
var numnumeric = pw.replace (/[0-9]/g, "");
|
||||||
var numeric=(pw.length - numnumeric.length);
|
var numeric=(pw.length - numnumeric.length);
|
||||||
document.getElementById('pwnumbers').setAttribute("value",numeric);
|
|
||||||
if (numeric>3)
|
if (numeric>3)
|
||||||
numeric=3;
|
numeric=3;
|
||||||
|
|
||||||
//use of symbols in the password
|
//use of symbols in the password
|
||||||
var symbols = pw.replace (/\W/g, "");
|
var symbols = pw.replace (/\W/g, "");
|
||||||
var numsymbols=(pw.length - symbols.length);
|
var numsymbols=(pw.length - symbols.length);
|
||||||
document.getElementById('pwsymbols').setAttribute("value",numsymbols);
|
|
||||||
if (numsymbols>3)
|
if (numsymbols>3)
|
||||||
numsymbols=3;
|
numsymbols=3;
|
||||||
|
|
||||||
//use of uppercase in the password
|
//use of uppercase in the password
|
||||||
var numupper = pw.replace (/[A-Z]/g, "");
|
var numupper = pw.replace (/[A-Z]/g, "");
|
||||||
var upper=(pw.length - numupper.length);
|
var upper=(pw.length - numupper.length);
|
||||||
document.getElementById('pwupper').setAttribute("value",upper);
|
|
||||||
if (upper>3)
|
if (upper>3)
|
||||||
upper=3;
|
upper=3;
|
||||||
|
|
||||||
|
|
|
@ -64,40 +64,13 @@
|
||||||
<grid style="margin: 4px;">
|
<grid style="margin: 4px;">
|
||||||
<rows> <row/> </rows>
|
<rows> <row/> </rows>
|
||||||
<columns>
|
<columns>
|
||||||
<column>
|
|
||||||
<text value="&setPassword.meter.bad;"/>
|
|
||||||
</column>
|
|
||||||
<column style="margin: 5px;">
|
<column style="margin: 5px;">
|
||||||
<progressmeter flex="1" id="pwmeter" mode="determined" value="0%"
|
<progressmeter flex="1" id="pwmeter" mode="determined" value="0%"
|
||||||
align="horizontal" progresstext="Loading"
|
align="horizontal" progresstext="Loading"
|
||||||
width="200" style="foreground-color: red" />
|
width="200" style="foreground-color: red" />
|
||||||
</column>
|
</column>
|
||||||
<column>
|
|
||||||
<text value="&setPassword.meter.good;"/>
|
|
||||||
</column>
|
|
||||||
</columns>
|
</columns>
|
||||||
</grid>
|
</grid>
|
||||||
<grid>
|
|
||||||
<columns> <column /> <column /> </columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.total;"/>
|
|
||||||
<textbox id="pwchars" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.numbers;"/>
|
|
||||||
<textbox id="pwnumbers" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.symbols;"/>
|
|
||||||
<textbox id="pwsymbols" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<text value="&setPassword.stats.upper;"/>
|
|
||||||
<textbox id="pwupper" size="2" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
<box>
|
<box>
|
||||||
<button id="ok-button" class="dialog" label="&ok.label;"
|
<button id="ok-button" class="dialog" label="&ok.label;"
|
||||||
style="width: 8ex" oncommand="setP12Password();" disabled="true"/>
|
style="width: 8ex" oncommand="setP12Password();" disabled="true"/>
|
||||||
|
|
|
@ -22,22 +22,16 @@
|
||||||
|
|
||||||
<!-- Values for changepassword.xul -->
|
<!-- Values for changepassword.xul -->
|
||||||
<!ENTITY setPassword.title "Set Master Password">
|
<!ENTITY setPassword.title "Set Master Password">
|
||||||
<!ENTITY setPassword.tokenName.label "Token Name">
|
<!ENTITY setPassword.tokenName.label "Security Device">
|
||||||
<!ENTITY setPassword.oldPassword.label "Old password">
|
<!ENTITY setPassword.oldPassword.label "Old password">
|
||||||
<!ENTITY setPassword.newPassword.label "Enter a new password">
|
<!ENTITY setPassword.newPassword.label "Enter a new password">
|
||||||
<!ENTITY setPassword.reenterPassword.label "Enter the password again">
|
<!ENTITY setPassword.reenterPassword.label "Enter the password again">
|
||||||
<!ENTITY setPassword.meter.label "Password quality meter:">
|
<!ENTITY setPassword.meter.label "Password quality meter:">
|
||||||
<!ENTITY setPassword.meter.bad "Bad">
|
|
||||||
<!ENTITY setPassword.meter.good "Good">
|
|
||||||
<!ENTITY setPassword.meter.loading "Loading">
|
<!ENTITY setPassword.meter.loading "Loading">
|
||||||
<!ENTITY setPassword.stats.total "Total characters:">
|
|
||||||
<!ENTITY setPassword.stats.numbers "Numbers:">
|
|
||||||
<!ENTITY setPassword.stats.symbols "Symbols:">
|
|
||||||
<!ENTITY setPassword.stats.upper "Uppercase:">
|
|
||||||
|
|
||||||
<!-- Values for getpassword.xul -->
|
<!-- Values for getpassword.xul -->
|
||||||
<!ENTITY getPassword.title "Enter Master Password">
|
<!ENTITY getPassword.title "Enter Master Password">
|
||||||
<!ENTITY getPassword.tokenName.label "Token Name">
|
<!ENTITY getPassword.tokenName.label "Security Device">
|
||||||
<!ENTITY getPassword.password.label "Password:">
|
<!ENTITY getPassword.password.label "Password:">
|
||||||
|
|
||||||
<!-- These should be common -->
|
<!-- These should be common -->
|
||||||
|
|
Загрузка…
Ссылка в новой задаче