Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting-finance
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-reporting-finance
Commits
0e440069
Commit
0e440069
authored
Jul 02, 2012
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- changed date validation, added cal icons, adjusted default start/end date
parent
27ba5522
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
finance-expenses.tcl
www/finance-expenses.tcl
+8
-6
No files found.
www/finance-expenses.tcl
View file @
0e440069
...
...
@@ -10,8 +10,8 @@ ad_page_contract {
@param start_year Year to start the report
@param start_unit Month or week to start within the start_year
}
{
{
start_date
"201
0
-01-01"
}
{
end_date
"201
2
-01-01"
}
{
start_date
"201
2
-01-01"
}
{
end_date
"201
3
-01-01"
}
{
level_of_detail 4
}
{
output_format
"html"
}
{
group_style
"cust_proj_emp"
}
...
...
@@ -61,13 +61,13 @@ if { 0==$show_complete_note } {
}
# Check that Start & End-Date have correct format
if
{
""
!=
$start
_date && !
[
regexp
{
^
[
0-9
][
0-9
][
0-9
][
0-9
]
\-
[
0-9
][
0-9
]
\-
[
0-9
][
0-9
]
$
}
$start
_date
]
}
{
if
{
[
catch
{
set start_date_ansi
[
clock
format
[
clock
scan
$start
_date
]
-format %Y-%m-%d
]
}
""
]
}
{
ad_return_complaint 1
"Start Date doesn't have the right format.<br>
Current value: '
$start
_date'<br>
Expected format: 'YYYY-MM-DD'"
}
if
{
""
!=
$end
_date && !
[
regexp
{
^
[
0-9
][
0-9
][
0-9
][
0-9
]
\-
[
0-9
][
0-9
]
\-
[
0-9
][
0-9
]
$
}
$end
_date
]
}
{
if
{
[
catch
{
set end_date_ansi
[
clock
format
[
clock
scan
$end
_date
]
-format %Y-%m-%d
]
}
""
]
}
{
ad_return_complaint 1
"End Date doesn't have the right format.<br>
Current value: '
$end
_date'<br>
Expected format: 'YYYY-MM-DD'"
...
...
@@ -618,13 +618,15 @@ switch $output_format {
<tr>
<td class=form-label>Start Date</td>
<td class=form-widget>
<input type=textfield name=start_date value=
$start
_date>
<input id='start_date' type='textfield' name='start_date' value='
$start
_date'>
<input type=
\"
button
\"
style=
\"
height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');
\"
onclick =
\"
return showCalendar('start_date', 'y-m-d');
\"
>
</td>
</tr>
<tr>
<td class=form-label>End Date</td>
<td class=form-widget>
<input type=textfield name=end_date value=
$end
_date>
<input type='textfield' id='end_date' name='end_date' value='
$end
_date'>
<input type=
\"
button
\"
style=
\"
height:20px; width:20px; background: url('/resources/acs-templating/calendar.gif');
\"
onclick =
\"
return showCalendar('end_date', 'y-m-d');
\"
>
</td>
</tr>
<tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment