summaryrefslogtreecommitdiffstats
path: root/comm/calendar/base/content/dialogs/calendar-creation.xhtml
blob: 7ae66d3af9f2d86283a757088155a8827b26b24d (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
<?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 type="text/css" href="chrome://messenger/skin/messenger.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/input-fields.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/colors.css"?>
<?xml-stylesheet type="text/css" href="chrome://messenger/skin/themeableDialog.css"?>
<?xml-stylesheet type="text/css" href="chrome://calendar/skin/shared/calendar-creation.css"?>

<!-- TODO: messenger.dtd is used for the "Next" button; some relocation is needed. -->
<!DOCTYPE html [ <!ENTITY % dtd1 SYSTEM "chrome://calendar/locale/calendarCreation.dtd"> %dtd1;
<!ENTITY % dtd2 SYSTEM "chrome://calendar/locale/calendar.dtd" >
%dtd2;
<!ENTITY % dtd3 SYSTEM "chrome://lightning/locale/lightning.dtd" >
%dtd3;
<!ENTITY % dtd4 SYSTEM "chrome://messenger/locale/messenger.dtd" >
%dtd4; ]>
<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"
  icon="calendar-general-dialog"
  lightweightthemes="true"
  style="min-width: 500px; min-height: 380px"
  scrolling="false"
>
  <head>
    <title>&wizard.title;</title>
    <link rel="localization" href="toolkit/global/wizard.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://messenger/content/dialogShadowDom.js"></script>
    <script defer="defer" src="chrome://calendar/content/calendar-ui-utils.js"></script>
    <script defer="defer" src="chrome://calendar/content/calendar-identity-utils.js"></script>
    <script defer="defer" src="chrome://calendar/content/calendar-creation.js"></script>
  </head>
  <html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <dialog
      id="calendar-creation-dialog"
      style="width: 100vw; height: 100vh"
      buttons="accept,cancel"
    >
      <!-- Panel: Select Calendar Type -->
      <vbox
        id="panel-select-calendar-type"
        buttonlabelaccept="&nextButton.label;"
        buttonaccesskeyaccept=""
      >
        <description>&initialpage.description;</description>
        <hbox class="indent">
          <radiogroup id="calendar-type">
            <radio value="local" label="&initialpage.computer.label;" selected="true" />
            <radio value="network" label="&initialpage.network.label;" />
          </radiogroup>
        </hbox>
      </vbox>

      <!-- Panel: Local Calendar Settings -->
      <vbox
        id="panel-local-calendar-settings"
        buttonlabelaccept="&buttons.create.label;"
        buttonaccesskeyaccept="&buttons.create.accesskey;"
        buttonlabelextra2="&buttons.back.label;"
        buttonaccesskeyextra2="&buttons.back.accesskey;"
        hidden="true"
      >
        <vbox id="no-identity-notification" class="notification-inline">
          <!-- notificationbox will be added here lazily. -->
        </vbox>
        <html:form>
          <html:table>
            <html:tr>
              <html:th>
                <label
                  value="&calendar.server.dialog.name.label;"
                  control="local-calendar-name-input"
                />
              </html:th>
              <html:td>
                <html:input
                  id="local-calendar-name-input"
                  class="calendar-creation-text-input"
                  flex="1"
                  required="required"
                  oninput="checkRequired()"
                />
              </html:td>
            </html:tr>
            <html:tr>
              <html:th>
                <label
                  value="&calendarproperties.color.label;"
                  control="local-calendar-color-picker"
                />
              </html:th>
              <html:td>
                <html:input
                  id="local-calendar-color-picker"
                  class="small-margin"
                  type="color"
                  value="#A8C2E1"
                />
              </html:td>
            </html:tr>
            <html:tr>
              <html:th> </html:th>
              <html:td>
                <checkbox
                  id="local-fire-alarms-checkbox"
                  label="&calendarproperties.firealarms.label;"
                  checked="true"
                />
              </html:td>
            </html:tr>
            <html:tr id="calendar-email-identity-row">
              <html:th>
                <label
                  value="&lightning.calendarproperties.email.label;"
                  control="email-identity-menulist"
                />
              </html:th>
              <html:td>
                <menulist id="email-identity-menulist" oncommand="onChangeIdentity(event)">
                  <menupopup id="email-identity-menupopup" />
                </menulist>
              </html:td>
            </html:tr>
          </html:table>
        </html:form>
      </vbox>

      <!-- Panel: Network Calendar Settings -->
      <html:table
        id="panel-network-calendar-settings"
        flex="1"
        buttonlabelaccept="&buttons.find.label;"
        buttonaccesskeyaccept="&buttons.find.accesskey;"
        buttonlabelextra2="&buttons.back.label;"
        buttonaccesskeyextra2="&buttons.back.accesskey;"
        hidden="true"
      >
        <html:tr id="network-username-row">
          <html:th>
            <label value="&locationpage.username.label;" control="network-username-input" />
          </html:th>
          <html:td>
            <html:input
              id="network-username-input"
              class="calendar-creation-text-input"
              flex="1"
              oninput="fillLocationPlaceholder(); checkRequired()"
            />
          </html:td>
        </html:tr>
        <html:tr id="network-location-row">
          <html:th>
            <label value="&location.label;" control="network-location-input" />
          </html:th>
          <html:td>
            <html:input
              id="network-location-input"
              class="calendar-creation-text-input"
              flex="1"
              oninput="checkRequired()"
              placeholder="&location.placeholder;"
              default-placeholder="&location.placeholder;"
            />
          </html:td>
        </html:tr>
        <html:tr id="network-nocredentials-row">
          <html:th> </html:th>
          <html:td>
            <checkbox
              id="network-nocredentials-checkbox"
              label="&network.nocredentials.label;"
              oncommand="updateNoCredentials(this.checked)"
            />
          </html:td>
        </html:tr>
        <html:tr id="network-cache-row">
          <html:th> </html:th>
          <html:td>
            <checkbox
              id="network-cache-checkbox"
              label="&calendarproperties.cache3.label;"
              checked="true"
            />
          </html:td>
        </html:tr>
        <html:tr class="network-status-row" status="none">
          <html:th>
            <html:img
              class="network-status-image"
              src="chrome://global/skin/icons/loading.png"
              srcset="chrome://global/skin/icons/loading@2x.png 2x"
              alt=""
            />
          </html:th>
          <html:td>
            <description class="status-label network-loading-label"
              >&network.loading.description;</description
            >
            <description class="status-label network-notfound-label"
              >&network.notfound.description;</description
            >
            <description class="status-label network-authfail-label"
              >&network.authfail.description;</description
            >
          </html:td>
        </html:tr>
      </html:table>

      <!-- Panel: Select Calendars -->
      <vbox
        id="panel-select-calendars"
        flex="1"
        buttonlabelaccept="&buttons.subscribe.label;"
        buttonaccesskeyaccept="&buttons.subscribe.accesskey;"
        buttonlabelextra2="&buttons.back.label;"
        buttonaccesskeyextra2="&buttons.back.accesskey;"
        hidden="true"
      >
        <description id="network-selectcalendar-description-single"
          >&network.subscribe.single.description;</description
        >
        <description id="network-selectcalendar-description-multiple" hidden="true"
          >&network.subscribe.multiple.description;</description
        >
        <hbox id="network-selectcalendar-providertype-box" align="center" hidden="true">
          <label id="network-selectcalendar-providertype-label" value="&calendartype.label;" />
          <menulist
            id="network-selectcalendar-providertype-menulist"
            flex="1"
            onselect="selectProvider(this.selectedItem.value)"
          >
            <menupopup id="network-selectcalendar-providertype-menupopup" />
          </menulist>
        </hbox>
        <richlistbox
          id="network-calendar-list"
          propertiesbuttonlabel="&calendar.context.properties.label;"
        />
      </vbox>

      <!-- Panel: Add-on Calendar Settings -->
      <!-- Populated dynamically by add-ons that need UI for a particular calendar type. -->
      <vbox
        id="panel-addon-calendar-settings"
        buttonlabelaccept="&buttons.create.label;"
        buttonaccesskeyaccept="&buttons.create.accesskey;"
        buttonlabelextra2="&buttons.back.label;"
        buttonaccesskeyextra2="&buttons.back.accesskey;"
        hidden="true"
      />
    </dialog>
  </html:body>
</html>