-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathEventEdit.ascx
189 lines (176 loc) · 14.9 KB
/
EventEdit.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
<%@ Control Language="c#" AutoEventWireup="false" Inherits="Engage.Dnn.Events.EventEdit" Codebehind="EventEdit.ascx.cs" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx" %>
<%@ Register TagPrefix="engage" TagName="ModuleMessage" Src="Controls/ModuleMessage.ascx" %>
<%@ Register TagPrefix="engage" TagName="RecurrenceEditor" Src="Controls/RecurrenceEditor.ascx" %>
<%@ Register TagPrefix="engage" TagName="DeleteAction" Src="Actions/DeleteAction.ascx" %>
<engage:ModuleMessage runat="server" ID="SuccessModuleMessage" MessageType="Success" CssClass="AddEventSuccessMessage"/>
<asp:Panel ID="EventEditWrap" runat="server" CssClass="eng-form eng-events-add-edit AddNewEvent" DefaultButton="SaveEventButton">
<asp:ValidationSummary runat="server" ID="ValidationSummary"
ForeColor=""
CssClass="eng-form-message eng-form-validation-summary"
ValidationGroup="EditEvent" />
<asp:Placeholder ID="EventEditForm" runat="server">
<fieldset>
<legend><%=this.Localize(this.EventId.HasValue ? "EditEvent.Text" : "AddNewEvent.Text")%></legend>
<ul class="eng-form-items">
<li class="eng-events-title eng-medium eng-form-item">
<asp:Label runat="server" ResourceKey="EventTitleLabel" AssociatedControlID="EventTitleTextBox"/>
<telerik:RadTextBox ID="EventTitleTextBox" runat="server" MaxLength="250" skin="WebBlue" ShouldResetWidthInPixels="false"/>
<asp:RequiredFieldValidator runat="server" ControlToValidate="EventTitleTextBox" ResourceKey="EventTitleTextBoxRequired" Display="None" EnableClientScript="false" ValidationGroup="EditEvent" />
</li>
<asp:Placeholder ID="CategoryPanel" runat="server">
<li class="eng-events-category eng-medium eng-form-item">
<asp:Label runat="server" ResourceKey="EventCategoryLabel" AssociatedControlID="CategoryComboBox"/>
<telerik:RadComboBox ID="CategoryComboBox" runat="server" skin="WebBlue" MarkFirstMatch="true" ShowDropDownOnTextboxClick="true"
OnClientSelectedIndexChanged="CategoryComboBox_SelectedIndexChanged" OnClientTextChange="CategoryComboBox_TextChange" ShouldResetWidthInPixels="false" />
<asp:Label ID="CategoryCreationPendingLabel" runat="server" ResourceKey="CategoryCreationPending" CssClass="InformationBody" style="display:none;" />
<asp:RequiredFieldValidator runat="server" ControlToValidate="CategoryComboBox" ResourceKey="EventCategoryRequired" Display="None" EnableClientScript="false" ValidationGroup="EditEvent" />
<asp:CustomValidator ID="UniqueCategoryNameValidator" runat="server" ControlToValidate="CategoryComboBox" ResourceKey="EventCategoryUnique" Display="None" EnableClientScript="false" ValidationGroup="EditEvent" />
</li>
</asp:Placeholder>
<li class="eng-events-start-date eng-medium eng-form-item">
<asp:Label runat="server" ResourceKey="EventStartDateLabel" AssociatedControlID="StartDateTimePicker"/>
<telerik:raddatetimepicker runat="server" id="StartDateTimePicker" skin="WebBlue" ShouldResetWidthInPixels="false">
<timeview skin="WebBlue"/>
<calendar skin="WebBlue" ShowRowHeaders="false"/>
<DateInput InvalidStyleDuration="100" />
<ClientEvents OnDateSelected="StartDateTimePicker_DateSelected" />
</telerik:raddatetimepicker>
<asp:RequiredFieldValidator runat="server" ControlToValidate="StartDateTimePicker" ResourceKey="StartDateTimePickerRequired" Display="None" EnableClientScript="false" ValidationGroup="EditEvent" />
</li>
<li class="eng-events-end-date eng-medium eng-form-item">
<asp:Label runat="server" ResourceKey="EventEndDateLabel" AssociatedControlID="EndDateTimePicker"/>
<telerik:raddatetimepicker runat="server" id="EndDateTimePicker" skin="WebBlue" ShouldResetWidthInPixels="false">
<timeview skin="WebBlue"/>
<calendar skin="WebBlue" ShowRowHeaders="false"/>
<DateInput InvalidStyleDuration="100"/>
</telerik:raddatetimepicker>
<asp:CompareValidator
runat="server" Display="None" EnableClientScript="false"
ControlToCompare="StartDateTimePicker"
ControlToValidate="EndDateTimePicker"
ResourceKey="EndDateCompareValidator"
Operator="GreaterThan"/>
<asp:RequiredFieldValidator runat="server" ControlToValidate="EndDateTimePicker" ResourceKey="EndDateTimePickerRequired" Display="None" EnableClientScript="false" ValidationGroup="EditEvent" />
</li>
<li class="eng-events-time-zone eng-medium eng-form-item">
<asp:Label runat="server" ResourceKey="EventTimeZoneLabel" AssociatedControlID="TimeZoneDropDownList" />
<asp:DropDownList runat="server" ID="TimeZoneDropDownList" />
</li>
<li class="eng-events-location eng-medium eng-form-item">
<asp:Label runat="server" ResourceKey="EventLocationLabel" AssociatedControlID="EventLocationTextBox"/>
<telerik:RadTextBox ID="EventLocationTextBox" runat="server" Skin="WebBlue" ShouldResetWidthInPixels="false" />
</li>
<li class="eng-events-overview eng-x-large eng-form-item">
<asp:Label runat="server" ResourceKey="EventOverviewLabel" AssociatedControlID="EventOverviewTextEditor"/>
<telerik:RadTextBox ID="EventOverviewTextEditor" runat="server" TextMode="MultiLine" Skin="WebBlue" ShouldResetWidthInPixels="false" />
</li>
<li class="eng-events-description eng-x-large eng-form-item">
<asp:Label runat="server" ResourceKey="EventDescriptionLabel" AssociatedControlID="EventDescriptionTextEditor"/>
<dnn:TextEditor ID="EventDescriptionTextEditor" runat="server" Height="400" TextRenderMode="Raw" HtmlEncode="False" DefaultMode="Rich" ChooseMode="True" ChooseRender="False" />
</li>
<li class="eng-events-featured eng-tiny eng-form-item">
<asp:Label runat="server" ResourceKey="FeaturedEventLabel" AssociatedControlID="FeaturedCheckBox"/>
<asp:CheckBox ID="FeaturedCheckBox" runat="server" />
</li>
</ul>
</fieldset>
<fieldset>
<legend><%=this.Localize("Registration.Header")%></legend>
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="AllowRegistrationsCheckBox" />
<asp:AsyncPostBackTrigger ControlID="LimitRegistrationsCheckBox" />
<asp:AsyncPostBackTrigger ControlID="CapacityMetMessageRadioButtonList" />
</Triggers>
<ContentTemplate>
<ul class="eng-form-items">
<li class="eng-form-item eng-tiny eng-events-allow-registration">
<asp:Label runat="server" ResourceKey="AllowRegistrationsLabel" AssociatedControlID="AllowRegistrationsCheckBox"/>
<asp:CheckBox ID="AllowRegistrationsCheckBox" runat="server" Checked="true" AutoPostBack="true" />
</li>
<asp:PlaceHolder ID="LimitRegistrationsPanel" runat="server" Visible="false">
<li class="eng-form-item eng-tiny eng-events-registration-cap">
<asp:Label ID="LimitRegistrationsLabel" runat="server" ResourceKey="LimitRegistrationsLabel" CssClass="RegCap" AssociatedControlID="LimitRegistrationsCheckBox" />
<asp:CheckBox ID="LimitRegistrationsCheckBox" runat="server" AutoPostBack="true" />
<asp:Label ID="RegistrationCountLabel" runat="server" CssClass="eng-form-message eng-form-info" Visible="false"/>
</li>
<asp:PlaceHolder ID="RegistrationLimitPanel" runat="server" Visible="false">
<li class="eng-form-item eng-tiny eng-events-registration-limit">
<asp:Label runat="server" ResourceKey="RegistrationLimitLabel" CssClass="RegCap" AssociatedControlID="RegistrationLimitTextBox" />
<telerik:RadNumericTextBox ID="RegistrationLimitTextBox" runat="server" Value="25" MinValue="1" ShowSpinButtons="True" NumberFormat-AllowRounding="True" NumberFormat-DecimalDigits="0"/>
<asp:RequiredFieldValidator runat="server" ControlToValidate="RegistrationLimitTextBox" ResourceKey="RegistrationLimitRequiredValidator" Display="None" ValidationGroup="EditEvent" />
<asp:CompareValidator ID="RegistrationLimitValidator" runat="server" ControlToValidate="RegistrationLimitTextBox" ResourceKey="RegistrationLimitValidator" Display="None" Operator="GreaterThanEqual" Type="Integer" ValueToCompare="0" ValidationGroup="EditEvent" />
</li>
<li class="eng-form-item eng-tiny eng-events-capacity-met-message-type">
<asp:Label runat="server" ResourceKey="CapacityMetMessageLabel" CssClass="RegCap" AssociatedControlID="CapacityMetMessageRadioButtonList" />
<asp:RadioButtonList ID="CapacityMetMessageRadioButtonList" runat="server" ResourceKey="CapacityMetMessageRadioButtonList" RepeatLayout="Flow" RepeatDirection="Horizontal" AutoPostBack="true">
<asp:ListItem ResourceKey="DefaultMessage" Value="False" Selected="True"/>
<asp:ListItem ResourceKey="CustomMessage" Value="True"/>
</asp:RadioButtonList>
</li>
<asp:Placeholder ID="CustomCapacityMetMessagePanel" runat="server" Visible="false">
<li class="eng-form-item eng-x-large eng-events-capacity-met-message">
<asp:Label runat="server" ResourceKey="CustomCapacityMetMessageLabel" CssClass="RegCap" AssociatedControlID="CustomCapacityMetMessageTextEditor" />
<dnn:TextEditor ID="CustomCapacityMetMessageTextEditor" runat="server" TextRenderMode="Raw" HtmlEncode="False" DefaultMode="Rich" Height="350" ChooseMode="True" ChooseRender="False" />
</li>
</asp:Placeholder>
</asp:PlaceHolder>
</asp:PlaceHolder>
</ul>
</ContentTemplate>
</asp:UpdatePanel>
</fieldset>
<fieldset>
<legend><%=this.Localize("Recurrence.Header")%></legend>
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="RecurringCheckbox" />
</Triggers>
<ContentTemplate>
<ul class="eng-form-items">
<li class="eng-events-recuring eng-tiny eng-form-item">
<asp:Label ID="RecurringEventLabel" runat="server" ResourceKey="RecurringEventLabel" AssociatedControlID="RecurringCheckBox"/>
<asp:CheckBox ID="RecurringCheckBox" runat="server" AutoPostBack="true" />
</li>
<engage:RecurrenceEditor ID="RecurrenceEditor" runat="server" Visible="false" DatePickerSkin="WebBlue" />
</ul>
<asp:CustomValidator ID="RecurrenceEditorValidator" runat="server" ResourceKey="InvalidRecurrence" Display="None" ValidationGroup="EditEvent" />
</ContentTemplate>
</asp:UpdatePanel>
</fieldset>
</asp:Placeholder>
<asp:MultiView ID="FooterMultiview" runat="server" ActiveViewIndex="0">
<asp:View ID="AddEventFooterView" runat="server">
<ul class="eng-actions">
<li><asp:Button ID="SaveEventButton" runat="server" CssClass="save-btn eng-primary-action" ResourceKey="Save.Alt" ValidationGroup="EditEvent" /></li>
<li><asp:Button ID="SaveAndCreateNewEventButton" runat="server" CssClass="save-new-btn eng-primary-action" ResourceKey="SaveAndCreateNew.Alt" ValidationGroup="EditEvent" /></li>
<li><asp:Button ID="CancelButton" runat="server" CssClass="cancel-btn eng-secondary-action" ResourceKey="Cancel.Alt" CausesValidation="False" /></li>
<li><engage:DeleteAction ID="DeleteAction" runat="server" CssClass="delete-btn eng-tertiary-action" /></li>
</ul>
</asp:View>
<asp:View ID="FinalFooterView" runat="server">
<ul class="eng-actions">
<li><asp:Button ID="CreateAnotherEventLink" runat="server" CssClass="eng-primary-action" ResourceKey="CreateAnother.Alt" CausesValidation="False" /></li>
<li><asp:Button ID="CancelGoHomeButton" runat="server" CssClass="eng-secondary-action" ResourceKey="Home" CausesValidation="False" /></li>
</ul>
</asp:View>
</asp:MultiView>
<div class="eng-end-form"></div>
<asp:ScriptManagerProxy runat="server">
<Scripts>
<asp:ScriptReference Assembly="EngageEvents" Name="Engage.Dnn.Events.JavaScript.EngageEvents.EventEdit.combined.js" />
</Scripts>
</asp:ScriptManagerProxy>
<script type="text/ecmascript">
engageEvents.setupEventEdit({
endDateTimePickerId: "<%= EndDateTimePicker.ClientID %>",
categoryCreationPendingLabelId: "<%=CategoryCreationPendingLabel.ClientID %>",
startDateTimePickerDateSelectedFunctionName: "<%= StartDateTimePicker.ClientEvents.OnDateSelected %>",
categoryComboBoxSelectedIndexChangedFunctionName: "<%= CategoryComboBox.OnClientSelectedIndexChanged %>",
categoryComboBoxTextChangeFunctionName: "<%= CategoryComboBox.OnClientTextChange %>"
});
</script>
</asp:Panel>
<div class="eng-end-form"></div>