summaryrefslogtreecommitdiffstats
path: root/comm/chat/content/otr-auth.xhtml
blob: 4269db475f5f921b135b75082e98d3bb7da88acb (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
<?xml version="1.0" encoding="UTF-8"?>
<!-- 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/global.css" type="text/css" ?>
<?xml-stylesheet href="chrome://messenger/skin/messenger.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/input-fields.css"?>

<!DOCTYPE html>
<html
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:html="http://www.w3.org/1999/xhtml"
  scrolling="false"
>
  <head>
    <title><!-- auth-title --></title>
    <link rel="localization" href="messenger/otr/auth.ftl" />
    <script
      defer="defer"
      src="chrome://messenger/content/globalOverlay.js"
    ></script>
    <script
      defer="defer"
      src="chrome://global/content/editMenuOverlay.js"
    ></script>
    <script defer="defer" src="chrome://chat/content/otr-auth.js"></script>
  </head>
  <html:body
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  >
    <dialog
      buttons="accept,cancel"
      buttondisabledaccept="true"
      data-l10n-id="otr-auth"
      data-l10n-attrs="buttonlabelaccept"
    >
      <html:fieldset id="how" hidden="hidden">
        <html:legend data-l10n-id="auth-how"></html:legend>
        <vbox>
          <menulist id="howOption" oncommand="otrAuth.how();">
            <menupopup>
              <menuitem
                data-l10n-id="auth-question-and-answer-label"
                value="questionAndAnswer"
              />
              <menuitem
                data-l10n-id="auth-shared-secret-label"
                value="sharedSecret"
              />
              <menuitem
                data-l10n-id="auth-manual-verification-label"
                value="manualVerification"
              />
            </menupopup>
          </menulist>
        </vbox>
      </html:fieldset>

      <html:fieldset id="questionAndAnswer" hidden="hidden">
        <html:legend data-l10n-id="auth-question-and-answer"></html:legend>
        <vbox>
          <description
            style="width: 300px; white-space: pre-wrap"
            data-l10n-id="auth-qa-instruction"
          ></description>
          <label data-l10n-id="auth-question" control="question" flex="1" />
          <html:input
            id="question"
            type="text"
            class="input-inline"
            aria-labelledby="auth-question"
          />
          <label data-l10n-id="auth-answer" control="answer" flex="1" />
          <html:input
            id="answer"
            type="text"
            class="input-inline"
            aria-labelledby="auth-answer"
            oninput="otrAuth.oninput(this)"
          />
        </vbox>
      </html:fieldset>

      <html:fieldset id="sharedSecret" hidden="hidden">
        <html:legend data-l10n-id="auth-shared-secret"></html:legend>
        <vbox>
          <description
            style="width: 300px; white-space: pre-wrap"
            data-l10n-id="auth-secret-instruction"
          ></description>
          <label data-l10n-id="auth-secret" control="secret" flex="1" />
          <html:input
            id="secret"
            type="text"
            class="input-inline"
            aria-labelledby="auth-secret"
            oninput="otrAuth.oninput(this)"
          />
        </vbox>
      </html:fieldset>

      <html:fieldset id="manualVerification" hidden="hidden">
        <html:legend data-l10n-id="auth-manual-verification"></html:legend>
        <vbox>
          <description
            style="width: 300px; white-space: pre-wrap"
            data-l10n-id="auth-manual-instruction"
          ></description>

          <label id="yourFPLabel" />
          <html:input
            id="yourFPValue"
            type="text"
            class="input-inline"
            readonly="readonly"
            aria-labelledby="yourFPLabel"
          />
          <label id="theirFPLabel" />
          <html:input
            id="theirFPValue"
            type="text"
            class="input-inline"
            readonly="readonly"
            aria-labelledby="theirFPLabel"
          />

          <hbox align="center">
            <label data-l10n-id="auth-verified" />
            <menulist id="verifiedOption">
              <menupopup>
                <menuitem data-l10n-id="auth-yes" value="yes" />
                <menuitem data-l10n-id="auth-no" value="no" />
              </menupopup>
            </menulist>
          </hbox>
        </vbox>
      </html:fieldset>

      <html:fieldset id="ask" hidden="hidden">
        <label
          id="receivedQuestionLabel"
          data-l10n-id="auth-question-received"
        />
        <vbox>
          <description
            id="receivedQuestion"
            style="width: 300px; white-space: pre-wrap"
          />
          <label id="responseLabel" control="response" flex="1" />
          <html:input
            id="response"
            type="text"
            class="input-inline"
            aria-labelledby="responseLabel"
            oninput="otrAuth.oninput(this)"
          />
        </vbox>
      </html:fieldset>
    </dialog>
  </html:body>
</html>