-
Notifications
You must be signed in to change notification settings - Fork 50
/
TemplateConfiguration.ascx
108 lines (100 loc) · 6.51 KB
/
TemplateConfiguration.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
<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="TemplateConfiguration.ascx.cs" Inherits="DotNetNuke.Modules.Announcements.TemplateConfiguration" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<%@ Register TagPrefix="dnn" TagName="URL" Src="~/controls/URLControl.ascx" %>
<%@ Import Namespace="DotNetNuke.Services.Localization" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.UI.WebControls" Assembly="DotNetNuke.Web" %>
<div class="dnnForm dnnTemplateConfig dnnClear" id="TemplateConfigForm">
<fieldset>
<div class="dnnFormItem">
<dnn:Label ID="plHeaderTemplate" runat="server" ControlName="txtHeaderTemplate" Suffix=":" />
<asp:TextBox ID="txtHeaderTemplate" Width="350" Columns="30" TextMode="MultiLine"
Rows="10" MaxLength="2000" runat="server" />
<asp:LinkButton ID="cmdLoadDefHeader" runat="server" CausesValidation="False" CssClass="dnnSecondaryAction" resourcekey="LoadDefault">Load Default</asp:LinkButton>
</div>
<div class="dnnFormItem">
<dnn:Label ID="plTemplate" runat="server" ControlName="txtTemplate" Suffix=":"></dnn:Label>
<asp:TextBox ID="txtTemplate" Width="350" Columns="30" TextMode="MultiLine"
Rows="10" MaxLength="2000" runat="server" />
<asp:LinkButton ID="cmdLoadDefItemTemplate" runat="server" CausesValidation="False" CssClass="dnnSecondaryAction" resourcekey="LoadDefault">Load Default</asp:LinkButton>
</div>
<div class="dnnFormItem">
<dnn:Label ID="plAltItemTemplate" runat="server" ControlName="txtAltItemTemplate" Suffix=":"></dnn:Label>
<asp:TextBox ID="txtAltItemTemplate" Width="350" Columns="30" TextMode="MultiLine"
Rows="10" MaxLength="2000" runat="server" />
<asp:LinkButton ID="cmdLoadDefAltItemTemplate" runat="server" CausesValidation="False" CssClass="dnnSecondaryAction" resourcekey="LoadDefault">Load Default</asp:LinkButton>
</div>
<div class="dnnFormItem">
<dnn:Label ID="plSeparator" runat="server" ControlName="txtSeparator" Suffix=":"></dnn:Label>
<asp:TextBox ID="txtSeparator" Width="350" Columns="30" TextMode="MultiLine"
Rows="10" MaxLength="2000" runat="server" />
<asp:LinkButton ID="cmdLoadDefSeparator" runat="server" CausesValidation="False" CssClass="dnnSecondaryAction" resourcekey="LoadDefault">Load Default</asp:LinkButton>
</div>
<div class="dnnFormItem">
<dnn:Label ID="plFooterTemplate" runat="server" ControlName="txtFooterTemplate" Suffix=":"></dnn:Label>
<asp:TextBox ID="txtFooterTemplate" Width="350" Columns="30" TextMode="MultiLine"
Rows="10" MaxLength="2000" runat="server" />
<asp:LinkButton ID="cmdLoadDefFooterTemplate" runat="server" CausesValidation="False" CssClass="dnnSecondaryAction" resourcekey="LoadDefault">Load Default</asp:LinkButton>
</div>
</fieldset>
<h2 id="dnnPanel-TemplateHelp" class="dnnFormSectionHead">
<a href="">
<%=LocalizeString("TemplateHelp.head")%></a></h2>
<fieldset>
<div class="dnnFormItem">
<asp:Literal runat="server" ID="litTemplateHelp"></asp:Literal>
</div>
</fieldset>
<div class="dnnActions dnnClear">
<ul class="dnnActions dnnClear">
<li>
<asp:LinkButton ID="cmdUpdate" runat="server" CssClass="dnnPrimaryAction" ResourceKey="cmdUpdate" /></li>
<li>
<asp:HyperLink ID="cancelHyperLink" runat="server" CssClass="dnnSecondaryAction" resourcekey="cmdCancel" /></li>
</ul>
</div>
</div>
<script type="text/javascript">
/*globals jQuery, window, Sys */
(function ($, Sys) {
function setupForm() {
$('#TemplateConfigForm').dnnPanels();
$('#<%= cmdLoadDefHeader.ClientID %>').dnnConfirm({
text: '<%= Localization.GetSafeJSString("LoadDefault.Confirm", LocalResourceFile) %>',
yesText: '<%= Localization.GetSafeJSString("Yes.Text", LocalResourceFile) %>',
noText: '<%= Localization.GetSafeJSString("No.Text", LocalResourceFile) %>',
title: '<%= Localization.GetSafeJSString("LoadDefault.Text", LocalResourceFile) %>'
});
$('#<%= cmdLoadDefItemTemplate.ClientID %>').dnnConfirm({
text: '<%= Localization.GetSafeJSString("LoadDefault.Confirm", LocalResourceFile) %>',
yesText: '<%= Localization.GetSafeJSString("Yes.Text", LocalResourceFile) %>',
noText: '<%= Localization.GetSafeJSString("No.Text", LocalResourceFile) %>',
title: '<%= Localization.GetSafeJSString("LoadDefault.Text", LocalResourceFile) %>'
});
$('#<%= cmdLoadDefAltItemTemplate.ClientID %>').dnnConfirm({
text: '<%= Localization.GetSafeJSString("LoadDefault.Confirm", LocalResourceFile) %>',
yesText: '<%= Localization.GetSafeJSString("Yes.Text", LocalResourceFile) %>',
noText: '<%= Localization.GetSafeJSString("No.Text", LocalResourceFile) %>',
title: '<%= Localization.GetSafeJSString("LoadDefault.Text", LocalResourceFile) %>'
});
$('#<%= cmdLoadDefSeparator.ClientID %>').dnnConfirm({
text: '<%= Localization.GetSafeJSString("LoadDefault.Confirm", LocalResourceFile) %>',
yesText: '<%= Localization.GetSafeJSString("Yes.Text", LocalResourceFile) %>',
noText: '<%= Localization.GetSafeJSString("No.Text", LocalResourceFile) %>',
title: '<%= Localization.GetSafeJSString("LoadDefault.Text", LocalResourceFile) %>'
});
$('#<%= cmdLoadDefFooterTemplate.ClientID %>').dnnConfirm({
text: '<%= Localization.GetSafeJSString("LoadDefault.Confirm", LocalResourceFile) %>',
yesText: '<%= Localization.GetSafeJSString("Yes.Text", LocalResourceFile) %>',
noText: '<%= Localization.GetSafeJSString("No.Text", LocalResourceFile) %>',
title: '<%= Localization.GetSafeJSString("LoadDefault.Text", LocalResourceFile) %>'
});
}
$(document).ready(function () {
setupForm();
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
setupForm();
});
});
}(jQuery, window.Sys));
</script>