Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-hr
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-hr
Commits
40a14d70
Commit
40a14d70
authored
Jul 21, 2005
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added date checking "-validate" code
parent
b9c6c0f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
new.tcl
www/new.tcl
+24
-3
No files found.
www/new.tcl
View file @
40a14d70
...
...
@@ -201,8 +201,8 @@ ad_form \
{
job_title:text
(
text
)
,optional
{
label
$job
_title_label
}
{
html
{
size 30
}}
}
{
job_description:text
(
textarea
)
,nospell,optional
{
label
$job
_description_label
}
{
html
{
rows 5 cols 40
}}}
{
start_date:text
(
text
)
,optional
{
label
$start
_date_label
}
{
html
{
size 10
}}
}
{
end_date:text
(
text
)
,optional
{
label
$end
_date_label
}
{
html
{
size 10
}}
}
{
start_date:text
(
text
)
{
label
$start
_date_label
}
{
html
{
size 10
}}
}
{
end_date:text
(
text
)
{
label
$end
_date_label
}
{
html
{
size 10
}}
}
{
voluntary_termination_p:text
(
radio
)
,optional
{
label
$voluntary
_termination_p_label
}
{
options
$voluntary
_termination_options
}
}
{
termination_reason:text
(
textarea
)
,nospell,optional
{
label
$termination
_reason_label
}
{
html
{
rows 5 cols 40
}}}
...
...
@@ -239,7 +239,8 @@ ad_form -extend -name cost -on_request {
THEN to_date
(
:end_century,:date_format
)
ELSE to_date
(
to_char
(
rc.end_date,:date_format
)
,:date_format
)
END as end_date,
ci.*
ci.*,
to_char
(
e.birthdate,:date_format
)
as birthdate
from parties p,
im_employees e,
im_repeating_costs rc,
...
...
@@ -249,6 +250,26 @@ ad_form -extend -name cost -on_request {
and p.party_id = e.employee_id
and p.party_id = ci.cause_object_id
and ci.cost_id = rc.rep_cost_id
}
-validate
{
{
birthdate
{
""
==
$birthdate
||
[
regexp
{
^....
\-
..
\-
..$
}
$birthdate
]
}
"Bad date. Please use 'YYYY-MM-DD' to format the date."
}
{
end_date
{
""
==
$end
_date ||
[
regexp
{
^....
\-
..
\-
..$
}
$end
_date
]
}
"Bad date. Please use 'YYYY-MM-DD' to format the date."
}
{
start_date
{
""
==
$start
_date ||
[
regexp
{
^....
\-
..
\-
..$
}
$start
_date
]
}
"Bad date. Please use 'YYYY-MM-DD' to format the date."
}
}
-after_submit
{
set cost_name
$employee
_name
...
...
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