mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-30 20:55:17 +01:00
Abstracted the :start_year option in the date_select call in the forms, so that it starts at this year without having to hard code it.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@37 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
6703f48333
commit
0755309684
3 changed files with 6 additions and 3 deletions
|
|
@ -23,7 +23,8 @@
|
|||
<%= options_from_collection_for_select(@projects, "id", "name" ) %>
|
||||
</select><br />
|
||||
<label for="new_item_due">Due</label><br />
|
||||
<%= date_select( "new_item", "due", :include_blank => true, :start_year => 2005 ) %>
|
||||
<% now = Date.today %>
|
||||
<%= date_select( "new_item", "due", :include_blank => true, :start_year => now.year, "tabindex" => 5 ) %>
|
||||
<br />
|
||||
<input type="submit" value="Add item">
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@
|
|||
</select>
|
||||
<br />
|
||||
<label for="new_item_due">Due</label><br />
|
||||
<%= date_select( "new_item", "due", :include_blank => true, :start_year => 2005 ) %>
|
||||
<% now = Date.today %>
|
||||
<%= date_select( "new_item", "due", :include_blank => true, :start_year => now.year, "tabindex" => 5 ) %>
|
||||
<br />
|
||||
<input type="submit" value="Add item">
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
</select>
|
||||
<br />
|
||||
<label for="item_due" tab>Due</label><br />
|
||||
<%= date_select( "item", "due", :include_blank => true, :start_year => 2005, "tabindex" => 5 ) %>
|
||||
<% now = Date.today %>
|
||||
<%= date_select( "item", "due", :include_blank => true, :start_year => now.year, "tabindex" => 5 ) %>
|
||||
<br />
|
||||
<br />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue