Differences From:
File
src/tktconfig.c
part of check-in
[d913179b82]
- Progress toward ticket editing. This is an incremental check-in.
by
drh on
2007-11-24 21:28:03.
[view]
To:
File
src/tktconfig.c
part of check-in
[a5e4e1ba96]
- More work on ticketing. This is a non-working incremental check-in.
by
drh on
2007-11-24 23:59:47.
[view]
@@ -170,9 +170,12 @@
@ #
@ {
@ <!-- load database field names not found in CGI with an empty string -->
@ <!-- start a form -->
-@ [{Open} /status set /submit submit_new_ticket]
+@ [{
+@ {Open} /status set
+@ submit_new_ticket
+@ } /submit exists if]
@ <table cellpadding="5">
@ <tr>
@ <td colspan="2">
@ Enter a one-line summary of the problem:<br>
@@ -243,18 +246,32 @@
@ } /tktnew_template set
@
@ ##########################################################################
@ # The template for the "edit ticket" page
+@ #
+@ # Then generated text is inserted inside a form which feeds back to itself.
+@ # All CGI parameters are loaded into variables. All database files are
+@ # loaded into variables if they have not previously been loaded by
+@ # CGI parameters.
@ {
-@ <!-- database field names not found as CGI parameters are loaded
-@ from the database automatically -->
-@ <!-- start a form -->
-@ [{
-@ <hr><i>%LOGIN% added on %DATE%:</i><br>
-@ } {
-@ <hr><i>%LOGIN% claiming to be %USER% added on %DATE%:</i><br>
-@ } /username /cmappnd /comment append_remark
-@ /submit submit_ticket_change]
+@ [
+@ login /username get /username set
+@ {
+@ {
+@ username login eq /samename set
+@ "samename=" html samename html "<br>" puts
+@ {
+@ "\n<hr><i>" login " added on " date ":</i></br>\n" cmappnd 6 concat
+@ /comment append_field
+@ } samename if
+@ {
+@ "\n<hr><i>" login " claiming to be " username " added on " date
+@ "</i><br>\n" cmappnd 8 concat /comment append_field
+@ } samename not if
+@ } 0 {} /cmappnd get length lt if
+@ submit_ticket
+@ } /submit exists if
+@ ]
@ <table cellpadding="5">
@ <tr><td align="right">Title:</td><td>
@ <input type="text" name="title" value="[title html]" size="60">
@ </td></tr>
@@ -284,32 +301,38 @@
@ <tr><td align="right">Version Found In:</td><td>
@ <input type="text" name="foundin" size="50" value="[foundin html]">
@ </td></tr>
@ <tr><td colspan="2">
-@ [0 /eall 0 get /eall set]
-@ [/aonlybtn exists not /eall set]
-@ [/eallbtn exists /eall set]
-@ [/w hascap eall and /eall set]
+@
+@ [
+@ 0 /eall get /eall set # eall means "edit all". default==no
+@ /aonlybtn exists not /eall set # Edit all if no aonlybtn CGI param
+@ /eallbtn exists /eall set # Edit all if eallbtn CGI param
+@ /w hascap eall and /eall set # WrTkt permission needed to edit all
+@ ]
+@
@ [eall enable_output]
@ Description And Comments:<br>
@ <textarea name="comment" cols="80"
@ rows="[{} /comment get linecount 15 max 10 min html]"
@ wrap="virtual" class="wikiedit">[comment html]</textarea><br>
@ <input type="hidden" name="eall" value="1">
@ <input type="submit" name="aonlybtn" value="Append Remark">
+@
@ [eall not enable_output]
-@ Append Remark:<br>
+@ Append Remark from
+@ <input type="text" name="username" value="[username html]" size="30">:<br>
@ <textarea name="cmappnd" cols="80" rows="15"
@ wrap="virtual" class="wikiedit">[{} /cmappnd get html]</textarea><br>
@ [/w hascap eall not and enable_output]
@ <input type="submit" name="eallbtn" value="Edit All">
+@
@ [1 enable_output]
@ </td></tr>
@ <tr><td align="right"></td><td>
@ <input type="submit" name="submit" value="Submit Changes">
@ </td></tr>
@ </table>
-@ <!-- end-form inserted automatically -->
@ } /tktedit_template set
@
@ ##########################################################################
@ # The template for the "view ticket" page