11<% @ Control Language= " C#" CodeBehind= " ExportCSV.ascx.cs" Inherits= " DotNetNuke.Modules.UserDefinedTable.ExportCsv" AutoEventWireup= " false" %>
22<% @ Register TagPrefix= " dnn" TagName= " Label" Src= " ~/controls/LabelControl.ascx" %>
3+ <% @ Register TagPrefix= " dnn" Namespace= " DotNetNuke.Web.Client.ClientResourceManagement" Assembly= " DotNetNuke.Web.Client" %>
4+
5+ <dnn:DnnCssInclude runat =" server" FilePath =" ~/Resources/Shared/components/TimePicker/Themes/jquery-ui.css" />
6+ <dnn:DnnCssInclude runat =" server" FilePath =" ~/Resources/Shared/components/TimePicker/Themes/jquery.ui.theme.css" />
7+
38<div class =" dnnForm" >
4- <div class =" dnnFormItem" >
5- <dnn:Label ID =" plFolder" runat =" server" ControlName =" cboFolders" Suffix =" :" />
6- <asp:DropDownList ID =" cboFolders" runat =" server" CssClass =" NormalTextBox" Width =" 300" />
7- </div >
8- <div class =" dnnFormItem" >
9- <dnn:Label ID =" plFile" runat =" server" ControlName =" txtFile" Suffix =" :" />
10- <asp:TextBox ID =" txtFile" CssClass =" NormalTextBox" runat =" server" MaxLength =" 200"
11- Width =" 300" />
12- </div >
13- <div class =" dnnFormItem" >
14- <dnn:label id =" plDelimiter" runat =" server" controlname =" rblDelimiter" suffix =" :" />
15- <asp:RadioButtonList ID =" rblDelimiter" runat =" server" RepeatDirection =" Horizontal"
16- CssClass =" dnnFormRadioButtons " >
17- <asp:ListItem Selected =" True" Value =" ," resourcekey =" comma" ></asp:ListItem >
18- <asp:ListItem Value =" ;" resourcekey =" semicolon" ></asp:ListItem >
19- </asp:RadioButtonList >
9+ <div class =" dnnFormItem" >
10+ <dnn:Label ID =" plFolder" runat =" server" ControlName =" cboFolders" Suffix =" :" />
11+ <asp:DropDownList ID =" cboFolders" runat =" server" CssClass =" NormalTextBox" Width =" 300" />
12+ </div >
13+ <div class =" dnnFormItem" >
14+ <dnn:Label ID =" plFile" runat =" server" ControlName =" txtFile" Suffix =" :" />
15+ <asp:TextBox ID =" txtFile" CssClass =" NormalTextBox" runat =" server" MaxLength =" 200"
16+ Width =" 300" />
17+ </div >
18+ <div class =" dnnFormItem" >
19+ <dnn:label id =" plDelimiter" runat =" server" controlname =" rblDelimiter" suffix =" :" />
20+ <asp:RadioButtonList ID =" rblDelimiter" runat =" server" RepeatDirection =" Horizontal"
21+ CssClass =" dnnFormRadioButtons " >
22+ <asp:ListItem Selected =" True" Value =" ," resourcekey =" comma" ></asp:ListItem >
23+ <asp:ListItem Value =" ;" resourcekey =" semicolon" ></asp:ListItem >
24+ </asp:RadioButtonList >
25+ </div >
26+ <div class =" dnnFormItem" >
27+ <dnn:label id =" plSystemFields" runat =" server" controlname =" cbSystemFields" />
28+ <asp:CheckBox ID =" cbSystemFields" runat =" server" />
29+ </div >
30+ <div class =" dnnFormItem" >
31+ <dnn:label id =" plInitialDate" runat =" server" controlname =" txtInitialDate" />
32+ <asp:TextBox ID =" txtInitialDate" CssClass =" NormalTextBox" runat =" server" MaxLength =" 200"
33+ Width =" 300" onchange =" TriggerChanges();" />
34+ </div >
35+ <div >
36+
37+ </div >
38+ <div class =" dnnFormItem" >
39+ <dnn:label id =" plFinalDate" runat =" server" controlname =" txtFinalDate" />
40+ <asp:TextBox ID =" txtFinalDate" CssClass =" NormalTextBox" runat =" server" MaxLength =" 200"
41+ Width =" 300" onchange =" TriggerChanges();" />
42+ </div >
43+ <div class =" dnnFormItem" >
44+ <dnn:label id =" plDatesValidator" value =" " runat =" server" controlname =" cvtxtStartDate" />
45+ <asp:CompareValidator id =" compareValidatorDates" runat =" server"
46+ ControlToCompare =" txtInitialDate" cultureinvariantvalues =" true"
47+ display =" Dynamic" enableclientscript =" true"
48+ ControlToValidate =" txtFinalDate"
49+ type =" Date" Operator =" GreaterThanEqual"
50+ CssClass =" validator-error" resourcekey =" errorDateMessage" >
51+ </asp:CompareValidator >
52+ <asp:CustomValidator id =" CustomValidatorDates"
53+ ControlToValidate =" txtInitialDate"
54+ ClientValidationFunction =" ValidateDatesClient"
55+ Display =" Dynamic"
56+ runat =" server"
57+ resourcekey =" customDateMessage" CssClass =" validator-error" />
58+ </div >
59+ <ul class =" dnnActions dnnClear" >
60+ <li >
61+ <asp:LinkButton ID =" cmdExport" resourcekey =" cmdExport" runat =" server" CssClass =" dnnPrimaryAction"
62+ Text =" Export" BorderStyle =" none" ></asp:LinkButton ></li >
63+ <li >
64+ <asp:LinkButton ID =" cmdCancel" resourcekey =" cmdCancel" runat =" server" CssClass =" dnnSecondaryAction"
65+ Text =" Cancel" BorderStyle =" none" CausesValidation =" False" ></asp:LinkButton ></li >
66+ </ul >
67+
2068</div >
21- <ul class =" dnnActions dnnClear" >
22- <li >
23- <asp:LinkButton ID =" cmdExport" resourcekey =" cmdExport" runat =" server" CssClass =" dnnPrimaryAction"
24- Text =" Export" BorderStyle =" none" ></asp:LinkButton ></li >
25- <li >
26- <asp:LinkButton ID =" cmdCancel" resourcekey =" cmdCancel" runat =" server" CssClass =" dnnSecondaryAction"
27- Text =" Cancel" BorderStyle =" none" CausesValidation =" False" ></asp:LinkButton ></li >
28- </ul >
29-
30- </div >
69+
70+ <script >
71+ $ (function () {
72+ $ (" #<%= txtInitialDate.ClientID %>" ).datepicker ({
73+ dateFormat: " yy/mm/dd" ,
74+ showButtonPanel: true ,
75+ closeText: ' Clear' ,
76+ onClose : function () {
77+ var event = arguments .callee .caller .caller .arguments [0 ];
78+ if ($ (event .delegateTarget ).hasClass (' ui-datepicker-close' )) {
79+ $ (this ).val (' ' );
80+ TriggerChanges ();
81+ }
82+ }
83+ });
84+ $ (" #<%= txtFinalDate.ClientID %>" ).datepicker ({
85+ dateFormat: " yy/mm/dd" ,
86+ showButtonPanel: true ,
87+ closeText: ' Clear' ,
88+ onClose : function () {
89+ var event = arguments .callee .caller .caller .arguments [0 ];
90+ if ($ (event .delegateTarget ).hasClass (' ui-datepicker-close' )) {
91+ $ (this ).val (' ' );
92+ TriggerChanges ();
93+ }
94+ }
95+ });
96+ });
97+
98+ function TriggerChanges () {
99+ ValidatorValidate (document .getElementById (' <%= CustomValidatorDates.ClientID %>' ));
100+ }
101+
102+ function ValidateDatesClient (source , arguments ) {
103+ if (($ (" #<%= txtInitialDate.ClientID %>" ).val ().length == 0 && $ (" #<%= txtFinalDate.ClientID %>" ).val ().length == 0 ) || ($ (" #<%= txtInitialDate.ClientID %>" ).val ().length > 0 && $ (" #<%= txtFinalDate.ClientID %>" ).val ().length > 0 )) {
104+ arguments .IsValid = true ;
105+
106+ } else {
107+ arguments .IsValid = false ;
108+ }
109+ }
110+ </script >
0 commit comments