mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-07 16:24:21 +01:00
fix for the two issues in #852
* the end date is prefilled with an incorrect formatted date * if the radio for ends_on is not selected, but a date is entered, tracks incorrectly behaves as if ends_on was checked
This commit is contained in:
parent
f4f2573f98
commit
239b38cb15
4 changed files with 6 additions and 5 deletions
|
|
@ -596,7 +596,7 @@ class RecurringTodo < ActiveRecord::Base
|
|||
unless self.number_of_occurences.nil?
|
||||
return self.occurences_count < self.number_of_occurences
|
||||
else
|
||||
if self.end_date.nil?
|
||||
if self.end_date.nil? || self.ends_on == 'no_end_date'
|
||||
return true
|
||||
else
|
||||
case self.target
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
<label for="recurring_todo[ends_on]">Ends on:</label><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', true)%> No end date<br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_number_of_times')%> Ends after <%= text_field( :recurring_todo, :number_of_occurences, "size" => 3, "tabindex" => 7) %> times<br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date')%> Ends on <%= text_field(:recurring_todo, :end_date, "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 8, "autocomplete" => "off") %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date')%> Ends on <%= text_field(:recurring_todo, :end_date, "size" => 12, "class" => "Date", "onfocus" => "Calendar.setup", "tabindex" => 8, "autocomplete" => "off", "value" => "") %><br/>
|
||||
</div></div>
|
||||
<div id="recurring_daily" style="display:block">
|
||||
<label>Settings for daily recurring actions</label><br/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue