~launchpad-pqm/launchpad/devel

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
<tal:root
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  omit-tag="">

<tal:do-this-first tal:content="view/processForm" />
<html
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:tal="http://xml.zope.org/namespaces/tal"
  xmlns:metal="http://xml.zope.org/namespaces/metal"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n"
  metal:use-macro="view/macro:page/main_only"
  i18n:domain="launchpad"
>

<body>
  <metal:block fill-slot="head_epilogue">
    <metal:yui-dependencies
      use-macro="context/@@launchpad_widget_macros/yui2calendar-dependencies" />

    <script type="text/javascript">
      LPS.use('node', 'lp.app.calendar', function(Y) {
          // Ensure that when the picker is used the radio button switches
          // from 'Never' to 'On' and the expiry field is enabled.
          Y.on("available", function(e) {
              var choose_link = Y.one("#expiration-widget a.js-action");
              var radio_on = Y.one("#date");
              var expiration_date = Y.one(
                  document.getElementById('membership.expirationdate'));
              choose_link.on('click', function(e) {
                expiration_date.set('disabled', false);
                radio_on.set('checked', true);
              });
          }, "#expiration-widget a.js-action");
      });
    </script>
  </metal:block>

<metal:macros fill-slot="bogus">
  <metal:macro define-macro="person">
      <a tal:attributes="href context/person/fmt:url"
        tal:content="string: ${context/person/displayname}
                             (${context/person/name})"></a>
  </metal:macro>
  <metal:macro define-macro="error">
    <tr><td colspan="2">
      <p class="error message" tal:condition="view/errormessage"
         tal:content="view/errormessage" />
    </td></tr>
  </metal:macro>
  <metal:macro define-macro="comment">
    <tr>
      <th>Comment:</th>
      <td>
        <textarea cols="40" name="comment"
          tal:content="request/comment|context/last_change_comment|default" />
        <div class="formHelp">This comment will be sent together with the
        notification of this change to all team administrators and this
        member<span tal:condition="view/isActive"><span
        tal:condition="context/required:launchpad.Admin">, unless the 'Silent'
        option is selected</span></span>.</div>
      </td>
    </tr>
  </metal:macro>
  <metal:macro define-macro="expiry-radios">
    <label for="never">
      <input tal:attributes="checked view/neverExpiresIsSelected"
        onclick="
          document.getElementById('membership.expirationdate').disabled=true;"
        type="radio" id="never" value="never" name="expires" />
        Never<br />
    </label>
    <label for="date">
      <input tal:attributes="
        checked view/expiresIsSelected;"
        onclick="document.getElementById('membership.expirationdate').disabled=false;"
        type="radio" id="date" value="date" name="expires" />
      On&nbsp;
    </label>
    <span id="expiration-widget">
      <tal:expiration_widget replace="structure view/expiration_widget" />
    </span>
  </metal:macro>
</metal:macros>

<div metal:fill-slot="main">
      <div tal:condition="view/isActive">
        <p>
          <metal:person use-macro="template/macros/person" />
          is an <em>Active Member</em> of
          <span tal:replace="context/team/displayname" />.
        </p>

        <form action="" method="POST" name="editactive">
          <input type="hidden" name="editactive" value="1" />
          <table>
          <tr>
            <th>Member since:</th>
            <td>
              <span
                tal:attributes="title context/datejoined/fmt:datetime"
                tal:content="context/datejoined/fmt:approximatedate">
                2005-09-13
              </span>
            </td>
          </tr>

          <tr>
            <th>Administrator:</th>
            <td>
              <tal:can-change condition="view/allowChangeAdmin">
                <input tal:attributes="checked view/adminIsSelected"
                       type="radio" value="yes" name="admin" id="admin"/>
                <label for="admin">Yes</label>
                <input tal:attributes="checked view/adminIsNotSelected"
                       type="radio" value="no" name="admin" id="notadmin"/>
                <label for="notadmin">No</label>
              </tal:can-change>
              <tal:cant-change condition="not: view/allowChangeAdmin">
                <span tal:condition="view/isAdmin">Yes</span>
                <span tal:condition="not: view/isAdmin">No</span>
              </tal:cant-change>
            </td>
          </tr>

          <metal:error use-macro="template/macros/error" />

          <tr>
            <th>Subscription expires:</th>
            <td tal:condition="view/canChangeExpirationDate" style="white-space: nowrap">
              <metal:radios use-macro="template/macros/expiry-radios" />
            </td>
            <td tal:condition="not: view/canChangeExpirationDate">
              <span tal:condition="context/dateexpires"
                    tal:attributes="title context/dateexpires/fmt:datetime"
                    tal:content="context/dateexpires/fmt:approximatedate" />
              <span tal:condition="not: context/dateexpires">Never</span>
            </td>
          </tr>

          <metal:comment use-macro="template/macros/comment" />

          <tr tal:condition="context/required:launchpad.Admin">
            <th>Change silently:</th>
            <td>
              <input type="checkbox" value="no" name="silent" id="silent" />
              <div class="formHelp">Do not send notifications to anyone
                regarding this membership change.</div>
            </td>
          </tr>

          <tr>
            <th />
            <td>
              <input type="submit" value="Change" name="change" />
              <input type="submit" value="Deactivate" name="deactivate" />
            </td>
          </tr>
        </table>
        </form>
      </div>

      <div tal:condition="view/isInactive">
        <p tal:condition="view/isExpired">
          <metal:person use-macro="template/macros/person" />
          is an <em>Expired Member</em> of
          <span tal:replace="context/team/displayname" />.
        </p>

        <p tal:condition="view/isDeactivated">
          <metal:person use-macro="template/macros/person" />
          is a <em>Deactivated Member</em> of
          <span tal:replace="context/team/displayname" />.
        </p>

        <form action="" method="POST" name="editinactive">
          <input type="hidden" name="editinactive" value="1" />
          <table>
          <tr>
            <th>Became member:</th>
            <td>
              <span
                tal:attributes="title context/datejoined/fmt:datetime"
                tal:content="context/datejoined/fmt:approximatedate">
                2005-09-13
              </span>
            </td>
          </tr>

          <tal:expired condition="view/isExpired">
            <tr>
              <th>Subscription expired:</th>
              <td>
                <span
                  tal:attributes="title context/dateexpires/fmt:datetime"
                  tal:content="context/dateexpires/fmt:approximatedate">
                  2006-09-13
                </span>
              </td>
            </tr>

            <metal:error use-macro="template/macros/error" />

            <tr>
              <th>Expiration:</th>
              <td>
                <label for="leave">
                  <input
                    checked="checked"
                    type="radio" id="leave" value="leave" name="expires"
                    onclick="
          document.getElementById('membership.expirationdate').disabled=true;"
                    /> Don't change<br />
                </label>
                <metal:radios use-macro="template/macros/expiry-radios" />
              </td>
            </tr>
          </tal:expired>

          <tal:not-expired condition="not: view/isExpired">
            <metal:error use-macro="template/macros/error" />
            <tr><td colspan="2">&nbsp;</td></tr>
            <tr>
              <th>Subscription expires:</th>
              <td>
                <metal:radios use-macro="template/macros/expiry-radios" />
              </td>
            </tr>
          </tal:not-expired>

          <metal:comment use-macro="template/macros/comment" />

          <tr>
            <td colspan="2" align="right">
              <input tal:condition="view/isExpired" type="submit" value="Renew"
                     name="renew" />
              <input tal:condition="view/isDeactivated" type="submit"
                     value="Reactivate" name="reactivate" />
            </td>
          </tr>
        </table>

        </form>
      </div>

      <div tal:condition="view/isProposed">
        <p>
          <metal:person use-macro="template/macros/person" />
          wants to join this team.
          If this is okay, select a membership expiration date if necessary
          before choosing <samp>Approve</samp>.
        </p>

        <form action="" method="POST" name="editproposed">
          <input type="hidden" name="editproposed" value="1" />
          <table>
            <tr>
              <th>Applied:</th>
              <td>
                <span
                  tal:attributes="title context/date_created/fmt:datetime"
                  tal:content="context/date_created/fmt:approximatedate">
                  2005-09-13
                </span>
              </td>
            </tr>

            <metal:error use-macro="template/macros/error" />

            <tr>
              <th>Expires?</th>
              <td>
                <metal:radios use-macro="template/macros/expiry-radios" />
              </td>
            </tr>

            <metal:comment use-macro="template/macros/comment" />

            <tr>
              <th />
              <td>
                <input type="submit" value="Approve" name="approve" />
                <input type="submit" value="Decline" name="decline" />
              </td>
            </tr>
          </table>

        </form>

      </div>

      <div tal:condition="view/isDeclined">
        <p>
          <metal:person use-macro="template/macros/person" />
          asked to join this team, but the request was declined.
        </p>

      </div>

      <div tal:condition="view/isInvited">
        <p id="not-responded">
          <metal:person use-macro="template/macros/person" />
          has been invited to join this team, but hasn't responded to the
          invitation yet.
        </p>
      </div>

      <div tal:condition="view/isInvitationDeclined">
        <p>
          <metal:person use-macro="template/macros/person" />
          has been invited to join this team, but has declined the invitation.
        </p>
      </div>

</div>

</body>
</html>
</tal:root>