forked from ventrian/News-Articles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathucSubmitNews.ascx
executable file
·335 lines (328 loc) · 20.3 KB
/
ucSubmitNews.ascx
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
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucSubmitNews.ascx.vb" Inherits="Ventrian.NewsArticles.ucSubmitNews" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<%@ Register TagPrefix="dnn" TagName="SectionHead" Src="~/controls/SectionHeadControl.ascx" %>
<%@ Register TagPrefix="dnn" TagName="URL" Src="~/controls/URLControl.ascx" %>
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>
<%@ Register Assembly="Ventrian.NewsArticles" Namespace="Ventrian.NewsArticles.Components.Validators" TagPrefix="Ventrian" %>
<%@ Register TagPrefix="article" TagName="Header" Src="ucHeader.ascx" %>
<%@ Register TagPrefix="article" TagName="UploadFiles" Src="Controls/UploadFiles.ascx" %>
<%@ Register TagPrefix="article" TagName="UploadImages" Src="Controls/UploadImages.ascx" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<article:Header runat="server" id="ucHeader1" SelectedMenu="SubmitArticle" MenuPosition="Top" />
<asp:PlaceHolder ID="phMirrorText" runat="server" Visible="false">
<div align="center"><asp:Label ID="lblMirrorText" runat="server" cssclass="Normal" /></div>
</asp:PlaceHolder>
<asp:PlaceHolder ID="phMirror" runat="server">
<dnn:sectionhead id="dshMirror" cssclass="Head" runat="server" text="Mirror" section="tblMirror" resourcekey="Mirror" includerule="True" />
<table class="Settings" cellspacing="2" cellpadding="2" summary="Mirror Design Table" border="0" id="tblMirror" runat="Server" width="100%">
<tr>
<td colspan="2"><asp:label id="lblMirrorHelp" cssclass="Normal" runat="server" resourcekey="MirrorHelp"
enableviewstate="False">In this section, you can specify your content.</asp:label></td>
</tr>
<tr>
<td><asp:Image id="Image1" runat="Server" ImageUrl="~/Images/Spacer.gif" Width="25" Height="1" /></td>
<td valign="top" width="100%">
<table id="Table2" cellspacing="2" cellpadding="2" summary="Mirror Design Table" border="0" width="100%">
<tr>
<td class="SubHead" width="150"><dnn:label id="plMirrorArticle" text="Mirror Article?" runat="server" controlname="chkMirrorArticle"></dnn:label></td>
<td>
<asp:CheckBox ID="chkMirrorArticle" runat="server" AutoPostBack="true" />
</td>
</tr>
<tr runat="server" id="trMirrorModule" visible="false">
<td class="SubHead" width="150"><dnn:label id="plMirrorModule" text="Select Module:" runat="server" controlname="drpMirrorModule"></dnn:label></td>
<td>
<asp:DropDownList ID="drpMirrorModule" runat="server" CssClass="NormalTextBox" DataTextField="Title" DataValueField="LinkedID" Width="400px" AutoPostBack="true" />
</td>
</tr>
<tr runat="server" id="trMirrorArticle" visible="false">
<td class="SubHead" width="150"><dnn:label id="plMirrorArticleSelect" text="Select Article:" runat="server" controlname="drpMirrorArticle"></dnn:label></td>
<td>
<asp:DropDownList ID="drpMirrorArticle" runat="server" CssClass="NormalTextBox" DataTextField="TitleAlternate" DataValueField="ArticleID" Width="400px" />
<asp:requiredfieldvalidator id="valMirrorArticle" runat="server" cssclass="NormalRed" resourcekey="valMirrorArticle.ErrorMessage"
display="None" errormessage="<br>You must select an article." controltovalidate="drpMirrorArticle" SetFocusOnError="True"></asp:requiredfieldvalidator>
</td>
</tr>
<tr runat="server" id="trMirrorAutoUpdate" visible="false">
<td class="SubHead" width="150"><dnn:label id="plMirrorAutoUpdate" text="Select Module:" runat="server" controlname="chkMirrorAutoUpdate"></dnn:label></td>
<td>
<asp:CheckBox ID="chkMirrorAutoUpdate" runat="server" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</asp:PlaceHolder>
<asp:PlaceHolder ID="phCreate" runat="server">
<dnn:sectionhead id="dshCreate" cssclass="Head" runat="server" text="Create" section="tblCreate" resourcekey="Create" includerule="True" />
<table class="Settings" cellspacing="2" cellpadding="2" summary="Create Design Table" border="0" id="tblCreate" runat="Server" width="100%">
<tr>
<td colspan="2"><asp:label id="lblCreateHelp" cssclass="Normal" runat="server" resourcekey="CreateHelp"
enableviewstate="False">In this section, you can specify your content.</asp:label></td>
</tr>
<tr>
<td><asp:Image id="imgSpacer1" runat="Server" ImageUrl="~/Images/Spacer.gif" Width="25" Height="1" /></td>
<td valign="top" width="100%">
<table id="tblArticle" cellspacing="2" cellpadding="2" summary="Article Design Table" border="0" width="100%">
<tr>
<td class="SubHead" width="150"><dnn:label id="plTitle" text="Title:" runat="server" controlname="txtTitle"></dnn:label></td>
<td>
<asp:textbox id="txtTitle" width="350px" runat="server" cssclass="NormalTextBox" maxlength="255"></asp:textbox>
<asp:requiredfieldvalidator id="valTitle" runat="server" cssclass="NormalRed" resourcekey="valTitle.ErrorMessage"
display="None" errormessage="<br>Title Is Required" controltovalidate="txtTitle" SetFocusOnError="True"></asp:requiredfieldvalidator>
</td>
</tr>
<tr>
<td colspan="2" class="SubHead">
<dnn:label id="plBody" text="Body:" runat="server" controlname="txtDetails"></dnn:label>
</td>
</tr>
<tr>
<td colspan="2" valign="top">
<dnn:texteditor id="txtDetails" runat="server" height="400" width="450"></dnn:texteditor>
<asp:requiredfieldvalidator id="valBody" runat="server" cssclass="NormalRed" resourcekey="valBody.ErrorMessage"
display="None" errormessage="<br>Body Is Required" controltovalidate="txtDetails" SetFocusOnError="True"></asp:requiredfieldvalidator>
</td>
</tr>
<tr>
<td colspan="2" valign="top">
<asp:PlaceHolder ID="phAttachment" runat="Server">
<dnn:sectionhead id="dshAttachment" cssclass="Head" runat="server" text="Attachments" section="tblAttachment"
resourcekey="Attachment" includerule="True" IsExpanded="False" />
<table id="tblAttachment" cellspacing="2" cellpadding="2" summary="Attachment Design Table" border="0" runat="server">
<tr id="trLink" runat="Server">
<td class="SubHead" width="150"><dnn:label id="plLink" text="Link:" runat="server" controlname="ctlURL"></dnn:label></td>
<td>
<dnn:url id="ctlUrlLink" runat="server" width="300" showtrack="False" showlog="False" shownone="True"
shownewwindow="False" ShowFiles="false"></dnn:url>
</td>
</tr>
<tr id="trNewWindow" runat="Server">
<td class="SubHead" width="150"><dnn:label id="plNewWindow" text="New Window?" runat="server" controlname="chkNewWindow"></dnn:label></td>
<td>
<asp:CheckBox id="chkNewWindow" Runat="server" Checked="False"></asp:CheckBox>
</td>
</tr>
</table>
</asp:PlaceHolder>
<article:UploadFiles runat="server" id="ucUploadFiles" />
<article:UploadImages runat="server" id="ucUploadImages" />
<asp:PlaceHolder ID="phExcerpt" runat="Server">
<br />
<dnn:sectionhead id="dshExcerpt" cssclass="Head" runat="server" text="Excerpt" section="tblExcerpt"
resourcekey="Excerpt" includerule="True" IsExpanded="False" />
<table id="tblExcerpt" cellspacing="2" cellpadding="2" summary="Excerpt Design Table" border="0" runat="server" width="100%">
<tr>
<td>
<asp:TextBox ID="txtExcerptBasic" runat="server" Height="400" Width="450" TextMode="MultiLine" />
<dnn:texteditor id="txtExcerptRich" runat="server" height="400" width="450"></dnn:texteditor>
</td>
</tr>
</table>
</asp:PlaceHolder>
<asp:PlaceHolder ID="phMeta" runat="Server">
<br />
<dnn:sectionhead id="dshMeta" cssclass="Head" runat="server" text="Meta" section="tblMeta"
resourcekey="Meta" includerule="True" IsExpanded="False" />
<table id="tblMeta" cellspacing="2" cellpadding="2" summary="Meta Design Table" border="0" runat="server">
<tr>
<td class="SubHead" width="150"><dnn:label id="plMetaTitle" runat="server" suffix=":" controlname="txtMetaTitle"></dnn:label></td>
<td>
<asp:textbox id="txtMetaTitle" cssclass="NormalTextBox" runat="server" maxlength="200" width="300"></asp:textbox>
</td>
</tr>
<tr>
<td class="SubHead" width="150"><dnn:label id="plMetaDescription" runat="server" suffix=":" controlname="txtMetaDescription"></dnn:label></td>
<td>
<asp:textbox id="txtMetaDescription" cssclass="NormalTextBox" runat="server" maxlength="500" width="300"
textmode="MultiLine" rows="3"></asp:textbox>
</td>
</tr>
<tr>
<td class="SubHead" width="150"><dnn:label id="plMetaKeyWords" runat="server" suffix=":" controlname="txtMetaKeyWords"></dnn:label></td>
<td>
<asp:textbox id="txtMetaKeyWords" cssclass="NormalTextBox" runat="server" maxlength="500" width="300"
textmode="MultiLine" rows="3"></asp:textbox>
</td>
</tr>
<tr>
<td class="SubHead" width="150"><dnn:label id="plPageHeadText" runat="server" suffix=":" controlname="txtPageHeadText"></dnn:label></td>
<td>
<asp:TextBox id="txtPageHeadText" cssclass="NormalTextBox" runat="server" maxlength="500" width="300" textmode="MultiLine"
rows="4"></asp:TextBox>
</td>
</tr>
</table>
</asp:PlaceHolder>
<asp:PlaceHolder ID="phCustomFields" runat="Server">
<br />
<dnn:sectionhead id="dshCustomFields" cssclass="Head" runat="server" text="Custom Fields" section="tblCustomFields"
resourcekey="CustomFields" includerule="False" IsExpanded="True" />
<table id="tblCustomFields" cellspacing="2" cellpadding="2" summary="Custom Fields Design Table" border="0" runat="server">
<tr>
<td>
<table id="Table1" cellspacing="2" cellpadding="2" summary="Custom Fields Design Table" border="0">
<asp:repeater id="rptCustomFields" Runat="server">
<ItemTemplate>
<tr valign="top" runat="server" id="trItem">
<td class="SubHead" width="150" valign="middle">
<label id="label" runat="server">
<asp:linkbutton id="cmdHelp" tabindex="-1" runat="server" CausesValidation="False" enableviewstate="False">
<asp:image id="imgHelp" tabindex="-1" runat="server" imageurl="~/images/help.gif" enableviewstate="False"></asp:image>
</asp:linkbutton>
<asp:label id="lblLabel" runat="server" enableviewstate="False"></asp:label>
</label>
<asp:panel id="pnlHelp" runat="server" cssClass="Help" enableviewstate="False">
<asp:label id="lblHelp" runat="server" enableviewstate="False"></asp:label>
</asp:panel>
</td>
<td align="left">
<asp:PlaceHolder ID="phValue" Runat="server" />
</td>
</tr>
</ItemTemplate>
</asp:repeater>
</table>
</td>
</tr>
</table>
</asp:PlaceHolder>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</asp:PlaceHolder>
<asp:PlaceHolder id="phOrganize" runat="Server">
<dnn:sectionhead id="dshOrganize" cssclass="Head" runat="server" text="Organize" section="tblOrganize"
resourcekey="Organize" includerule="True" />
<table class="Settings" cellspacing="2" cellpadding="2" summary="Organize Design Table" border="0" id="tblOrganize" runat="Server" width="100%">
<tr>
<td colspan="2"><asp:label id="plOrganizeHelp" cssclass="Normal" runat="server" resourcekey="OrganizeHelp"
enableviewstate="False">In this section, you can organize your content.</asp:label></td>
</tr>
<tr>
<td><asp:Image id="imgSpacer2" runat="Server" ImageUrl="~/Images/Spacer.gif" Width="25" Height="1" /></td>
<td valign="top" width="100%">
<table id="tblOrganizeDetail" cellspacing="2" cellpadding="2" summary="Organize Detail Design Table" border="0" width="100%">
<tr runat="Server" id="trCategories">
<td class="SubHead" width="150"><dnn:label id="plCategories" text="Categories:" runat="server" controlname="lstCategories"></dnn:label></td>
<td>
<asp:ListBox ID="lstCategories" runat="server" CssClass="Normal" DataTextField="NameIndented"
DataValueField="CategoryID" Width="300px" SelectionMode="Multiple" />
<asp:RequiredFieldValidator ID="valCategory" runat="server" ControlToValidate="lstCategories"
Display="None" ErrorMessage="Category is Required." Enabled="False" ResourceKey="valCategoriesRequired.ErrorMessage" SetFocusOnError="true" />
</td>
</tr>
<tr runat="Server" id="trTags">
<td class="SubHead" width="150"><dnn:label id="plTags" text="Tags:" runat="server" controlname="txtTags"></dnn:label></td>
<td>
<asp:textbox id="txtTags" cssclass="NormalTextBox" width="300" maxlength="255" runat="server" /><br />
<asp:Label ID="lblTags" ResourceKey="TagsHelp" runat="server" CssClass="Normal" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</asp:PlaceHolder>
<asp:PlaceHolder ID="phPublish" runat="Server">
<dnn:sectionhead id="dshPublish" cssclass="Head" runat="server" text="Publish" section="tblPublish"
resourcekey="Publish" includerule="True" />
<table class="Settings" cellspacing="2" cellpadding="2" summary="Publish Design Table" border="0" id="tblPublish" runat="Server" width="100%">
<tr>
<td colspan="2"><asp:label id="plPublishHelp" cssclass="Normal" runat="server" resourcekey="PublishHelp"
enableviewstate="False">In this section, you can specify how and when your content is published.</asp:label></td>
</tr>
<tr>
<td><asp:Image id="imgSpacer3" runat="Server" ImageUrl="~/Images/Spacer.gif" Width="25" Height="1" /></td>
<td valign="top" width="100%">
<table id="tblPublishDetail" cellspacing="2" cellpadding="2" summary="Publish Detail Design Table" border="0" width="100%">
<tr id="trAuthor" runat="Server">
<td class="SubHead" width="150"><dnn:label id="plAuthor" text="Author:" runat="server" controlname="lblAuthor"></dnn:label></td>
<td>
<asp:Label ID="lblAuthor" Runat="server" CssClass="Normal" />
<asp:LinkButton ID="cmdSelectAuthor" runat="server" ResourceKey="cmdSelectAuthor" CssClass="CommandButton"
CausesValidation="False" />
<asp:DropDownList ID="ddlAuthor" Runat="server" Visible="False" DataTextField="DisplayName" DataValueField="UserID" />
<asp:Panel ID="pnlAuthor" runat="server" Visible="false">
<asp:TextBox ID="txtAuthor" runat="server" CssClass="NormalTextBox" Width="150px" />
<asp:Label ID="lblAuthorUsername" runat="server" ResourceKey="AuthorUsername" CssClass="Normal" />
<asp:CustomValidator id="valAuthor" runat="server" CssClass="NormalRed" ErrorMessage="<br />Invalid username."
Display="Dynamic" ResourceKey="valAuthor.ErrorMessage" ControlToValidate="txtAuthor" />
</asp:Panel>
</td>
</tr>
<tr id="trFeatured" runat="Server">
<td class="SubHead" width="150"><dnn:label id="plFeatured" text="Featured:" runat="server" controlname="chkFeatured"></dnn:label></td>
<td>
<asp:CheckBox id="chkFeatured" Runat="server"></asp:CheckBox>
</td>
</tr>
<tr id="trSecure" runat="Server">
<td class="SubHead" width="150"><dnn:label id="plSecure" text="Secure:" runat="server" controlname="chkSecure"></dnn:label></td>
<td>
<asp:CheckBox id="chkSecure" Runat="server"></asp:CheckBox>
</td>
</tr>
<tr id="trPublish" runat="Server">
<td class="SubHead" width="150"><dnn:label id="plStartDate" text="Start Date:" runat="server" controlname="txtPublishDate"></dnn:label></td>
<td>
<asp:textbox id="txtPublishDate" cssclass="NormalTextBox" runat="server" width="150" maxlength="15"></asp:textbox>
<asp:hyperlink id="cmdPublishCalendar" cssclass="CommandButton" runat="server" resourcekey="Calendar">Calendar</asp:hyperlink>
<asp:requiredfieldvalidator id="valPublishDateRequired" runat="server" cssclass="NormalRed" resourcekey="valStartDateRequired.ErrorMessage"
display="None" errormessage="<br>Publish Date Is Required" controltovalidate="txtPublishDate" SetFocusOnError="True"></asp:requiredfieldvalidator>
<asp:comparevalidator id="valPublishDate" cssclass="NormalRed" runat="server" controltovalidate="txtPublishDate"
errormessage="<br>Invalid publish date!" operator="DataTypeCheck" type="Date" display="None" ResourceKey="valStartDate.ErrorMessage" SetFocusOnError="True"></asp:comparevalidator>
<span class="Normal">@ <asp:TextBox ID="txtPublishHour" runat="Server" MaxLength="2" Width="25px" CssClass="NormalTextBox" /> : <asp:TextBox ID="txtPublishMinute" runat="Server" MaxLength="2" Width="25px" CssClass="NormalTextBox" /></span>
</td>
</tr>
<tr id="trExpiry" runat="Server">
<td class="SubHead" width="150"><dnn:label id="plEndDate" text="End Date:" runat="server" controlname="txtEndDate"></dnn:label></td>
<td>
<asp:textbox id="txtExpiryDate" cssclass="NormalTextBox" runat="server" width="150" maxlength="15"></asp:textbox>
<asp:hyperlink id="cmdExpiryCalendar" cssclass="CommandButton" runat="server" resourcekey="Calendar">Calendar</asp:hyperlink>
<asp:comparevalidator id="valExpiryDate" cssclass="NormalRed" runat="server" controltovalidate="txtExpiryDate"
errormessage="<br>Invalid expiry date!" operator="DataTypeCheck" type="Date" display="None" ResourceKey="valEndDate.ErrorMessage" SetFocusOnError="True"></asp:comparevalidator>
<span class="Normal">@ <asp:TextBox ID="txtExpiryHour" runat="Server" MaxLength="2" Width="25px" CssClass="NormalTextBox" /> : <asp:TextBox ID="txtExpiryMinute" runat="Server" MaxLength="2" Width="25px" CssClass="NormalTextBox" /></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</asp:PlaceHolder>
<dnn:sectionhead id="dshAction" cssclass="Head" runat="server" text="Action" section="tblAction"
resourcekey="Action" includerule="True" />
<table class="Settings" cellspacing="2" cellpadding="2" summary="Action Design Table" border="0" id="tblAction" runat="Server" width="100%">
<tr>
<td colspan="2"><asp:label id="plAction" cssclass="Normal" runat="server" resourcekey="ActionHelp"
enableviewstate="False">In this section, you can perform actions relating to the content.</asp:label></td>
</tr>
<tr>
<td><asp:Image id="imgSpacer4" runat="Server" ImageUrl="~/Images/Spacer.gif" Width="25" Height="1" /></td>
<td valign="top" width="100%">
<table id="tblActionDetail" cellspacing="2" cellpadding="2" summary="Action Detail Design Table" border="0" width="100%">
<tr>
<td class="SubHead" width="150"><dnn:label id="plStatus" text="Status:" runat="server" controlname="drpStatus"></dnn:label></td>
<td>
<asp:DropDownList ID="drpStatus" runat="Server" CssClass="NormalTextBox" />
</td>
</tr>
<tr>
<td colspan="2" align="center">
<asp:LinkButton ID="cmdSaveArticle" runat="Server" CssClass="CommandButton" ResourceKey="cmdUpdate" /> <asp:LinkButton ID="cmdPublishArticle" runat="Server" CssClass="CommandButton" ResourceKey="cmdPublish" /> <asp:LinkButton ID="cmdAddEditPages" runat="Server" CssClass="CommandButton" ResourceKey="cmdAddEditPages" /> <asp:LinkButton ID="cmdCancel" runat="Server" CssClass="CommandButton" ResourceKey="cmdCancel" CausesValidation="False" /> <asp:LinkButton ID="cmdDelete" runat="Server" CssClass="CommandButton" ResourceKey="cmdDelete" CausesValidation="false" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<asp:ValidationSummary ID="valMessageBox" Runat="server" ShowSummary="False" ShowMessageBox="True" CssClass="NormalRed" />
<article:Header runat="server" id="ucHeader2" SelectedMenu="SubmitArticle" MenuPosition="Bottom" />