File: displayForm%3Bsubmit%3Bdefault

package info (click to toggle)
slash 2.2.6-8etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 3,672 kB
  • ctags: 1,915
  • sloc: perl: 23,113; sql: 1,878; sh: 433; makefile: 233
file content (105 lines) | stat: -rw-r--r-- 3,343 bytes parent folder | download | duplicates (3)
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
__section__
default
__description__
Display submission form

* fixedstory = submission for preview
* savestory = boolean for OK to print "Submit" button
* username = user's name
* fakeemail = user's mail/URL
* section = submission section name
* topic = submission topic hashref
* width = passed to titlebar
* title = passed to titlebar
__title__

__page__
submit
__lang__
en_US
__name__
displayForm
__template__
[% USE Slash;
	IF fakeemail && username;
		subtext = "<A HREF=\"$fakeemail\">$username</A> writes <i>\"$fixedstory\"</i>";
	ELSIF username;
		subtext = "$username writes <i>\"$fixedstory\"</i>";
	ELSE;
		subtext = fixedstory;
	END;
%]

[% PROCESS titlebar title = "$constants.sitename Story Submissions" %]

[% IF constants.submiss_view %]
<P><B>
	<A HREF="[% env.script_name %]?op=list">View Current Pending Submissions</A>
</B></P>
[% END %]

<FORM ACTION="[% env.script_name %]" METHOD="POST">
[% IF form.formkey %]
<INPUT TYPE="hidden" NAME="formkey" VALUE="[% form.formkey %]">
[% END %]

<P>Here is where you can submit a story for the [% constants.sitename %]
Editors to peer at it, poke it with a stick, and perhaps 
post it for all to share and enjoy.  It is <B>very</B>
important that you write a clear simple subject, and 
include relevant links in your story.  If you wish to be 
anonymous, feel free to leave the identifying fields 
blank.  Anonymity has no effect on whether we will accept or 
reject the story.</P>

[%# username is the only of from, email, subj that needs to be filtered in %]
[%# the tag attribute; the others already have been in submit.pl.          %]
[% PROCESS formLabel value => "Your Name", comment => "Leave Blank to be Anonymous" %]
<INPUT TYPE="text" NAME="name" VALUE="[% username | strip_attribute %]" SIZE="50">

[% PROCESS formLabel value => "Your Email or Homepage", comment => "Where Users Can Contact You" %]
<INPUT TYPE="text" NAME="email" VALUE="[% fakeemail %]" SIZE="50">

[% PROCESS formLabel value => "Subject", comment => "Be Descriptive, Clear and Simple!" %]
<INPUT TYPE="text" NAME="subj" VALUE="[% form.subj %]" SIZE="50">

<BR><FONT SIZE="2">
(bad subjects='Check This Out!' or 'An Article'.
We get many submissions each day, and if yours isn't clear, it will
be deleted.)</FONT>

[% PROCESS formLabel value => "Topic and Section", comment => "" %]

[% tid = form.tid || 'news' %]
[% Slash.selectTopic('tid', tid, section, 1) %]
[% Slash.selectSection('section', section, 0, 1) %]

<BR><FONT SIZE="2">(Almost everything should go under Articles)</FONT>

[% IF savestory %]
<P>[% PROCESS titlebar width => "100%", title => form.subj %]
<IMG SRC="[% topic.imageclean %]" ALIGN="RIGHT" BORDER="0"
	ALT="[% topic.alttext %]" HSPACE="30" VSPACE="10"
	WIDTH="[% topic.width %]" HEIGHT="[% topic.height %]">

<P>[% subtext %]</P>
[% END %]

[% PROCESS formLabel value => "The Scoop",
	comment => "HTML is fine, but double check those URLs and HTML tags!" %]


<TEXTAREA WRAP="VIRTUAL" COLS="70" ROWS="12" NAME="story">[% form.story | strip_literal %]</TEXTAREA><BR>
<FONT SIZE="2">(Are you sure you included a URL?  Didja test them for typos?)</FONT><P>

<INPUT TYPE="SUBMIT" NAME="op" VALUE="PreviewStory">
[% IF savestory %]
<INPUT TYPE="SUBMIT" NAME="op" VALUE="SubmitStory">
[% ELSE %]
(You must preview once before you can submit)
[% END %]

</FORM><P>

__seclev__
10000