summaryrefslogtreecommitdiffstats
path: root/browser/base/content/sync/setup.xul
blob: 11c08593113abcad081ece8db6ad108cdaa9ddbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<?xml version="1.0"?>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/syncSetup.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/syncCommon.css" type="text/css"?>

<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
<!ENTITY % syncSetupDTD SYSTEM "chrome://browser/locale/syncSetup.dtd">
%brandDTD;
%syncBrandDTD;
%syncSetupDTD;
]>
<wizard id="wizard"
        title="&accountSetupTitle.label;"
        windowtype="Weave:AccountSetup"
        persist="screenX screenY"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        onwizardnext="return gSyncSetup.onWizardAdvance()"
        onwizardback="return gSyncSetup.onWizardBack()"
        onwizardcancel="gSyncSetup.onWizardCancel()"
        onload="gSyncSetup.init()">

  <script type="application/javascript"
          src="chrome://browser/content/sync/setup.js"/>
  <script type="application/javascript"
          src="chrome://browser/content/sync/utils.js"/>
  <script type="application/javascript"
          src="chrome://browser/content/utilityOverlay.js"/>
  <script type="application/javascript"
          src="chrome://global/content/printUtils.js"/>

  <wizardpage id="addDevicePage"
              label="&pairDevice.title.label;"
              onpageshow="gSyncSetup.onPageShow()">
    <description>
      &pairDevice.dialog.description.label;
      <label class="text-link"
             value="&addDevice.showMeHow.label;"
             href="https://services.mozilla.com/sync/help/add-device"/>
    </description>
    <separator class="groove-thin"/>
    <description>
      &addDevice.dialog.enterCode.label;
    </description>
    <separator class="groove-thin"/>
    <vbox align="center">
      <textbox id="pin1"
               class="pin"
               oninput="gSyncSetup.onPINInput(this);"
               onfocus="this.select();"
               />
      <textbox id="pin2"
               class="pin"
               oninput="gSyncSetup.onPINInput(this);"
               onfocus="this.select();"
               />
      <textbox id="pin3"
               class="pin"
               oninput="gSyncSetup.onPINInput(this);"
               onfocus="this.select();" 
               />
    </vbox>
    <separator class="groove-thin"/>
    <vbox id="pairDeviceThrobber" align="center" hidden="true">
      <image/>
    </vbox>
    <hbox id="pairDeviceErrorRow" pack="center" hidden="true">
      <image class="statusIcon" status="error"/>
      <label class="status"
             value="&addDevice.dialog.tryAgain.label;"/>
    </hbox>
  </wizardpage>

  <wizardpage id="pickSetupType"
              label="&syncBrand.fullName.label;"
              onpageshow="gSyncSetup.onPageShow()">
    <vbox align="center" flex="1">
      <description style="padding: 0 7em;">
        &setup.pickSetupType.description2;
      </description>
      <spacer flex="3"/>
      <button id="newAccount"
              class="accountChoiceButton"
              label="&button.createNewAccount.label;"
              oncommand="gSyncSetup.startNewAccountSetup()"
              align="center"/>
      <spacer flex="1"/>
    </vbox>
    <separator class="groove"/>
    <vbox align="center" flex="1">
      <spacer flex="1"/>
      <button id="existingAccount"
              class="accountChoiceButton"
              label="&button.haveAccount.label;"
              oncommand="gSyncSetup.useExistingAccount()"/>
      <spacer flex="3"/>
    </vbox>
  </wizardpage>

  <wizardpage label="&setup.newAccountDetailsPage.title.label;"
              id="newAccountStart"
              onextra1="gSyncSetup.onSyncOptions()"
              onpageshow="gSyncSetup.onPageShow();">
    <grid>
      <columns>
        <column/>
        <column class="inputColumn" flex="1"/>
      </columns>
      <rows>
        <row id="emailRow" align="center">
          <label value="&setup.emailAddress.label;"
                 accesskey="&setup.emailAddress.accesskey;"
                 control="weaveEmail"/>
          <textbox id="weaveEmail"
                   oninput="gSyncSetup.onEmailInput()"/>
        </row>
        <row id="emailFeedbackRow" align="center" hidden="true">
          <spacer/>
          <hbox>
            <image class="statusIcon"/>
            <label class="status" value=" "/>
          </hbox>
        </row>
        <row id="passwordRow" align="center">
          <label value="&setup.choosePassword.label;"
                 accesskey="&setup.choosePassword.accesskey;"
                 control="weavePassword"/>
          <textbox id="weavePassword"
                   type="password"
                   onchange="gSyncSetup.onPasswordChange()"/>
        </row>
        <row id="confirmRow" align="center">
          <label value="&setup.confirmPassword.label;"
                 accesskey="&setup.confirmPassword.accesskey;"
                 control="weavePasswordConfirm"/>
          <textbox id="weavePasswordConfirm"
                   type="password"
                   onchange="gSyncSetup.onPasswordChange()"/>
        </row>
        <row id="passwordFeedbackRow" align="center" hidden="true">
          <spacer/>
          <hbox>
            <image class="statusIcon"/>
            <label class="status" value=" "/>
          </hbox>
        </row>
        <row align="center">
          <label control="server"
                 value="&server.label;"/>
          <menulist id="server"
                    oncommand="gSyncSetup.onServerCommand()"
                    oninput="gSyncSetup.onServerInput()">
            <menupopup>
              <menuitem label="&serverType.default.label;"
                        value="main"/>
              <menuitem label="&serverType.custom2.label;"
                        value="custom"/>
            </menupopup>
          </menulist>
        </row>
        <row id="serverFeedbackRow" align="center" hidden="true">
          <spacer/>
          <hbox>
            <image class="statusIcon"/>
            <label class="status" value=" "/>
          </hbox>
        </row>
        <row id="TOSRow" align="center">
          <spacer/>
          <hbox align="center">
            <checkbox id="tos"
                      accesskey="&setup.tosAgree1.accesskey;"
                      oncommand="this.focus(); gSyncSetup.checkFields();"/>
            <description id="tosDesc"
                         flex="1"
                         onclick="document.getElementById('tos').focus();
                                  document.getElementById('tos').click()">
              &setup.tosAgree1.label;
              <label class="text-link"
                     onclick="event.stopPropagation();gSyncUtils.openToS();">
                &setup.tosLink.label;
              </label>
              &setup.tosAgree2.label;
              <label class="text-link"
                     onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();">
                &setup.ppLink.label;
              </label>
              &setup.tosAgree3.label;
            </description>
          </hbox>
        </row>
      </rows>
    </grid>
    <spacer flex="1"/>
    <vbox flex="1" align="center">
      <browser height="150"
               width="500"
               id="captcha"
               type="content"
               disablehistory="true"/>
      <spacer flex="1"/>
      <hbox id="captchaFeedback">
        <image class="statusIcon"/>
        <label class="status" value=" "/>
      </hbox>
    </vbox>
  </wizardpage>

  <wizardpage id="addDevice"
              label="&pairDevice.title.label;"
              onextra1="gSyncSetup.onSyncOptions()"
              onpageshow="gSyncSetup.onPageShow()">
    <description>
      &pairDevice.setup.description.label;
      <label class="text-link"
             value="&addDevice.showMeHow.label;"
             href="https://services.mozilla.com/sync/help/easy-setup"/>
    </description>
    <label value="&addDevice.setup.enterCode.label;"
           control="easySetupPIN1"/>
    <spacer flex="1"/>
    <vbox align="center" flex="1">
      <textbox id="easySetupPIN1"
               class="pin"
               value=""
               readonly="true"
               />
      <textbox id="easySetupPIN2"
               class="pin"
               value=""
               readonly="true"
               />
      <textbox id="easySetupPIN3"
               class="pin"
               value=""
               readonly="true"
               />
    </vbox>
    <spacer flex="3"/>
    <label class="text-link"
           value="&addDevice.dontHaveDevice.label;"
           onclick="gSyncSetup.manualSetup();"/>
  </wizardpage>

  <wizardpage id="existingAccount"
              label="&setup.signInPage.title.label;"
              onextra1="gSyncSetup.onSyncOptions()"
              onpageshow="gSyncSetup.onPageShow()">
      <grid>
        <columns>
          <column/>
          <column class="inputColumn" flex="1"/>
        </columns>
        <rows>
          <row id="existingAccountRow" align="center">
            <label id="existingAccountLabel"
                   value="&signIn.account2.label;"
                   accesskey="&signIn.account2.accesskey;"
                   control="existingAccount"/>
            <textbox id="existingAccountName"
                     oninput="gSyncSetup.checkFields(event)"
                     onchange="gSyncSetup.checkFields(event)"/>
          </row>
          <row id="existingPasswordRow" align="center">
            <label id="existingPasswordLabel"
                   value="&signIn.password.label;"
                   accesskey="&signIn.password.accesskey;"
                   control="existingPassword"/>
            <textbox id="existingPassword"
                     type="password"
                     onkeyup="gSyncSetup.checkFields(event)"
                     onchange="gSyncSetup.checkFields(event)"/>
          </row>
          <row id="existingPasswordFeedbackRow" align="center" hidden="true">
            <spacer/>
            <hbox>
              <image class="statusIcon"/>
              <label class="status" value=" "/>
            </hbox>
          </row>
          <row align="center">
            <spacer/>
            <label class="text-link"
                   value="&resetPassword.label;"
                   onclick="gSyncUtils.resetPassword(); return false;"/>
          </row>
          <row align="center">
            <label control="existingServer"
                   value="&server.label;"/>
            <menulist id="existingServer"
                      oncommand="gSyncSetup.onExistingServerCommand()"
                      oninput="gSyncSetup.onExistingServerInput()">
              <menupopup>
                <menuitem label="&serverType.default.label;"
                          value="main"/>
                <menuitem label="&serverType.custom2.label;"
                          value="custom"/>
              </menupopup>
            </menulist>
          </row>
          <row id="existingServerFeedbackRow" align="center" hidden="true">
            <spacer/>
            <hbox>
              <image class="statusIcon"/>
              <vbox>
                <label class="status" value=" "/>
              </vbox>
            </hbox>
          </row>
        </rows>
      </grid>

    <groupbox>
      <label id="existingPassphraseLabel"
             value="&signIn.recoveryKey.label;"
             accesskey="&signIn.recoveryKey.accesskey;"
             control="existingPassphrase"/>
      <textbox id="existingPassphrase"
               oninput="gSyncSetup.checkFields()"/>
      <hbox id="login-throbber" hidden="true">
        <image/>
        <label value="&verifying.label;"/>
      </hbox>
      <vbox align="left" id="existingPassphraseFeedbackRow" hidden="true">
        <hbox>
          <image class="statusIcon"/>
          <label class="status" value=" "/>
        </hbox>
      </vbox>
    </groupbox>

    <vbox id="passphraseHelpBox">
      <description>
        &existingRecoveryKey.description;
        <label class="text-link"
               href="https://services.mozilla.com/sync/help/manual-setup">
          &addDevice.showMeHow.label;
        </label>
        <spacer id="passphraseHelpSpacer"/>
        <label class="text-link"
               onclick="gSyncSetup.resetPassphrase(); return false;">
          &resetSyncKey.label;
        </label>
      </description>
    </vbox>
  </wizardpage>

  <wizardpage id="syncOptionsPage"
              label="&setup.optionsPage.title;"
              onpageshow="gSyncSetup.onPageShow()">
    <groupbox id="syncOptions">
    <grid>
      <columns>
        <column/>
        <column flex="1" style="margin-inline-end: 2px"/>
      </columns>
      <rows>
        <row align="center">
          <label value="&syncDeviceName.label;"
                 accesskey="&syncDeviceName.accesskey;"
                 control="syncComputerName"/>
          <textbox id="syncComputerName" flex="1"
                   onchange="gSyncUtils.changeName(this)"/>
        </row>
        <row>
          <label value="&syncMy.label;" />
          <vbox>
            <checkbox label="&engine.addons.label;"
                      accesskey="&engine.addons.accesskey;"
                      id="engine.addons"
                      checked="true"/>
            <checkbox label="&engine.bookmarks.label;"
                      accesskey="&engine.bookmarks.accesskey;"
                      id="engine.bookmarks"
                      checked="true"/>
            <checkbox label="&engine.passwords.label;"
                      accesskey="&engine.passwords.accesskey;"
                      id="engine.passwords"
                      checked="true"/>
            <checkbox label="&engine.prefs.label;"
                      accesskey="&engine.prefs.accesskey;"
                      id="engine.prefs"
                      checked="true"/>
            <checkbox label="&engine.history.label;"
                      accesskey="&engine.history.accesskey;"
                      id="engine.history"
                      checked="true"/>
            <checkbox label="&engine.tabs.label;"
                      accesskey="&engine.tabs.accesskey;"
                      id="engine.tabs"
                      checked="true"/>
          </vbox>
        </row>
      </rows>
    </grid>
    </groupbox>

    <groupbox id="mergeOptions">
      <radiogroup id="mergeChoiceRadio" pack="start">
        <grid>
          <columns>
            <column/>
            <column flex="1"/>
          </columns>
          <rows flex="1">
            <row align="center">
              <radio id="resetClient"
                     class="mergeChoiceButton"
                     aria-labelledby="resetClientLabel"/>
              <label id="resetClientLabel" control="resetClient">
                <html:strong>&choice2.merge.recommended.label;</html:strong>
                &choice2a.merge.main.label;
              </label>
            </row>
            <row align="center">
              <radio id="wipeClient"
                     class="mergeChoiceButton"
                     aria-labelledby="wipeClientLabel"/>
              <label id="wipeClientLabel"
                     control="wipeClient">
                &choice2a.client.main.label;
              </label>
            </row>
            <row align="center">
              <radio id="wipeRemote"
                     class="mergeChoiceButton"
                     aria-labelledby="wipeRemoteLabel"/>
              <label id="wipeRemoteLabel"
                     control="wipeRemote">
                &choice2a.server.main.label;
              </label>
            </row>
          </rows>
        </grid>
      </radiogroup>
    </groupbox>
  </wizardpage>

  <wizardpage id="syncOptionsConfirm"
              label="&setup.optionsConfirmPage.title;"
              onpageshow="gSyncSetup.onPageShow()">
      <deck id="chosenActionDeck">
        <vbox id="chosenActionMerge" class="confirm">
          <description class="normal">
            &confirm.merge2.label;
          </description>
        </vbox>
        <vbox id="chosenActionWipeClient" class="confirm">
          <description class="normal">
            &confirm.client3.label;
          </description>
          <separator class="thin"/>
          <vbox id="dataList">
            <label class="data indent" id="bookmarkCount"/>
            <label class="data indent" id="historyCount"/>
            <label class="data indent" id="passwordCount"/>
            <label class="data indent" id="addonCount"/>
            <label class="data indent" id="prefsWipe"
                   value="&engine.prefs.label;"/>
          </vbox>
          <separator class="thin"/>
          <description class="normal">
            &confirm.client2.moreinfo.label;
          </description>
        </vbox>
        <vbox id="chosenActionWipeServer" class="confirm">
          <description class="normal">
            &confirm.server2.label;
          </description>
          <separator class="thin"/>
          <vbox id="clientList">
          </vbox>
        </vbox>
      </deck>
  </wizardpage>
  <!-- In terms of the wizard flow shown to the user, the 'syncOptionsConfirm'
       page above is not the last wizard page. To prevent the wizard binding from
       assuming that it is, we're inserting this dummy page here. This also means
      that the wizard needs to always be closed manually via wizardFinish(). -->
  <wizardpage>
  </wizardpage>
</wizard>