Commit 76c8febf authored by johnnyg@chromium.org's avatar johnnyg@chromium.org

Bring the first passphrase screen UI up to date with equivalent changes made...

Bring the first passphrase screen UI up to date with equivalent changes made to the encryption tab: learn more link, behavior of passphrase/confirm passphrase boxes.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6353013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72342 0039d316-1c4b-4281-b951-d872f2087c98
parent b83ff229
...@@ -39,6 +39,11 @@ form { ...@@ -39,6 +39,11 @@ form {
margin: 5px; margin: 5px;
padding: 10px; padding: 10px;
} }
#learn-more-link {
float: right;
}
html[dir='rtl'] .sync-footer { html[dir='rtl'] .sync-footer {
text-align: left; text-align: left;
left: 0px; left: 0px;
...@@ -59,15 +64,6 @@ html[os='mac'] input[type='submit'] { ...@@ -59,15 +64,6 @@ html[os='mac'] input[type='submit'] {
margin-top: 5px; margin-top: 5px;
} }
#passphraseLabel,
#confirmPassphraseLabel {
width: 145px;
float: left;
text-align: right;
margin-right: 4px;
padding-top: 3px;
}
</style> </style>
<script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/cr.js"></script>
<script> <script>
...@@ -127,8 +123,7 @@ html[os='mac'] input[type='submit'] { ...@@ -127,8 +123,7 @@ html[os='mac'] input[type='submit'] {
emptyError.style.display = "block"; emptyError.style.display = "block";
return false; return false;
} }
if (f.confirmpassphrase.value.length > 0 && if (f.confirmpassphrase.value != f.passphrase.value) {
f.confirmpassphrase.value != f.passphrase.value) {
mismatchError.style.display = "block"; mismatchError.style.display = "block";
return false; return false;
} }
...@@ -159,6 +154,10 @@ html[os='mac'] input[type='submit'] { ...@@ -159,6 +154,10 @@ html[os='mac'] input[type='submit'] {
</div> </div>
<div> <div>
<input name="option" type="radio" value="explicit" onchange="onRadioChange();"> <input name="option" type="radio" value="explicit" onchange="onRadioChange();">
<div id="learn-more-link">
<a i18n-values="href:encryptionhelpurl" target="_blank"
i18n-content="learnmore"></a>
</div>
<span i18n-content="explicitOption"></span> <span i18n-content="explicitOption"></span>
</input> </input>
</div> </div>
...@@ -176,16 +175,13 @@ html[os='mac'] input[type='submit'] { ...@@ -176,16 +175,13 @@ html[os='mac'] input[type='submit'] {
<div> <div>
<div i18n-content="passphraseLabel" id="passphraseLabel"></div> <div i18n-content="passphraseLabel" id="passphraseLabel"></div>
<input id="passphrase" name="passphrase" label="passphraseLabel" <input id="passphrase" name="passphrase" label="passphraseLabel"
type="password" onkeyup="checkPassphraseMatch();" type="password"/>
onchange="checkPassphraseMatch();"/>
</div> </div>
<div> <div>
<div i18n-content="confirmLabel" id="confirmPassphraseLabel"> <div i18n-content="confirmLabel" id="confirmPassphraseLabel">
</div> </div>
<input id="confirmpassphrase" name="confirmpassphrase" type="password" <input id="confirmpassphrase" name="confirmpassphrase" type="password"
label="confirmPassphraseLabel" label="confirmPassphraseLabel" />
onkeyup="checkPassphraseMatch();"
onchange="checkPassphraseMatch();" />
</div> </div>
<div class="error" style="display:none" <div class="error" style="display:none"
id="emptyerror" i18n-content="emptyErrorMessage"></div> id="emptyerror" i18n-content="emptyErrorMessage"></div>
......
...@@ -204,6 +204,11 @@ void SyncResourcesSource::StartDataRequest(const std::string& path_raw, ...@@ -204,6 +204,11 @@ void SyncResourcesSource::StartDataRequest(const std::string& path_raw,
AddString(dict, "confirmLabel", IDS_SYNC_CONFIRM_PASSPHRASE_LABEL); AddString(dict, "confirmLabel", IDS_SYNC_CONFIRM_PASSPHRASE_LABEL);
AddString(dict, "emptyErrorMessage", IDS_SYNC_EMPTY_PASSPHRASE_ERROR); AddString(dict, "emptyErrorMessage", IDS_SYNC_EMPTY_PASSPHRASE_ERROR);
AddString(dict, "mismatchErrorMessage", IDS_SYNC_PASSPHRASE_MISMATCH_ERROR); AddString(dict, "mismatchErrorMessage", IDS_SYNC_PASSPHRASE_MISMATCH_ERROR);
AddString(dict, "learnmore", IDS_LEARN_MORE);
dict->SetString("encryptionhelpurl",
GetLocalizedUrl(kEncryptionHelpUrl));
AddString(dict, "ok", IDS_OK); AddString(dict, "ok", IDS_OK);
AddString(dict, "cancel", IDS_CANCEL); AddString(dict, "cancel", IDS_CANCEL);
} else if (path_raw == kSyncSettingUpPath) { } else if (path_raw == kSyncSettingUpPath) {
......
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