forked from DNNCommunity/DNN.Events
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventEditCategories.ascx
111 lines (110 loc) · 7.22 KB
/
EventEditCategories.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
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="EventEditCategories.ascx.vb" Inherits="DotNetNuke.Modules.Events.EventEditCategories" %>
<%@ Register Src="~/controls/LabelControl.ascx" TagName="Label" TagPrefix="dnn" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web.Deprecated" Namespace="DotNetNuke.Web.UI.WebControls" %>
<asp:Panel ID="pnlEventsModuleCategories" runat="server">
<div class="dnnForm EventEditCategories">
<div id="divDeleteError" runat="server" visible="false" class="dnnForm" >
<div class="dnnFormMessage dnnFormValidationSummary">
<asp:Label ID="lblDeleteError" runat="server" >Cannot delete, linked to module settings.</asp:Label>
</div>
</div>
<div style="width:50%;float:left">
<div class="dnnFormItem">
<dnn:Label ID="lblCategoryCap" runat="server" cssclass="dnnFormRequired SubHead" ResourceKey="plCategory" Text="Category:" />
<asp:TextBox ID="txtCategoryName" runat="server" cssclass="dnnFormRequired NormalTextBox"></asp:TextBox>
<asp:RequiredFieldValidator id="valRequiredName" runat="server" cssclass="dnnFormMessage dnnFormError" resourcekey="valRequiredName" ControlToValidate="txtCategoryName" ValidationGroup="CategoryUpdate"></asp:RequiredFieldValidator>
</div>
<div class="dnnFormItem">
<dnn:Label ID="lblColorCap" runat="server" CssClass="SubHead" ResourceKey="plColor" Text="Color:" />
<table cellpadding="0" cellspacing="0">
<tr>
<td style="width:150px;">
<asp:TextBox ID="txtCategoryColor" runat="server" CssClass="NormalTextBox" style=""></asp:TextBox>
</td>
<td style="width:20px;">
<span id="colorPicker1"><dnn:DnnColorPicker ID="cpBackColor" runat="server" EnableCustomColor="True" ShowIcon="True" Overlay="False" AutoPostBack="False" OnClientColorChange="HandleColorChange"></dnn:DnnColorPicker></span>
</td>
<td style="width:100%;">
<asp:CustomValidator ID="ValColor" runat="server" SetFocusOnError="true" cssclass="dnnFormMessage dnnFormError"
ControlToValidate="txtCategoryColor" ClientValidationFunction="ValidateColor" resourcekey="InvalidColor" ValidationGroup="CategoryUpdate" />
</td>
</tr>
</table>
</div>
<div class="dnnFormItem">
<dnn:Label ID="lblFontColorCap" runat="server" CssClass="SubHead" ResourceKey="plFontColor" Text="Font Color:" />
<table cellpadding="0" cellspacing="0">
<tr>
<td style="width:150px;">
<asp:TextBox ID="txtCategoryFontColor" runat="server" CssClass="NormalTextBox"></asp:TextBox>
</td>
<td style="width:20px;">
<span id="colorPicker2" ><dnn:DnnColorPicker ID="cpForeColor" runat="server" EnableCustomColor="True" ShowIcon="True" Overlay="False" AutoPostBack="False" OnClientColorChange="HandleColorFontChange"></dnn:DnnColorPicker></span>
</td>
<td style="width:100%;">
<asp:CustomValidator ID="CalFontColor" runat="server" SetFocusOnError="true" cssclass="dnnFormMessage dnnFormError"
ControlToValidate="txtCategoryFontColor" ClientValidationFunction="ValidateColor" resourcekey="InvalidColor" ValidationGroup="CategoryUpdate" />
</td>
</tr>
</table>
</div>
<div class="dnnFormItem">
<dnn:Label ID="lblPreview" runat="server" CssClass="SubHead" ResourceKey="plPreview" Text="Preview:" />
<table id="previewpane" class="SubHead" style="text-align:center;vertical-align:top;" runat="server">
<tr>
<td style="width:145px;">
<span id="lblPreviewCat" style="" runat="server"></span>
</td>
</tr>
</table>
</div>
<ul class="dnnActions dnnClear">
<li><asp:LinkButton ID="cmdAdd" runat="server" CssClass="dnnPrimaryAction" resourcekey="cmdAdd" ValidationGroup="CategoryUpdate" /></li>
<li><asp:LinkButton ID="cmdUpdate" runat="server" CssClass="dnnSecondaryAction" resourcekey="cmdUpdate" Visible="false" ValidationGroup="CategoryUpdate" /></li>
<li><asp:LinkButton ID="returnButton" runat="server" CssClass="dnnSecondaryAction" resourcekey="returnButton" CausesValidation="False" /></li>
</ul>
</div>
<div style="width:50%;float:left">
<asp:DataGrid ID="GrdCategories" runat="server" AutoGenerateColumns="False" BorderStyle="Outset" BorderWidth="1px" CssClass="Normal"
DataKeyField="Category" GridLines="Horizontal" OnDeleteCommand="GrdCategories_DeleteCommand" OnItemCommand="GrdCategories_ItemCommand"
Width="250px">
<EditItemStyle VerticalAlign="Bottom" />
<AlternatingItemStyle BackColor="WhiteSmoke" />
<ItemStyle VerticalAlign="Top" />
<HeaderStyle BackColor="Silver" Font-Bold="True" />
<Columns>
<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Left" />
<ItemTemplate>
<asp:ImageButton ID="DeleteButton" runat="server" IconKey="Delete" AlternateText="Delete" CausesValidation="false" CommandArgument="Delete"
CommandName="Delete" resourcekey="DeleteButton" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="PortalID" Visible="False">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text="<%# Container.DataItem.PortalID.ToString %>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Category" Visible="False">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text="<%# Container.DataItem.Category.ToString %>">
</asp:Label>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Category Name">
<ItemTemplate>
<asp:Panel runat="server" BackColor="<%# GetColor(ctype(Container.DataItem.Color,String)) %>">
<asp:LinkButton ID="lnkCategoryName" runat="server" forecolor="<%# GetColor(ctype(Container.DataItem.FontColor,string)) %>" CommandArgument="Select"
CommandName="Select" Text="<%# Container.DataItem.CategoryName %>">
</asp:LinkButton>
</asp:Panel>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<asp:Label ID="lblEditMessage" runat="server" CssClass="SubHead" resourcekey="lblEditMessage">(Select Item Link to Edit)</asp:Label>
</div>
</div>
</asp:Panel>