/
PostAd.aspx
executable file
·157 lines (149 loc) · 10.2 KB
/
PostAd.aspx
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
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" CodeFile="PostAd.aspx.cs"
Inherits="PostAd_aspx" Title="Upload Form" %>
<%@ Register TagPrefix="uc1" TagName="LocationDropDown" Src="Controls/LocationDropDown.ascx" %>
<%@ Register TagPrefix="uc1" TagName="CategoryPath" Src="Controls/CategoryPath.ascx" %>
<asp:Content ID="MainContent" ContentPlaceHolderID="Main" Runat="server">
<div id="body">
<div id="col_main_left">
<div id="user_assistance">
<a id="content_start"></a>
<h3>
Step 1: Select Category</h3>
<p>
Select the Category your Form type is in.</p>
<h3>
Step 2: Give Form Information and Upload</h3>
<p>
Fill out the necessary information for the form.
Upload the form. If you have not
filled in all the necesary fields you will be notified. If uploading a TIS, fill
out each synonym separately (any extras can be added at a later date) and in "Description"
put in "Sample" or "Purpose" information. Make sure to copy and paste line-by-line to ensure
all data is entered.</p>
<h3>
Step 3: Get Administrator to Activate the Form</h3>
<p>
Forms must be activated by an administrator in order
for the form to be viewable.</p>
</div>
</div>
<div id="col_main_right">
<asp:Wizard ID="PostAdWizard" Runat="server" OnFinishButtonClick="PostAdWizard_FinishButtonClick"
DisplaySideBar="False" CssClass="wizard" StepStyle-CssClass="wizard-step" ActiveStepIndex="0"
OnPreviousButtonClick="PostAdWizard_PreviousButtonClick" NavigationStyle-HorizontalAlign="Left" >
<WizardSteps>
<asp:WizardStep ID="WizardStep1" Runat="server" Title="Category Selection">
<h2 class="section">
Upload Form: Category Selection</h2>
<div class="content_right">
<fieldset>
<legend class="select_category">Please select a Category for the Form:</legend>
<p>
<uc1:CategoryPath ID="CategoryPath" Runat="server" OnCategorySelectionChanged="CategoryPath_CategorySelectionChanged" />
</p>
<div>
<asp:DataList Runat="server" ID="SubcategoriesList" DataSourceID="SubcategoriesDS"
OnItemCommand="SubcategoriesList_ItemCommand" CellSpacing="10" RepeatColumns="2">
<ItemTemplate>
<asp:LinkButton Runat="Server" ID="CategoryButton" CommandArgument='<%# Eval("Id") %>'
Text='<%# Eval("Name") %>' Font-Size="12px" Font-Bold="True" />
</ItemTemplate>
</asp:DataList>
<asp:ObjectDataSource ID="SubcategoriesDS" Runat="server" TypeName="AspNet.StarterKits.Classifieds.Web.CategoryCache"
SelectMethod="GetCategoriesByParentId" OnSelected="SubcategoriesDS_Selected">
<SelectParameters>
<asp:ControlParameter ControlID="CategoryPath" PropertyName="CurrentCategoryId"
Type="Int32" DefaultValue="0" Name="parentCategoryId" />
</SelectParameters>
</asp:ObjectDataSource>
</div>
</fieldset>
</div>
</asp:WizardStep>
<asp:WizardStep ID="AdDetailsStep" Runat="server" Title="Enter Form Details">
<h2 class="section">
Post an Form: Details</h2>
<div class="content_right">
<fieldset>
<legend>
Your Selected Category:</legend>
<asp:Label Runat="server" ID="CategoryPathLabel"></asp:Label>
|
<asp:LinkButton Runat="server" ID="ChangeCategoryButton" OnClick="ChangeCategoryButton_Click"
ValidationGroup="ChangeCategory">Change</asp:LinkButton>
<p>
<asp:ValidationSummary Runat="server" ID="ValidationSummary1" HeaderText="Please correct the following:" />
</p>
<p></p>
<legend>Title: <span class="small_text">(100 characters max)</span></legend><span>
<asp:TextBox Text='<%# Bind("Title") %>' Runat="server" ID="TitleTextBox" CssClass="post_title" MaxLength="100"></asp:TextBox></span>
<asp:RequiredFieldValidator Runat="server" ErrorMessage="A Title for the form is required."
ID="RequiredTitle" ControlToValidate="TitleTextBox">
*</asp:RequiredFieldValidator>
<p>
</p>
<legend>Code/Acronym: <span class="small_text">(20 characters max)</span></legend>
<span><asp:TextBox Text='<%# Bind("Code") %>' Runat="server" ID="TextBoxCode"
CssClass="post_title" MaxLength="20"></asp:TextBox></span>
<asp:RequiredFieldValidator Runat="server" ErrorMessage="A Code for the form is required."
ID="RequiredCode" ControlToValidate="TextBoxCode">
*</asp:RequiredFieldValidator>
<p></p>
<legend>Synonyms/Subtitles: <span class="small_text">(50 characters max each, 5 Synonyms max)</span></legend>
<span><asp:TextBox Text='<%# Bind("Syn1") %>' Runat="server" ID="TextBoxSyn1"
CssClass="post_title" MaxLength="50"></asp:TextBox></span><br />
<span><asp:TextBox Text='<%# Bind("Syn2") %>' Runat="server" ID="TextBoxSyn2"
CssClass="post_title" MaxLength="50"></asp:TextBox></span><br />
<span><asp:TextBox Text='<%# Bind("Syn3") %>' Runat="server" ID="TextBoxSyn3"
CssClass="post_title" MaxLength="50"></asp:TextBox></span><br />
<span><asp:TextBox Text='<%# Bind("Syn4") %>' Runat="server" ID="TextBoxSyn4"
CssClass="post_title" MaxLength="50"></asp:TextBox></span><br />
<span><asp:TextBox Text='<%# Bind("Syn5") %>' Runat="server" ID="TextBoxSyn5"
CssClass="post_title" MaxLength="50"></asp:TextBox></span><br />
<legend>Description: <span class="small_text">(500 characters max)</span></legend><span>
<asp:TextBox Text='<%# Bind("Description") %>' Runat="server" ID="DescriptionTextBox"
TextMode="MultiLine" Columns="80" Rows="16" CssClass="post_description"></asp:TextBox>
</span>
<asp:RequiredFieldValidator Runat="server" ErrorMessage="A Description is required."
ID="RequiredDescription" ControlToValidate="DescriptionTextBox">
*</asp:RequiredFieldValidator>
<legend>Pick a file to upload:</legend>
<asp:FileUpload ID="FormUpload" runat="server"/>
<asp:RequiredFieldValidator Runat="server" ErrorMessage="An Upload is required."
ID="UploadValidator" ControlToValidate="FormUpload">
*</asp:RequiredFieldValidator>
<asp:Label ID="UploadDetails" runat="server"></asp:Label>
<p></p><br />
</fieldset>
</div>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" Runat="server" StepType="Complete" Title="Done">
<h2 class="section">
Done!</h2>
<div class="content_right">
<p>
Your Form was successfully submitted. </p>
<asp:Label ID="Label1" runat="server"></asp:Label><br />
<p style="text-align: center">
<br />
<asp:HyperLink Runat="server" ID="MyAdsLink"
Font-Bold="True" NavigateUrl="~/MyAds.aspx">Go to My Forms page</asp:HyperLink>
</p>
</div>
</asp:WizardStep>
</WizardSteps>
<StepStyle CssClass="wizard-step" />
<NavigationStyle HorizontalAlign="Left" />
</asp:Wizard>
</div>
</div>
<script type="text/javascript">
function textCounter(elem, maxLimit)
{
if (elem.value.length > maxLimit)
{
elem.value = elem.value.substring(0, maxLimit);
}
}
</script>
</asp:Content>