Edgewall Software

source: tags/trac-0.9.6/templates/newticket.cs

Last change on this file was 2409, checked in by Christopher Lenz, 18 years ago
  • Reenable the use of the htdocs_location for specifying the URL of the main static resources (source:trunk/trac/htdocs). This should make it easier to deploy the Trac CGI on web servers that don't provide the configurability of Apache. Also, it enables a group of Trac projects to use the same URL namespace for the resouces, thereby improving the cacheability of those resources by the user agent.
  • Remove the diff/tab_width option from the default config. This setting is deprecated in favor of mimeview/tab_width.
  • Property svn:eol-style set to native
File size: 4.7 KB
Line 
1<?cs include:"header.cs" ?>
2<?cs include:"macros.cs" ?>
3<script type="text/javascript">
4addEvent(window, 'load', function() { document.getElementById('summary').focus()});
5</script>
6
7<div id="ctxtnav" class="nav"></div>
8
9<div id="content" class="ticket">
10<h1>Create New Ticket</h1>
11<?cs include:"site_newticket.cs" ?>
12<form id="newticket" method="post" action="<?cs
13 var:trac.href.newticket ?>#preview">
14 <div class="field">
15 <label for="reporter">Your email or username:</label><br />
16 <input type="text" id="reporter" name="reporter" size="40" value="<?cs
17 var:newticket.reporter ?>" /><br />
18 </div>
19 <div class="field">
20 <label for="summary">Short summary:</label><br />
21 <input id="summary" type="text" name="summary" size="80" value="<?cs
22 var:newticket.summary ?>"/>
23 </div><?cs
24 if:len(newticket.fields.type.options) ?>
25 <div class="field"><label for="type">Type:</label> <?cs
26 call:hdf_select(newticket.fields.type.options, 'type',
27 newticket.type, 0) ?>
28 </div><?cs
29 /if ?>
30 <div class="field">
31 <label for="description">Full description (you may use <a tabindex="42" href="<?cs
32 var:$trac.href.wiki ?>/WikiFormatting">WikiFormatting</a> here):</label><br />
33 <textarea id="description" name="description" class="wikitext" rows="10" cols="78"><?cs
34 var:newticket.description ?></textarea><?cs
35 if:newticket.description_preview ?>
36 <fieldset id="preview">
37 <legend>Description Preview</legend>
38 <?cs var:newticket.description_preview ?>
39 </fieldset><?cs
40 /if ?>
41 </div>
42
43 <fieldset id="properties">
44 <legend>Ticket Properties</legend>
45 <input type="hidden" name="action" value="create" />
46 <input type="hidden" name="status" value="new" />
47 <table><tr><?cs set:num_fields = 0 ?><?cs
48 each:field = newticket.fields ?><?cs
49 if:!field.skip ?><?cs
50 set:num_fields = num_fields + 1 ?><?cs
51 /if ?><?cs
52 /each ?><?cs set:idx = 0 ?><?cs
53 each:field = newticket.fields ?><?cs
54 if:!field.skip ?><?cs set:fullrow = field.type == 'textarea' ?><?cs
55 if:fullrow && idx % 2 ?><?cs set:idx = idx + 1 ?><th class="col2"></th><td></td></tr><tr><?cs /if ?>
56 <th class="col<?cs var:idx % 2 + 1 ?>"><?cs
57 if:field.type != 'radio' ?><label for="<?cs var:name(field) ?>"><?cs
58 /if ?><?cs alt:field.label ?><?cs var:field.name ?><?cs /alt ?>:<?cs
59 if:field.type != 'radio' ?></label><?cs /if ?></th>
60 <td<?cs if:fullrow ?> colspan="3"<?cs /if ?>><?cs
61 if:field.type == 'text' ?><input type="text" id="<?cs
62 var:name(field) ?>" name="<?cs
63 var:name(field) ?>" value="<?cs var:newticket[name(field)] ?>" /><?cs
64 elif:field.type == 'select' ?><select id="<?cs
65 var:name(field) ?>" name="<?cs var:name(field) ?>"><?cs
66 if:field.optional ?><option></option><?cs /if ?><?cs
67 each:option = field.options ?><option<?cs
68 if:option == newticket[name(field)] ?> selected="selected"<?cs /if ?>><?cs
69 var:option ?></option><?cs
70 /each ?></select><?cs
71 elif:field.type == 'checkbox' ?><input type="hidden" name="checkbox_<?cs
72 var:name(field) ?>" /><input type="checkbox" id="<?cs
73 var:name(field) ?>" name="<?cs
74 var:name(field) ?>" value="1"<?cs
75 if:newticket[name(field)] ?> checked="checked"<?cs /if ?> /><?cs
76 elif:field.type == 'textarea' ?><textarea id="<?cs
77 var:name(field) ?>" name="<?cs
78 var:name(field) ?>"<?cs
79 if:field.height ?> rows="<?cs var:field.height ?>"<?cs /if ?><?cs
80 if:field.width ?> cols="<?cs var:field.width ?>"<?cs /if ?>><?cs
81 var:newticket[name(field)] ?></textarea><?cs
82 elif:field.type == 'radio' ?><?cs set:optidx = 0 ?><?cs
83 each:option = field.options ?><label><input type="radio" id="<?cs
84 var:name(field) ?>" name="<?cs
85 var:name(field) ?>" value="<?cs var:option ?>"<?cs
86 if:ticket[name(field)] == option ?> checked="checked"<?cs /if ?> /> <?cs
87 var:option ?></label> <?cs set:optidx = optidx + 1 ?><?cs
88 /each ?><?cs
89 /if ?></td><?cs
90 if:idx % 2 || fullrow ?><?cs
91 if:idx < num_fields - 1 ?></tr><tr><?cs
92 /if ?><?cs
93 elif:idx == num_fields - 1 ?><th class="col2"></th><td></td><?cs
94 /if ?><?cs set:idx = idx + #fullrow + 1 ?><?cs
95 /if ?><?cs
96 /each ?></tr>
97 </table>
98 </fieldset>
99
100 <script type="text/javascript" src="<?cs
101 var:htdocs_location ?>js/wikitoolbar.js"></script>
102
103 <div class="buttons">
104 <input type="submit" name="preview" value="Preview" accesskey="r" />&nbsp;
105 <input type="submit" value="Submit ticket" />
106 </div>
107</form>
108
109<div id="help">
110 <strong>Note:</strong> See <a href="<?cs
111 var:trac.href.wiki ?>/TracTickets">TracTickets</a> for help on using tickets.
112</div>
113</div>
114
115<?cs include "footer.cs" ?>
Note: See TracBrowser for help on using the repository browser.