Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL Resource Scheduler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jeff Sturek
UNL Resource Scheduler
Commits
a6408d81
Commit
a6408d81
authored
8 years ago
by
Tyler Lemburg
Browse files
Options
Downloads
Patches
Plain Diff
Recurs until date is max 1 year in the future
parent
eb174670
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
routes/resources.rb
+10
-1
10 additions, 1 deletion
routes/resources.rb
with
10 additions
and
1 deletion
routes/resources.rb
+
10
−
1
View file @
a6408d81
...
@@ -220,7 +220,16 @@ post '/:service_space_url_name/resources/:resource_id/reserve/?' do
...
@@ -220,7 +220,16 @@ post '/:service_space_url_name/resources/:resource_id/reserve/?' do
end
end
if
params
.
checked?
(
'recurring'
)
if
params
.
checked?
(
'recurring'
)
recurs_until_date
=
Time
.
strptime
(
params
[
:recurs_until_date
],
'%m/%d/%Y'
).
midnight
.
in_time_zone
begin
recurs_until_date
=
Time
.
strptime
(
params
[
:recurs_until_date
],
'%m/%d/%Y'
).
midnight
.
in_time_zone
rescue
recurs_until_date
=
nil
end
if
recurs_until_date
.
nil?
||
recurs_until_date
-
365
.
days
>
Time
.
now
||
recurs_until_date
<
start_time
.
midnight
.
in_time_zone
flash
:error
,
'Invalid Recurs Until Date'
,
'Your recurs-until date must be less than a year in the future.'
redirect
back
end
# use the recurring type to increment the date here
# use the recurring type to increment the date here
starts
=
[]
starts
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment