summaryrefslogtreecommitdiff
path: root/mailnews/base/prefs/content/accountcreation/emailWizard.xul
blob: 261545671e9b9ecca8c55526e29342374e130068 (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
491
492
493
494
495
496
497
<?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://messenger/skin/accountCreation.css"
                                              type="text/css"?>

<!DOCTYPE window [
  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
  %brandDTD;
  <!ENTITY % acDTD SYSTEM "chrome://messenger/locale/accountCreation.dtd">
  %acDTD;
]>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        id="autoconfigWizard"
        windowtype="mail:autoconfig"
        title="&autoconfigWizard.title;"
        onload="gEmailConfigWizard.onLoad();"
        onkeypress="gEmailConfigWizard.onKeyDown(event);"
        onclose="gEmailConfigWizard.onWizardShutdown();"
        onunload="gEmailConfigWizard.onWizardShutdown();"
        >

  <stringbundleset>
    <stringbundle id="bundle_brand"
          src="chrome://branding/locale/brand.properties"/>
    <stringbundle id="strings"
          src="chrome://messenger/locale/accountCreation.properties"/>
    <stringbundle id="utilstrings"
          src="chrome://messenger/locale/accountCreationUtil.properties"/>
    <stringbundle id="bundle_messenger"
          src="chrome://messenger/locale/messenger.properties"/>
  </stringbundleset>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/util.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/accountConfig.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/emailWizard.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/sanitizeDatatypes.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/fetchhttp.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/readFromXML.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/guessConfig.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/verifyConfig.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/fetchConfig.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/createInBackend.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountcreation/MyBadCertHandler.js"/>
  <script type="application/javascript"
          src="chrome://messenger/content/accountUtils.js" />

  <keyset id="mailKeys">
    <key keycode="VK_ESCAPE" oncommand="window.close();"/>
  </keyset>

  <panel id="insecureserver-cleartext-panel" class="popup-panel">
    <hbox>
      <image class="insecureLarry"/>
      <vbox flex="1">
        <description class="title">&insecureServer.tooltip.title;</description>
        <description class="details">
                                &insecureUnencrypted.description;</description>
      </vbox>
    </hbox>
  </panel>
  <panel id="insecureserver-selfsigned-panel" class="popup-panel">
    <hbox>
      <image class="insecureLarry"/>
      <vbox flex="1">
        <description class="title">&insecureServer.tooltip.title;</description>
        <description class="details">
                                 &insecureSelfSigned.description;</description>
      </vbox>
    </hbox>
  </panel>
  <panel id="secureserver-panel" class="popup-panel">
    <hbox>
      <image class="secureLarry"/>
      <vbox flex="1">
        <description class="title">&secureServer.description;</description>
      </vbox>
    </hbox>
  </panel>

  <tooltip id="insecureserver-cleartext">
    <hbox>
      <image class="insecureLarry"/>
      <vbox>
        <description class="title">&insecureServer.tooltip.title;</description>
        <description class="details">
                                 &insecureServer.tooltip.details;</description>
      </vbox>
    </hbox>
  </tooltip>
  <tooltip id="insecureserver-selfsigned">
    <hbox>
      <image class="insecureLarry"/>
      <vbox>
        <description class="title">&insecureServer.tooltip.title;</description>
        <description class="details">
                                 &insecureServer.tooltip.details;</description>
      </vbox>
    </hbox>
  </tooltip>
  <tooltip id="secureservertooltip">
    <hbox>
      <image class="secureLarry"/>
      <description class="title">&secureServer.description;</description>
    </hbox>
  </tooltip>
  <tooltip id="optional-password">
    <description>&password.text;</description>
  </tooltip>

  <spacer id="fullwidth"/>

  <vbox id="mastervbox" class="mastervbox" flex="1">
    <grid id="initialSettings">
      <columns>
        <column/>
        <column/>
        <column/>
      </columns>
      <rows>
        <row align="center">
          <label accesskey="&name.accesskey;"
                 class="autoconfigLabel"
                 value="&name.label;"
                 control="realname"/>
          <textbox id="realname"
                   class="padded"
                   placeholder="&name.placeholder;"
                   oninput="gEmailConfigWizard.onInputRealname();"
                   onblur="gEmailConfigWizard.onBlurRealname();"/>
          <hbox>
            <description id="nametext" class="initialDesc">&name.text;</description>
            <image id="nameerroricon"
                   hidden="true"
                   class="warningicon"/>
            <description id="nameerror" class="errordescription" hidden="true"/>
          </hbox>
        </row>
        <row align="center">
          <label accesskey="&email.accesskey;"
                 class="autoconfigLabel"
                 value="&email.label;"
                 control="email"/>
          <textbox id="email"
                   class="padded uri-element"
                   placeholder="&email.placeholder;"
                   oninput="gEmailConfigWizard.onInputEmail();"
                   onblur="gEmailConfigWizard.onBlurEmail();"/>
          <hbox>
            <image id="emailerroricon"
                   hidden="true"
                   class="warningicon"/>
            <description id="emailerror" class="errordescription" hidden="true"/>
          </hbox>
        </row>
        <row align="center">
          <!-- this starts out as text so the emptytext shows, but then
               changes to type=password once it's not empty -->
          <label accesskey="&password.accesskey;"
                 class="autoconfigLabel"
                 value="&password.label;"
                 control="password"
                 tooltip="optional-password"/>
          <textbox id="password"
                   class="padded"
                   placeholder="&password.placeholder;"
                   type="text"
                   oninput="gEmailConfigWizard.onInputPassword();"
                   onfocus="gEmailConfigWizard.onFocusPassword();"
                   onblur="gEmailConfigWizard.onBlurPassword();"/>
          <hbox>
            <image id="passworderroricon"
                   hidden="true"
                   class="warningicon"/>
            <description id="passworderror" class="errordescription" hidden="true"/>
          </hbox>
        </row>
        <row align="center" pack="start">
          <label class="autoconfigLabel"/>
          <checkbox id="remember_password"
                    label="&rememberPassword.label;"
                    accesskey="&rememberPassword.accesskey;"
                    checked="true"/>
        </row>
      </rows>
    </grid>
    <spacer flex="1" />

     <hbox id="status_area" flex="1">
      <vbox id="status_img_before" pack="start"/>
      <description id="status_msg">&#160;</description>
              <!-- Include 160 = nbsp, to make the element occupy the
                   full height, for at least one line. With a normal space,
                   it does not have sufficient height. -->
      <vbox id="status_img_after" pack="start"/>
    </hbox>

    <groupbox id="result_area" hidden="true">
      <radiogroup id="result_imappop" orient="horizontal">
        <radio id="result_select_imap" label="&imapLong.label;" value="1"
               oncommand="gEmailConfigWizard.onResultIMAPOrPOP3();"/>
        <radio id="result_select_pop3" label="&pop3Long.label;" value="2"
               oncommand="gEmailConfigWizard.onResultIMAPOrPOP3();"/>
      </radiogroup>
      <grid>
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row align="center">
            <label class="textbox-label" value="&incoming.label;"
                   control="result-incoming"/>
            <textbox id="result-incoming" disabled="true" flex="1"/>
          </row>
          <row align="center">
            <label class="textbox-label" value="&outgoing.label;"
                   control="result-outgoing"/>
            <textbox id="result-outgoing" disabled="true" flex="1"/>
          </row>
          <row align="center">
            <label class="textbox-label" value="&username.label;"
                   control="result-username"/>
            <textbox id="result-username" disabled="true" flex="1"/>
          </row>
        </rows>
      </grid>
    </groupbox>

    <groupbox id="manual-edit_area" hidden="true">
      <grid>
        <columns>
          <column/><!-- row label, e.g. "incoming" -->
          <column/><!-- protocol, e.g. "IMAP" -->
          <column flex="1"/><!-- hostname / username -->
          <column/><!-- port -->
          <column/><!-- SSL -->
          <column/><!-- auth method -->
        </columns>
        <rows>
          <row id="labels_row" align="center">
            <spacer/>
            <spacer/>
            <label value="&hostname.label;" class="columnHeader"/>
            <label value="&port.label;" class="columnHeader"/>
            <label value="&ssl.label;" class="columnHeader"/>
            <label value="&auth.label;" class="columnHeader"/>
          </row>
          <row id="incoming_server_area">
            <hbox align="center" pack="end">
              <label class="textbox-label"
                     value="&incoming.label;"
                     control="incoming_hostname"/>
            </hbox>
            <menulist id="incoming_protocol"
                      oncommand="gEmailConfigWizard.onChangedProtocolIncoming();"
                      sizetopopup="always">
              <menupopup>
                <menuitem label="&imap.label;" value="1"/>
                <menuitem label="&pop3.label;" value="2"/>
              </menupopup>
            </menulist>
            <textbox id="incoming_hostname"
                     oninput="gEmailConfigWizard.onInputHostname();"
                     class="host uri-element"/>
            <menulist id="incoming_port"
                      editable="true"
                      oninput="gEmailConfigWizard.onChangedPortIncoming();"
                      oncommand="gEmailConfigWizard.onChangedPortIncoming();"
                      class="port">
              <menupopup/>
            </menulist>
            <menulist id="incoming_ssl"
                      class="security"
                      oncommand="gEmailConfigWizard.onChangedSSLIncoming();"
                      sizetopopup="always">
              <menupopup>
                <!-- values defined in nsMsgSocketType -->
                <menuitem label="&autodetect.label;" value="0"/>
                <menuitem label="&noEncryption.label;" value="1"/>
                <menuitem label="&starttls.label;" value="3"/>
                <menuitem label="&sslTls.label;" value="2"/>
              </menupopup>
            </menulist>
            <menulist id="incoming_authMethod"
                      class="auth"
                      oncommand="gEmailConfigWizard.onChangedInAuth();"
                      sizetopopup="always">
              <menupopup>
                <menuitem label="&autodetect.label;" value="0"/>
                <!-- values defined in nsMsgAuthMethod -->
                <!-- labels set from messenger.properties
                     to avoid duplication -->
                <menuitem id="in-authMethod-password-cleartext" value="3"/>
                <menuitem id="in-authMethod-password-encrypted" value="4"/>
                <menuitem id="in-authMethod-kerberos" value="5"/>
                <menuitem id="in-authMethod-ntlm" value="6"/>
#ifdef MOZ_MAILNEWS_OAUTH2
                <menuitem id="in-authMethod-oauth2" value="10" hidden="true"/>
#endif
              </menupopup>
            </menulist>
          </row>
          <row id="outgoing_server_area" align="center">
            <label class="textbox-label"
                   value="&outgoing.label;"
                   control="outgoing_hostname"/>
            <label id="outgoing_protocol"
                   value="&smtp.label;"/>
            <menulist id="outgoing_hostname"
                editable="true"
                sizetopopup="none"
                oninput="gEmailConfigWizard.onInputHostname();"
                oncommand="gEmailConfigWizard.onChangedOutgoingDropdown();"
                onpopupshowing="gEmailConfigWizard.onOpenOutgoingDropdown();"
                class="host uri-element">
              <menupopup id="outgoing_hostname_popup"/>
            </menulist>
            <menulist id="outgoing_port"
                      editable="true"
                      oninput="gEmailConfigWizard.onChangedPortOutgoing();"
                      oncommand="gEmailConfigWizard.onChangedPortOutgoing();"
                      class="port">
              <menupopup/>
            </menulist>
            <menulist id="outgoing_ssl"
                      class="security"
                      oncommand="gEmailConfigWizard.onChangedSSLOutgoing();"
                      sizetopopup="always">
              <menupopup>
                <!-- @see incoming -->
                <menuitem label="&autodetect.label;" value="0"/>
                <menuitem label="&noEncryption.label;" value="1"/>
                <menuitem label="&starttls.label;" value="3"/>
                <menuitem label="&sslTls.label;" value="2"/>
              </menupopup>
            </menulist>
            <menulist id="outgoing_authMethod"
                      class="auth"
                      oncommand="gEmailConfigWizard.onChangedOutAuth(this.selectedItem);"
                      sizetopopup="always">
              <menupopup>
                <menuitem label="&autodetect.label;" value="0"/>
                <!-- @see incoming -->
                <menuitem id="out-authMethod-no" value="1"/>
                <menuitem id="out-authMethod-password-cleartext" value="3"/>
                <menuitem id="out-authMethod-password-encrypted" value="4"/>
                <menuitem id="out-authMethod-kerberos" value="5"/>
                <menuitem id="out-authMethod-ntlm" value="6"/>
#ifdef MOZ_MAILNEWS_OAUTH2
                <menuitem id="out-authMethod-oauth2" value="10" hidden="true"/>
#endif
              </menupopup>
            </menulist>
          </row>
          <row id="username_area" align="center">
            <label class="textbox-label"
                   value="&username.label;"/>
            <label class="columnHeader"
                   value="&incoming.label;"
                   control="incoming_username"/>
            <textbox id="incoming_username"
                     oninput="gEmailConfigWizard.onInputInUsername();"
                     class="username"/>
            <spacer/>
            <label class="columnHeader"
                   id="outgoing_label"
                   value="&outgoing.label;"
                   control="outgoing_username"/>
            <textbox id="outgoing_username"
                     oninput="gEmailConfigWizard.onInputOutUsername();"
                     class="username"/>
          </row>
        </rows>
      </grid>
    </groupbox>

    <spacer flex="1" />
    <hbox id="buttons_area">
      <hbox id="left_buttons_area" align="center" pack="start">
        <button id="provisioner_button"
                label="&switch-to-provisioner.label;"
                accesskey="&switch-to-provisioner.accesskey;"
                class="larger-button"
                oncommand="gEmailConfigWizard.onSwitchToProvisioner();"/>
        <button id="manual-edit_button"
                label="&manual-edit.label;"
                accesskey="&manual-edit.accesskey;"
                hidden="true"
                oncommand="gEmailConfigWizard.onManualEdit();"/>
        <button id="advanced-setup_button"
                label="&advancedSetup.label;"
                accesskey="&advancedSetup.accesskey;"
                disabled="true"
                hidden="true"
                oncommand="gEmailConfigWizard.onAdvancedSetup();"/>
      </hbox>
      <spacer flex="1"/>
      <hbox id="right_buttons_area" align="center" pack="end">
        <button id="stop_button"
                label="&stop.label;"
                accesskey="&stop.accesskey;"
                hidden="true"
                oncommand="gEmailConfigWizard.onStop();"/>
        <button id="cancel_button"
                label="&cancel.label;"
                accesskey="&cancel.accesskey;"
                oncommand="gEmailConfigWizard.onCancel();"/>
        <button id="half-manual-test_button"
                label="&half-manual-test.label;"
                accesskey="&half-manual-test.accesskey;"
                hidden="true"
                oncommand="gEmailConfigWizard.onHalfManualTest();"/>
        <button id="next_button"
                label="&continue.label;"
                accesskey="&continue.accesskey;"
                hidden="false"
                oncommand="gEmailConfigWizard.onNext();"/>
        <button id="create_button"
                label="&doneAccount.label;"
                accesskey="&doneAccount.accesskey;"
                class="important-button"
                hidden="true"
                oncommand="gEmailConfigWizard.onCreate();"/>
      </hbox>
    </hbox>
  </vbox>


  <vbox id="warningbox" hidden="true" flex="1">
    <hbox class="warning" flex="1">
      <vbox class="larrybox">
        <image id="insecure_larry" class="insecureLarry"/>
      </vbox>
      <vbox flex="1" class="warning_text">
        <label class="warning-heading">&warning.label;</label>
        <vbox id="incoming_box">
          <hbox>
            <label class="warning_settings" value="&incomingSettings.label;"/>
            <description id="warning_incoming"/>
          </hbox>
          <label id="incoming_technical"
                 class="technical_details"
                 value="&technicaldetails.label;"
                 onclick="gSecurityWarningDialog.toggleDetails('incoming');"/>
          <description id="incoming_details" collapsed="true"/>
        </vbox>
        <vbox id="outgoing_box">
          <hbox>
            <label class="warning_settings" value="&outgoingSettings.label;"/>
            <description id="warning_outgoing"/>
          </hbox>
          <label id="outgoing_technical"
                 class="technical_details"
                 value="&technicaldetails.label;"
                 onclick="gSecurityWarningDialog.toggleDetails('outgoing');"/>
          <description id="outgoing_details" collapsed="true"/>
        </vbox>
        <spacer flex="10"/>
        <description id="findoutmore">
            &contactYourProvider.description;</description>
        <spacer flex="100"/>
        <checkbox id="acknowledge_warning"
                  label="&confirmWarning.label;"
                  accesskey="&confirmWarning.accesskey;"
                  class="acknowledge_checkbox"
                  oncommand="gSecurityWarningDialog.toggleAcknowledge()"/>
        <hbox>
          <button id="getmeoutofhere"
                  label="&changeSettings.label;"
                  accesskey="&changeSettings.accesskey;"
                  oncommand="gSecurityWarningDialog.onCancel()"/>
          <spacer flex="1"/>
          <button id="iknow"
                  label="&doneAccount.label;"
                  accesskey="&doneAccount.accesskey;"
                  disabled="true"
                  oncommand="gSecurityWarningDialog.onOK()"/>
        </hbox>
      </vbox>
    </hbox>
  </vbox>
</window>