PageRenderTime 11ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/www/dsp/edit-group.dsp

http://github.com/cgay/wiki
Unknown | 83 lines | 79 code | 4 blank | 0 comment | 0 complexity | 8aedcfa5e334fb8a72bd290a23304dcd MD5 | raw file
 1<%dsp:include url="xhtml-start.dsp"/>
 2<%dsp:taglib name="wiki"/>
 3<head>
 4   <title>Dylan Wiki: Group <dsp:get name="group-name"/></title>
 5  <%dsp:include url="meta.dsp"/>
 6</head>
 7<body>
 8  <%dsp:include url="header.dsp"/>
 9  <div id="midsection">
10    <div id="navigation">
11      <wiki:include-page title="Wiki Left Nav"/>
12    </div>
13    <%dsp:include url="group-options-menu.dsp"/>
14    <div id="content">               
15      <h2>Group <dsp:get name="group-name"/></h2>
16
17      <dsp:show-page-errors/>
18      <dsp:show-page-notes/>
19
20      <dsp:if test="exists?" name="active-user">
21
22        <dsp:else>
23          <!-- not logged in -->
24          <p class="hint">
25            You must <a href="<wiki:base/>/register">Register</a> or
26            <a href="<wiki:base/>/login?redirect=<wiki:current/>">login</a>
27            to edit this group.
28          </p>
29        </dsp:else>
30
31        <dsp:then>
32          <!-- logged in -->
33          <dsp:unless test="exists?" name="group-owner">
34            <p class="hint">
35              This group doesn't exist. Enter a comment and click Create to create it.
36            </p>
37          </dsp:unless>
38          <form action="<wiki:base/>/group/edit/<dsp:get name="group-name"/>" method="post">
39            <fieldset>
40              <ol>
41                <li id="name-item">
42                  <label id="name-label" for="name-input">Name: <em title="required">*</em></label>
43                  <input id="name-input" type="text" name="group-name"
44                         <dsp:if-error field-name="group-name" text='class="invalid-input"'/>
45                         value="<dsp:get name='group-name' context='request,page'/>"/>
46                  <dsp:show-field-errors field-name="group-name"/>
47                </li>
48                <li id="owner-item">
49                  <label id="owner-label" for="owner-input">Owner: <em title="required">*</em></label>
50                  <input id="owner-input" type="text" name="group-owner"
51                         <dsp:if-error field-name="group-owner" text='class="invalid-input"'/>
52                         value="<dsp:get name='group-owner' context='request,page'/>"/>
53                  <dsp:show-field-errors field-name="group-owner"/>
54                </li>
55                <li id="description-item">
56                  <label id="description-label" for="description-text">Description: <em title="required">*</em></label>
57                  <textarea id="description-text" name="group-description" rows="3" cols="40"
58                            <dsp:if-error field-name='group-description' text='class="invalid-input"'/>><dsp:get name='group-description' context='request,page'/></textarea>
59                  <dsp:show-field-errors field-name="group-description"/>
60                </li>
61                <li id="comment-item">
62                  <label id="comment-label" for="comment-input">Comment:</label>
63                  <input id="comment-input" type="text" name="comment"
64                         value="<dsp:get name='comment' context='request'/>"/>
65                </li>
66              </ol>
67            </fieldset>
68            <dsp:if test="exists?" name="group-owner">
69              <dsp:then>
70                <input type="submit" value="Save" />
71              </dsp:then>
72              <dsp:else>
73                <input type="submit" value="Create" />
74              </dsp:else>
75            </dsp:if>
76          </form> 
77        </dsp:then>
78      </dsp:if>
79    </div>
80  </div>
81  <%dsp:include url="footer.dsp"/>
82</body>
83</html>