mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-03 15:58:50 +01:00
fix #1168 by using a new helper to increate the tab_index automatically
Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
parent
4d46750f05
commit
d444d80f93
11 changed files with 139 additions and 127 deletions
|
|
@ -411,7 +411,16 @@ module TodosHelper
|
|||
html += "}}) " * animation.size
|
||||
return html + ";"
|
||||
end
|
||||
|
||||
|
||||
def reset_tab_index
|
||||
$tracks_tab_index = 0
|
||||
end
|
||||
|
||||
def next_tab_index
|
||||
$tracks_tab_index = $tracks_tab_index + 1
|
||||
return $tracks_tab_index
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def image_tag_for_star(todo)
|
||||
|
|
|
|||
|
|
@ -12,15 +12,15 @@
|
|||
|
||||
|
||||
<label for="context_name">Context name</label><br/>
|
||||
<%= text_field('context', 'name', :class => 'context-name') %><br/>
|
||||
<%= text_field('context', 'name', :class => 'context-name', :tabindex => next_tab_index) %><br/>
|
||||
|
||||
<label for="context_hide">Hide from front page?</label>
|
||||
<%= check_box('context', 'hide', :class => 'context-hide') %>
|
||||
<%= check_box('context', 'hide', {:class => 'context-hide', :tabindex => next_tab_index}) %>
|
||||
<input type="hidden" name="wants_render" value="true" />
|
||||
|
||||
<div class="submit_box">
|
||||
<div class="widgets">
|
||||
<button type="submit" class="positive" id="<%= dom_id(context, 'submit') %>" tabindex="15">
|
||||
<button type="submit" class="positive" id="<%= dom_id(context, 'submit') %>" tabindex="<%=next_tab_index%>">
|
||||
<%=image_tag("accept.png", :alt => "") %>
|
||||
<%= t 'common.update' %>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<%- reset_tab_index %>
|
||||
<div id="context_new_container">
|
||||
|
||||
<div id="toggle_context_link" class="hide_form">
|
||||
|
|
@ -10,10 +11,10 @@
|
|||
<div id="error_status"><%= error_messages_for('context') %></div>
|
||||
|
||||
<label for="context_name"><%= t 'contexts.context_name' %></label><br />
|
||||
<%= text_field( "context", "name" ) %><br />
|
||||
<%= text_field( "context", "name", :tabindex => next_tab_index ) %><br />
|
||||
|
||||
<label for="context_hide"><%= t 'contexts.context_hide' %></label>
|
||||
<%= check_box( "context", "hide" ) %><br />
|
||||
<%= check_box( "context", "hide", {:tabindex => next_tab_index} ) %><br />
|
||||
|
||||
<div class="submit_box">
|
||||
<div class="widgets">
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<%- reset_tab_index %>
|
||||
<div id="project_new_project_container">
|
||||
|
||||
<div id="toggle_project_link" class="hide_form">
|
||||
|
|
@ -9,19 +10,19 @@
|
|||
<div id="error_status"><%= error_messages_for("project") %></div>
|
||||
|
||||
<label for="project_name"><%= Project.human_attribute_name(:name) %>:</label><br />
|
||||
<%= text_field 'project', 'name', "tabindex" => 1 %><br />
|
||||
<%= text_field 'project', 'name', "tabindex" => next_tab_index %><br />
|
||||
|
||||
<label for="project_description"><%= Project.human_attribute_name(:description) %> (<%= t('common.optional') %>):</label><br />
|
||||
<%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => 2 %><br />
|
||||
<%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => next_tab_index %><br />
|
||||
|
||||
<% unless @contexts.empty? -%>
|
||||
<label for="default_context_name"><%= Project.human_attribute_name(:default_context_name) %> (<%= t('common.optional') %>):</label><br />
|
||||
<%= text_field_tag("project[default_context_name]", @new_project.default_context.name, :tabindex => 3) %>
|
||||
<%= text_field_tag("project[default_context_name]", @new_project.default_context.name, :tabindex => next_tab_index) %>
|
||||
<br />
|
||||
<% end -%>
|
||||
|
||||
<label for="default_tags"><%= Project.human_attribute_name(:default_tags) %> (<%= t('common.optional') %>):</label><br />
|
||||
<%= text_field_tag("project[default_tags]", @new_project.default_tags, :tabindex => 4) %>
|
||||
<%= text_field_tag("project[default_tags]", @new_project.default_tags, :tabindex => next_tab_index) %>
|
||||
|
||||
<br/>
|
||||
|
||||
|
|
@ -33,7 +34,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<input id="go_to_project" type="checkbox" tabindex="5" name="go_to_project"/><label for="go_to_project"><%= t('projects.to_new_project_page') %></label><br />
|
||||
<input id="go_to_project" type="checkbox" tabindex="<%= next_tab_index%>" name="go_to_project"/><label for="go_to_project"><%= t('projects.to_new_project_page') %></label><br />
|
||||
|
||||
<% end -%>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,28 +11,28 @@ project = project_form
|
|||
<%= source_view_tag( @source_view ) -%>
|
||||
|
||||
<label for="project_name">Name:</label><br/>
|
||||
<%= text_field :project, 'name', :class => 'project-name' %><br/>
|
||||
<%= text_field :project, 'name', :class => 'project-name', :tabindex => next_tab_index %><br/>
|
||||
|
||||
<label for="project_description">Description (optional):</label><br/>
|
||||
<%= text_area :project, 'description', "cols" => 30, "rows" => 4, :class => 'project-description' %><br/>
|
||||
<%= text_area :project, 'description', "cols" => 30, "rows" => 4, :class => 'project-description', :tabindex => next_tab_index %><br/>
|
||||
|
||||
<label for="project_done">Project status:</label><br/>
|
||||
<% ['active', 'hidden', 'completed'].each do | state | %>
|
||||
<%= radio_button(:project, 'state', state) %> <%= state.titlecase %>
|
||||
<%= radio_button(:project, 'state', state, {:tabindex => next_tab_index}) %> <%= state.titlecase %>
|
||||
<% end %><br/>
|
||||
|
||||
<label for="project[default_context_name]">Default Context</label><br/>
|
||||
<%= text_field_tag("project[default_context_name]", project.default_context.name, {:tabindex=>1,:size=> 25}) %>
|
||||
<%= text_field_tag("project[default_context_name]", project.default_context.name, {:tabindex=>next_tab_index,:size=> 25}) %>
|
||||
<br/>
|
||||
|
||||
<label for="project[default_tags]">Default Tags</label><br/>
|
||||
<%= text_field_tag("project[default_tags]", project.default_tags, {:tabindex=>2,:size=> 25}) %>
|
||||
<%= text_field_tag("project[default_tags]", project.default_tags, {:tabindex=>next_tab_index,:size=> 25}) %>
|
||||
<br/>
|
||||
|
||||
<input type="hidden" name="wants_render" value="true" />
|
||||
<div class="submit_box">
|
||||
<div class="widgets" id="<%= dom_id(project, 'widgets') %>">
|
||||
<button type="submit" class="positive" id="<%= dom_id(project, 'submit') %>" tabindex="15">
|
||||
<button type="submit" class="positive" id="<%= dom_id(project, 'submit') %>" tabindex="<%=next_tab_index%>">
|
||||
<%=image_tag("accept.png", :alt => "") %>
|
||||
Update
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -12,101 +12,100 @@
|
|||
<div id="recurring_todo_form_container">
|
||||
<div id="recurring_todo">
|
||||
<label for="recurring_todo_description"><%= Todo.human_attribute_name('description') %></label><%=
|
||||
text_field_tag( "recurring_todo[description]", @recurring_todo.description, "size" => 30, "tabindex" => 1, "maxlength" => 100, :id => "edit_recurring_todo_description") -%>
|
||||
text_field_tag( "recurring_todo[description]", @recurring_todo.description, "size" => 30, "tabindex" => next_tab_index, "maxlength" => 100, :id => "edit_recurring_todo_description") -%>
|
||||
|
||||
<label for="recurring_todo_notes"><%= Todo.human_attribute_name('notes') %></label><%=
|
||||
text_area_tag( "recurring_todo[notes]", @recurring_todo.notes, {:cols => 29, :rows => 6, :tabindex => 2}) -%>
|
||||
text_area_tag( "recurring_todo[notes]", @recurring_todo.notes, {:cols => 29, :rows => 6, :tabindex => next_tab_index}) -%>
|
||||
|
||||
<label for="edit_recurring_todo_project_name"><%= Todo.human_attribute_name('project') %></label>
|
||||
<input id="edit_recurring_todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="<%= @recurring_todo.project.nil? ? 'None' : @recurring_todo.project.name.gsub(/"/,""") %>" />
|
||||
<input id="edit_recurring_todo_project_name" name="project_name" autocomplete="off" tabindex="<%=next_tab_index%>" size="30" type="text" value="<%= @recurring_todo.project.nil? ? 'None' : @recurring_todo.project.name.gsub(/"/,""") %>" />
|
||||
<div class="page_name_auto_complete" id="edit_project_list" style="display:none"></div>
|
||||
|
||||
<label for="edit_recurring_todo_context_name"><%= Todo.human_attribute_name('context') %></label>
|
||||
<input id="edit_recurring_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= @recurring_todo.context.name %>" />
|
||||
<input id="edit_recurring_todo_context_name" name="context_name" autocomplete="off" tabindex="<%=next_tab_index%>" size="30" type="text" value="<%= @recurring_todo.context.name %>" />
|
||||
<div class="page_name_auto_complete" id="edit_context_list" style="display:none"></div>
|
||||
|
||||
<label for="edit_recurring_todo_tag_list"><%= "#{Todo.human_attribute_name('tags')} #{t('shared.separate_tags_with_commas')}"%></label>
|
||||
<%= text_field_tag "edit_recurring_todo_tag_list", @recurring_todo.tag_list, :size => 30, :tabindex => 5 -%>
|
||||
<%= text_field_tag "edit_recurring_todo_tag_list", @recurring_todo.tag_list, :size => 30, :tabindex => next_tab_index -%>
|
||||
</div>
|
||||
</div>
|
||||
<div id="recurring_edit_period_id">
|
||||
<div id="recurring_edit_period">
|
||||
<label><%= t('todos.recurrence_period') %></label><br/>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'daily', @recurring_todo.recurring_period == 'daily')%> <%= t('todos.recurrence.daily') %><br/>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'weekly', @recurring_todo.recurring_period == 'weekly')%> <%= t('todos.recurrence.weekly') %><br/>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'monthly', @recurring_todo.recurring_period == 'monthly')%> <%= t('todos.recurrence.monthly') %><br/>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'yearly', @recurring_todo.recurring_period == 'yearly')%> <%= t('todos.recurrence.yearly') %><br/>
|
||||
<%- #behaviour is set in index because behaviours in partials are not generated -%>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'daily', @recurring_todo.recurring_period == 'daily', {:tabindex => next_tab_index})%> <%= t('todos.recurrence.daily') %><br/>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'weekly', @recurring_todo.recurring_period == 'weekly', {:tabindex => next_tab_index})%> <%= t('todos.recurrence.weekly') %><br/>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'monthly', @recurring_todo.recurring_period == 'monthly', {:tabindex => next_tab_index})%> <%= t('todos.recurrence.monthly') %><br/>
|
||||
<%= radio_button_tag('recurring_edit_todo[recurring_period]', 'yearly', @recurring_todo.recurring_period == 'yearly', {:tabindex => next_tab_index})%> <%= t('todos.recurrence.yearly') %><br/>
|
||||
</div>
|
||||
<div id="recurring_timespan">
|
||||
<br/>
|
||||
<label for="recurring_todo[start_from]"><%= t('todos.recurrence.starts_on') %>: </label><%=
|
||||
text_field_tag("recurring_todo_edit_start_from", format_date(@recurring_todo.start_from), "size" => 12, "class" => "Date", "tabindex" => 6, "autocomplete" => "off") %><br/>
|
||||
text_field_tag("recurring_todo_edit_start_from", format_date(@recurring_todo.start_from), "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off") %><br/>
|
||||
<br/>
|
||||
<label for="recurring_todo[ends_on]"><%= t('todos.recurrence.ends_on') %>:</label><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', @recurring_todo.ends_on == 'no_end_date')%> <%= t('todos.recurrence.no_end_date') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_number_of_times', @recurring_todo.ends_on == 'ends_on_number_of_times')%>
|
||||
<%= t('todos.recurrence.ends_on_number_times', :number => text_field( :recurring_todo, :number_of_occurences, "size" => 3, "tabindex" => 7)) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date', @recurring_todo.ends_on == 'ends_on_end_date')%>
|
||||
<%= t('todos.recurrence.ends_on_date', :date => text_field_tag('recurring_todo_edit_end_date', format_date(@recurring_todo.end_date), "size" => 12, "class" => "Date", "tabindex" => 8, "autocomplete" => "off")) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', @recurring_todo.ends_on == 'no_end_date', {:tabindex => next_tab_index})%> <%= t('todos.recurrence.no_end_date') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_number_of_times', @recurring_todo.ends_on == 'ends_on_number_of_times', {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.ends_on_number_times', :number => text_field( :recurring_todo, :number_of_occurences, "size" => 3, "tabindex" => next_tab_index)) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date', @recurring_todo.ends_on == 'ends_on_end_date', {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.ends_on_date', :date => text_field_tag('recurring_todo_edit_end_date', format_date(@recurring_todo.end_date), "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off")) %><br/>
|
||||
</div></div>
|
||||
<div id="recurring_edit_daily" style="display:<%= @recurring_todo.recurring_period == 'daily' ? 'block' : 'none' %> ">
|
||||
<label><%= t('todos.recurrence.daily_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_x_day', !@recurring_todo.only_work_days)%>
|
||||
<%= t('todos.recurrence.daily_every_number_day', :number=> text_field_tag( 'recurring_todo[daily_every_x_days]', @recurring_todo.daily_every_x_days, {"size" => 3, "tabindex" => 9})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_work_day', @recurring_todo.only_work_days)%> <%= t('todos.recurrence.every_work_day') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_x_day', !@recurring_todo.only_work_days, {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.daily_every_number_day', :number=> text_field_tag( 'recurring_todo[daily_every_x_days]', @recurring_todo.daily_every_x_days, {"size" => 3, "tabindex" => next_tab_index})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_work_day', @recurring_todo.only_work_days, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.every_work_day') %><br/>
|
||||
</div>
|
||||
<div id="recurring_edit_weekly" style="display:<%= @recurring_todo.recurring_period == 'weekly' ? 'block' : 'none' %>">
|
||||
<label><%= t('todos.recurrence.weekly_options') %></label><br/>
|
||||
<%= t('todos.recurrence.weekly_every_number_week', :number => text_field_tag('recurring_todo[weekly_every_x_week]', @recurring_todo.weekly_every_x_week, {"size" => 3, "tabindex" => 9})) %><br/>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_monday]', 'm', @recurring_todo.on_monday ) %> <%= t('date.day_names')[1] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_tuesday]', 't', @recurring_todo.on_tuesday) %> <%= t('date.day_names')[2] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_wednesday]', 'w', @recurring_todo.on_wednesday) %> <%= t('date.day_names')[3] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_thursday]', 't', @recurring_todo.on_thursday) %> <%= t('date.day_names')[4] %><br/>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_friday]', 'f', @recurring_todo.on_friday) %> <%= t('date.day_names')[5] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_saturday]', 's', @recurring_todo.on_saturday) %> <%= t('date.day_names')[6] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_sunday]', 's', @recurring_todo.on_sunday) %> <%= t('date.day_names')[0] %><br/>
|
||||
<%= t('todos.recurrence.weekly_every_number_week', :number => text_field_tag('recurring_todo[weekly_every_x_week]', @recurring_todo.weekly_every_x_week, {"size" => 3, "tabindex" => next_tab_index})) %><br/>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_monday]', 'm', @recurring_todo.on_monday, {:tabindex => next_tab_index} ) %> <%= t('date.day_names')[1] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_tuesday]', 't', @recurring_todo.on_tuesday, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[2] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_wednesday]', 'w', @recurring_todo.on_wednesday, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[3] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_thursday]', 't', @recurring_todo.on_thursday, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[4] %><br/>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_friday]', 'f', @recurring_todo.on_friday, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[5] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_saturday]', 's', @recurring_todo.on_saturday, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[6] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_sunday]', 's', @recurring_todo.on_sunday, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[0] %><br/>
|
||||
</div>
|
||||
<div id="recurring_edit_monthly" style="display:<%= @recurring_todo.recurring_period == 'monthly' ? 'block' : 'none' %>">
|
||||
<label><%= t('todos.recurrence.monthly_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_x_day', @recurring_todo.is_monthly_every_x_day || @recurring_todo.recurring_period == 'weekly')%>
|
||||
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_x_day', @recurring_todo.is_monthly_every_x_day || @recurring_todo.recurring_period == 'weekly', {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.day_x_on_every_x_month',
|
||||
:day => text_field_tag('recurring_todo[monthly_every_x_day]', @recurring_todo.monthly_every_x_day, {"size" => 3, "tabindex" => 9}),
|
||||
:month => text_field_tag('recurring_todo[monthly_every_x_month]', @recurring_todo.monthly_every_x_month, {"size" => 3, "tabindex" => 10})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_xth_day', @recurring_todo.is_monthly_every_xth_day)%>
|
||||
:day => text_field_tag('recurring_todo[monthly_every_x_day]', @recurring_todo.monthly_every_x_day, {"size" => 3, "tabindex" => next_tab_index}),
|
||||
:month => text_field_tag('recurring_todo[monthly_every_x_month]', @recurring_todo.monthly_every_x_month, {"size" => 3, "tabindex" => next_tab_index})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_xth_day', @recurring_todo.is_monthly_every_xth_day, {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.monthly_every_xth_day',
|
||||
:day => select_tag('recurring_todo[monthly_every_xth_day]', options_for_select(@xth_day, @xth_day[@recurring_todo.monthly_every_xth_day(1)-1][1])),
|
||||
:day_of_week => select_tag('recurring_todo[monthly_day_of_week]' , options_for_select(@days_of_week, @recurring_todo.monthly_day_of_week), {}),
|
||||
:month => text_field_tag('recurring_todo[monthly_every_x_month2]', @recurring_todo.monthly_every_x_month2, {"size" => 3, "tabindex" => 11})) %><br/>
|
||||
:day => select_tag('recurring_todo[monthly_every_xth_day]', options_for_select(@xth_day, @xth_day[@recurring_todo.monthly_every_xth_day(1)-1][1]), {:tabindex => next_tab_index}),
|
||||
:day_of_week => select_tag('recurring_todo[monthly_day_of_week]' , options_for_select(@days_of_week, @recurring_todo.monthly_day_of_week), {:tabindex => next_tab_index}),
|
||||
:month => text_field_tag('recurring_todo[monthly_every_x_month2]', @recurring_todo.monthly_every_x_month2, {"size" => 3, "tabindex" => next_tab_index})) %><br/>
|
||||
</div>
|
||||
<div id="recurring_edit_yearly" style="display:<%= @recurring_todo.recurring_period == 'yearly' ? 'block' : 'none' %>">
|
||||
<label><%= t('todos.recurrence.yearly_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_x_day', @recurring_todo.recurrence_selector == 0)%>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_x_day', @recurring_todo.recurrence_selector == 0, {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.yearly_every_x_day',
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year]', options_for_select(@months_of_year, @recurring_todo.yearly_month_of_year), {}),
|
||||
:day => text_field_tag('recurring_todo[yearly_every_x_day]', @recurring_todo.yearly_every_x_day, "size" => 3, "tabindex" => 9)) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_xth_day', @recurring_todo.recurrence_selector == 1)%>
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year]', options_for_select(@months_of_year, @recurring_todo.yearly_month_of_year), {:tabindex => next_tab_index}),
|
||||
:day => text_field_tag('recurring_todo[yearly_every_x_day]', @recurring_todo.yearly_every_x_day, "size" => 3, "tabindex" => next_tab_index)) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_xth_day', @recurring_todo.recurrence_selector == 1, {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.yearly_every_xth_day',
|
||||
:day => select_tag('recurring_todo[yearly_every_xth_day]', options_for_select(@xth_day, @recurring_todo.yearly_every_xth_day), {}),
|
||||
:day_of_week => select_tag('recurring_todo[yearly_day_of_week]', options_for_select(@days_of_week, @recurring_todo.yearly_day_of_week), {}),
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, @recurring_todo.yearly_month_of_year2), {})) %><br/>
|
||||
:day => select_tag('recurring_todo[yearly_every_xth_day]', options_for_select(@xth_day, @recurring_todo.yearly_every_xth_day), {:tabindex => next_tab_index}),
|
||||
:day_of_week => select_tag('recurring_todo[yearly_day_of_week]', options_for_select(@days_of_week, @recurring_todo.yearly_day_of_week), {:tabindex => next_tab_index}),
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, @recurring_todo.yearly_month_of_year2), {:tabindex => next_tab_index})) %><br/>
|
||||
</div>
|
||||
<div id="recurring_target">
|
||||
<label><%= t('todos.recurrence.recurrence_on_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', @recurring_todo.target == 'due_date')%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', @recurring_todo.show_always?)%> <%= t('todos.recurrence.show_option_always') %>
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', !@recurring_todo.show_always?)%>
|
||||
<%= t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', @recurring_todo.show_from_delta, {"size" => 3, "tabindex" => 12})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', @recurring_todo.target == 'show_from_date')%> <%= t('todos.recurrence.from_tickler') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', @recurring_todo.target == 'due_date', {:tabindex => next_tab_index})%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', @recurring_todo.show_always?, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.show_option_always') %>
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', !@recurring_todo.show_always?, {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', @recurring_todo.show_from_delta, {"size" => 3, "tabindex" => next_tab_index})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', @recurring_todo.target == 'show_from_date', {:tabindex => next_tab_index})%> <%= t('todos.recurrence.from_tickler') %><br/>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="recurring_submit_box">
|
||||
<div class="widgets">
|
||||
<button type="submit" class="positive" id="recurring_todo_edit_action_submit" tabindex="15">
|
||||
<button type="submit" class="positive" id="recurring_todo_edit_action_submit" tabindex="<%=next_tab_index%>">
|
||||
<%=image_tag("accept.png", :alt => "") %>
|
||||
<%= t('common.update') %>
|
||||
</button>
|
||||
<button type="button" class="positive" id="recurring_todo_edit_action_cancel" tabindex="15">
|
||||
<button type="button" class="positive" id="recurring_todo_edit_action_cancel" tabindex="<%=next_tab_index%>">
|
||||
<%=image_tag("cancel.png", :alt => "") %>
|
||||
<%= t('common.cancel') %>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<%- reset_tab_index %>
|
||||
<div class="recurring_container">
|
||||
<%
|
||||
form_for(@new_recurring_todo, :html=> { :id=>'recurring-todo-form-new-action', :name=>'recurring_todo', :class => 'inline-form' }) do
|
||||
|
|
@ -7,60 +8,60 @@
|
|||
<div id="recurring_todo_form_container">
|
||||
<div id="recurring_todo">
|
||||
<label for="recurring_todo_description"><%= Todo.human_attribute_name('description') %></label><%=
|
||||
text_field_tag( "recurring_todo[description]", "", "size" => 30, "tabindex" => 1, "maxlength" => 100) -%>
|
||||
text_field_tag( "recurring_todo[description]", "", "size" => 30, "tabindex" => next_tab_index, "maxlength" => 100) -%>
|
||||
<label for="recurring_todo_notes"><%= Todo.human_attribute_name('notes') %></label><%=
|
||||
text_area_tag( "recurring_todo[notes]", nil, {:cols => 29, :rows => 6, :tabindex => 2}) -%>
|
||||
text_area_tag( "recurring_todo[notes]", nil, {:cols => 29, :rows => 6, :tabindex => next_tab_index}) -%>
|
||||
<label for="recurring_todo_project_name"><%= Todo.human_attribute_name('project') %></label>
|
||||
<input id="recurring_todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="" />
|
||||
<input id="recurring_todo_project_name" name="project_name" autocomplete="off" tabindex="<%=next_tab_index%>" size="30" type="text" value="" />
|
||||
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
|
||||
|
||||
<label for="recurring_todo_context_name"><%= Todo.human_attribute_name('context') %></label>
|
||||
<input id="recurring_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= current_user.contexts.first.name unless current_user.contexts.first.nil?%>" />
|
||||
<input id="recurring_todo_context_name" name="context_name" autocomplete="off" tabindex="<%=next_tab_index%>" size="30" type="text" value="<%= current_user.contexts.first.name unless current_user.contexts.first.nil?%>" />
|
||||
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
|
||||
<label for="tag_list"><%= "#{Todo.human_attribute_name('tags')} #{t('shared.separate_tags_with_commas')}"%></label>
|
||||
<%= text_field_tag "tag_list", nil, :size => 30, :tabindex => 5 -%>
|
||||
<%= text_field_tag "tag_list", nil, :size => 30, :tabindex => next_tab_index -%>
|
||||
</div>
|
||||
</div>
|
||||
<div id="recurring_period_id">
|
||||
<div id="recurring_period">
|
||||
<label><%= t('todos.recurrence_period') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'daily', true)%> <%= t('todos.recurrence.daily') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'weekly')%> <%= t('todos.recurrence.weekly') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'monthly')%> <%= t('todos.recurrence.monthly') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'yearly')%> <%= t('todos.recurrence.yearly') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'daily', true, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.daily') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'weekly', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.weekly') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'monthly', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.monthly') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_period]', 'yearly', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.yearly') %><br/>
|
||||
</div>
|
||||
<div id="recurring_timespan">
|
||||
<br/>
|
||||
<label for="recurring_todo[start_from]"><%= t('todos.recurrence.starts_on') %>:</label><%=
|
||||
text_field(:recurring_todo, :start_from, "value" => format_date(current_user.time), "size" => 12, "class" => "Date", "tabindex" => 6, "autocomplete" => "off") %><br/>
|
||||
text_field(:recurring_todo, :start_from, "value" => format_date(current_user.time), "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off") %><br/>
|
||||
<br/>
|
||||
<label for="recurring_todo[ends_on]"><%= t('todos.recurrence.ends_on') %>:</label><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', true)%> <%= t('todos.recurrence.no_end_date') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_number_of_times')%> <%= t('todos.recurrence.ends_on_number_times', :number => text_field( :recurring_todo, :number_of_occurences, "size" => 3, "tabindex" => 7)) %> <br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date')%> <%= t('todos.recurrence.ends_on_date', :date => text_field(:recurring_todo, :end_date, "size" => 12, "class" => "Date", "tabindex" => 8, "autocomplete" => "off", "value" => "")) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'no_end_date', true, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.no_end_date') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_number_of_times', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.ends_on_number_times', :number => text_field( :recurring_todo, :number_of_occurences, "size" => 3, "tabindex" => next_tab_index)) %> <br/>
|
||||
<%= radio_button_tag('recurring_todo[ends_on]', 'ends_on_end_date', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.ends_on_date', :date => text_field(:recurring_todo, :end_date, "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off", "value" => "")) %><br/>
|
||||
</div></div>
|
||||
<div id="recurring_daily" style="display:block">
|
||||
<label><%= t('todos.recurrence.daily_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_x_day', true)%> <%= t('todos.recurrence.daily_every_number_day', :number=> text_field_tag( 'recurring_todo[daily_every_x_days]', "1", {"size" => 3, "tabindex" => 9})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_work_day')%> <%= t('todos.recurrence.every_work_day') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_x_day', true, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.daily_every_number_day', :number=> text_field_tag( 'recurring_todo[daily_every_x_days]', "1", {"size" => 3, "tabindex" => next_tab_index})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[daily_selector]', 'daily_every_work_day', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.every_work_day') %><br/>
|
||||
</div>
|
||||
<div id="recurring_weekly" style="display:none">
|
||||
<label><%= t('todos.recurrence.weekly_options') %></label><br/>
|
||||
<%= t('todos.recurrence.weekly_every_number_week', :number => text_field_tag('recurring_todo[weekly_every_x_week]', 1, {"size" => 3, "tabindex" => 9})) %><br/>
|
||||
<%= t('todos.recurrence.weekly_every_number_week', :number => text_field_tag('recurring_todo[weekly_every_x_week]', 1, {"size" => 3, "tabindex" => next_tab_index})) %><br/>
|
||||
<% week_day = Time.new.wday -%>
|
||||
<%# TODO: this should ideally use the 'week starts on' preferences setting, too? %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_monday]', 'm', week_day == 1 ? true : false) %> <%= t('date.day_names')[1] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_tuesday]', 't', week_day == 2 ? true : false) %> <%= t('date.day_names')[2] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_wednesday]', 'w', week_day == 3 ? true : false) %> <%= t('date.day_names')[3] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_thursday]', 't', week_day == 4 ? true : false) %> <%= t('date.day_names')[4] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_friday]', 'f', week_day == 5 ? true : false) %> <%= t('date.day_names')[5] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_saturday]', 's', week_day == 6 ? true : false) %> <%= t('date.day_names')[6] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_sunday]', 's', week_day == 0 ? true : false) %> <%= t('date.day_names')[0] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_monday]', 'm', week_day == 1 ? true : false, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[1] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_tuesday]', 't', week_day == 2 ? true : false, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[2] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_wednesday]', 'w', week_day == 3 ? true : false, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[3] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_thursday]', 't', week_day == 4 ? true : false, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[4] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_friday]', 'f', week_day == 5 ? true : false, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[5] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_saturday]', 's', week_day == 6 ? true : false, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[6] %>
|
||||
<%= check_box_tag('recurring_todo[weekly_return_sunday]', 's', week_day == 0 ? true : false, {:tabindex => next_tab_index}) %> <%= t('date.day_names')[0] %>
|
||||
</div>
|
||||
<div id="recurring_monthly" style="display:none">
|
||||
<label><%= t('todos.recurrence.monthly_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_x_day', true)%> <%= t('todos.recurrence.day_x_on_every_x_month',
|
||||
:day => text_field_tag('recurring_todo[monthly_every_x_day]', Time.zone.now.mday, {"size" => 3, "tabindex" => 9}),
|
||||
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_x_day', true, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.day_x_on_every_x_month',
|
||||
:day => text_field_tag('recurring_todo[monthly_every_x_day]', Time.zone.now.mday, {"size" => 3, "tabindex" => next_tab_index}),
|
||||
:month => text_field_tag('recurring_todo[monthly_every_x_month]', 1, {"size" => 3, "tabindex" => 10})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[monthly_selector]', 'monthly_every_xth_day')%> <%= t('todos.recurrence.monthly_every_xth_day',
|
||||
:day => select_tag('recurring_todo[monthly_every_xth_day]', options_for_select(@xth_day), {}),
|
||||
|
|
@ -69,31 +70,31 @@
|
|||
</div>
|
||||
<div id="recurring_yearly" style="display:none">
|
||||
<label><%= t('todos.recurrence.yearly_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_x_day', true)%> <%= t('todos.recurrence.yearly_every_x_day',
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year]', options_for_select(@months_of_year, Time.zone.now.month), {}),
|
||||
:day => text_field_tag('recurring_todo[yearly_every_x_day]', Time.zone.now.day, "size" => 3, "tabindex" => 9)) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_xth_day')%> <%= t('todos.recurrence.yearly_every_xth_day',
|
||||
:day => select_tag('recurring_todo[yearly_every_xth_day]', options_for_select(@xth_day), {}),
|
||||
:day_of_week => select_tag('recurring_todo[yearly_day_of_week]', options_for_select(@days_of_week, Time.zone.now.wday), {}),
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, Time.zone.now.month), {})) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_x_day', true, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.yearly_every_x_day',
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year]', options_for_select(@months_of_year, Time.zone.now.month), {:tabindex => next_tab_index}),
|
||||
:day => text_field_tag('recurring_todo[yearly_every_x_day]', Time.zone.now.day, "size" => 3, "tabindex" => next_tab_index)) %><br/>
|
||||
<%= radio_button_tag('recurring_todo[yearly_selector]', 'yearly_every_xth_day', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.yearly_every_xth_day',
|
||||
:day => select_tag('recurring_todo[yearly_every_xth_day]', options_for_select(@xth_day), {:tabindex => next_tab_index}),
|
||||
:day_of_week => select_tag('recurring_todo[yearly_day_of_week]', options_for_select(@days_of_week, Time.zone.now.wday), {:tabindex => next_tab_index}),
|
||||
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, Time.zone.now.month), {:tabindex => next_tab_index})) %><br/>
|
||||
</div>
|
||||
<div id="recurring_target">
|
||||
<label><%= t('todos.recurrence.recurrence_on_options') %></label><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true)%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true)%> <%= t('todos.recurrence.show_option_always') %>
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', false)%>
|
||||
<%= t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3, "tabindex" => 12})) %>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.show_option_always') %>
|
||||
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', false, {:tabindex => next_tab_index})%>
|
||||
<%= t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3, "tabindex" => next_tab_index})) %>
|
||||
<br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false)%> <%= t('todos.recurrence.from_tickler') %><br/>
|
||||
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false, {:tabindex => next_tab_index})%> <%= t('todos.recurrence.from_tickler') %><br/>
|
||||
<br/>
|
||||
</div>
|
||||
<div class="recurring_submit_box">
|
||||
<div class="widgets">
|
||||
<button type="submit" class="positive" id="recurring_todo_new_action_submit" tabindex="15">
|
||||
<button type="submit" class="positive" id="recurring_todo_new_action_submit" tabindex="<%=next_tab_index%>">
|
||||
<%=image_tag("accept.png", :alt => "") %>
|
||||
<%= t('common.create') %>
|
||||
</button>
|
||||
<button type="button" class="positive" id="recurring_todo_new_action_cancel" tabindex="15">
|
||||
<button type="button" class="positive" id="recurring_todo_new_action_cancel" tabindex="<%=next_tab_index%>">
|
||||
<%=image_tag("cancel.png", :alt => "") %>
|
||||
<%= t('common.cancel') %>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
@initial_context_name ||= @project.default_context.name unless @project.nil? || @project.default_context.nil?
|
||||
@initial_context_name ||= @contexts.first.name unless @contexts.first.nil?
|
||||
@initial_project_name = @project.name unless @project.nil?
|
||||
reset_tab_index
|
||||
-%>
|
||||
<div id="todo_new_action_container">
|
||||
|
||||
|
|
|
|||
|
|
@ -8,27 +8,27 @@ form_for(todo, :html=> { :name=>'todo', :id => dom_id(@todo, 'form'), :class =>
|
|||
<%= content_tag(:input, "", :type=>"hidden", :name=>"_tag_name", :value=>"#{@tag_name}") if @tag_name -%>
|
||||
|
||||
<label for="<%= dom_id(@todo, 'description') %>"><%= t('common.description') %></label>
|
||||
<%= t.text_field( "description", "size" => 30, "tabindex" => 8, "maxlength" => 100) %>
|
||||
<%= t.text_field( "description", "size" => 30, "tabindex" => next_tab_index, "maxlength" => 100) %>
|
||||
|
||||
<label for="<%= dom_id(@todo, 'notes') %>"><%= t('common.notes') %></label>
|
||||
<%= t.text_area( "notes", "cols" => 29, "rows" => 4, "tabindex" => 9) %>
|
||||
<%= t.text_area( "notes", "cols" => 29, "rows" => 4, "tabindex" => next_tab_index) %>
|
||||
|
||||
<div class="project_input">
|
||||
<label for="<%= dom_id(@todo, 'project_name') %>"><%= t('common.project') %></label>
|
||||
<input id="<%= dom_id(@todo, 'project_name') %>" name="project_name" autocomplete="off" tabindex="10" size="30" type="text" value="<%= @todo.project.nil? ? 'None' : h(@todo.project.name) %>" />
|
||||
<input id="<%= dom_id(@todo, 'project_name') %>" name="project_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%= @todo.project.nil? ? 'None' : h(@todo.project.name) %>" />
|
||||
</div>
|
||||
|
||||
<div class="context_input">
|
||||
<label for="<%= dom_id(@todo, 'context_name') %>"><%= t('common.context') %></label>
|
||||
<input id="<%= dom_id(@todo, 'context_name') %>" name="context_name" autocomplete="off" tabindex="11" size="30" type="text" value="<%= h @todo.context.name %>" />
|
||||
<input id="<%= dom_id(@todo, 'context_name') %>" name="context_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%= h @todo.context.name %>" />
|
||||
</div>
|
||||
|
||||
<label class="tag_list_label" for="<%= dom_id(@todo, 'tag_list') %>"><%= t('todos.tags') %></label>
|
||||
<%= text_field_tag 'tag_list', tag_list_text, :id => dom_id(@todo, 'tag_list'), :size => 30, :tabindex => 12 %>
|
||||
<%= text_field_tag 'tag_list', tag_list_text, :id => dom_id(@todo, 'tag_list'), :size => 30, :tabindex => next_tab_index %>
|
||||
|
||||
<div class="due_input">
|
||||
<label for="<%= dom_id(@todo, 'due_label') %>"><%= Todo.human_attribute_name('due') %></label>
|
||||
<%= date_field_tag("todo[due]", dom_id(@todo, 'due'), format_date(@todo.due), "tabindex" => 13) %>
|
||||
<%= date_field_tag("todo[due]", dom_id(@todo, 'due'), format_date(@todo.due), "tabindex" => next_tab_index) %>
|
||||
<a href="#" id="<%= dom_id(@todo, 'due_x') %>" class="date_clear" title="<%= t('todos.clear_due_date') %>">
|
||||
<%= image_tag("delete_off.png", :alt => "Clear due date") %>
|
||||
</a>
|
||||
|
|
@ -36,7 +36,7 @@ form_for(todo, :html=> { :name=>'todo', :id => dom_id(@todo, 'form'), :class =>
|
|||
|
||||
<div class="show_from_input">
|
||||
<label for="<%= dom_id(@todo, 'show_from') %>"><%= t('todos.show_from') %></label>
|
||||
<%= date_field_tag("todo[show_from]", dom_id(@todo, 'show_from'), format_date(@todo.show_from), "tabindex" => 14) %>
|
||||
<%= date_field_tag("todo[show_from]", dom_id(@todo, 'show_from'), format_date(@todo.show_from), "tabindex" => next_tab_index) %>
|
||||
<a href="#" id="<%= dom_id(@todo, 'show_from_x') %>" class="date_clear" title="<%= t('todos.clear_show_from_date') %>">
|
||||
<%= image_tag("delete_off.png", :alt => "Clear show from date") %>
|
||||
</a>
|
||||
|
|
@ -49,14 +49,14 @@ form_for(todo, :html=> { :name=>'todo', :id => dom_id(@todo, 'form'), :class =>
|
|||
</ul>
|
||||
</div>
|
||||
<label id="label_for_predecessor_input" for="predecessor_input" style="display:none"><%= t('todos.add_another_dependency')%></label>
|
||||
<%= text_field_tag "predecessor_input", nil, :size => 30, :tabindex => 8 %>
|
||||
<%= text_field_tag "predecessor_input", nil, :size => 30, :tabindex => next_tab_index %>
|
||||
<%= hidden_field_tag "predecessor_list", @todo.predecessors.map{|t| t.id.to_s}.join(', ') %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="submit_box">
|
||||
<div class="widgets">
|
||||
<button type="submit" class="positive" id="<%= dom_id(@todo, 'submit') %>" tabindex="16">
|
||||
<button type="submit" class="positive" id="<%= dom_id(@todo, 'submit') %>" tabindex="<%= next_tab_index %>">
|
||||
<%=image_tag("accept.png", :alt => "") %>
|
||||
Update
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -8,23 +8,23 @@
|
|||
<div id="multiple_error_status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||
|
||||
<label for="todo_notes"><%= t('shared.multiple_next_actions') %></label>
|
||||
<%= text_area_tag( "todo[multiple_todos]", "", :cols => 29, :rows => 6, :tabindex => 2) %>
|
||||
<%= text_area_tag( "todo[multiple_todos]", "", :cols => 29, :rows => 6, :tabindex => next_tab_index) %>
|
||||
|
||||
<label for="todo_project_name"><%= t('shared.project_for_all_actions') %></label>
|
||||
<input id="multi_todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="<%=h @initial_project_name %>" />
|
||||
<input id="multi_todo_project_name" name="project_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%=h @initial_project_name %>" />
|
||||
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
|
||||
|
||||
<label for="todo_context_name"><%= t('shared.context_for_all_actions') %></label>
|
||||
<input id="multi_todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%=h @initial_context_name %>" />
|
||||
<input id="multi_todo_context_name" name="context_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%=h @initial_context_name %>" />
|
||||
<div class="page_name_auto_complete" id="context_list" style="display:none"></div>
|
||||
|
||||
<label for="tag_list"><%= t('shared.tags_for_all_actions') %></label>
|
||||
<%= text_field_tag "multi_tag_list", @default_tags, :name=>:tag_list, :size => 30, :tabindex => 5 %>
|
||||
<%= text_field_tag "multi_tag_list", @default_tags, :name=>:tag_list, :size => 30, :tabindex => next_tab_index %>
|
||||
<%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
|
||||
|
||||
<div class="submit_box">
|
||||
<div class="widgets">
|
||||
<button type="submit" class="positive" id="todo_multi_new_action_submit" tabindex="8">
|
||||
<button type="submit" class="positive" id="todo_multi_new_action_submit" tabindex="<%= next_tab_index%>">
|
||||
<%= image_tag("accept.png", :alt => "") %><%= t('shared.add_actions') %>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,30 +8,30 @@
|
|||
<div id="error_status"><%= error_messages_for("item", :object_name => 'action') %></div>
|
||||
|
||||
<label for="todo_description"><%= Todo.human_attribute_name('description') %></label>
|
||||
<%= t.text_field("description", "size" => 30, "tabindex" => 1, "maxlength" => 100, "autocomplete" => "off", :autofocus => 1) %>
|
||||
<%= t.text_field("description", "size" => 30, "tabindex" => next_tab_index, "maxlength" => 100, "autocomplete" => "off", :autofocus => 1) %>
|
||||
|
||||
<label for="todo_notes"><%= Todo.human_attribute_name('notes') %></label>
|
||||
<%= t.text_area("notes", "cols" => 29, "rows" => 6, "tabindex" => 2) %>
|
||||
<%= t.text_area("notes", "cols" => 29, "rows" => 6, "tabindex" => next_tab_index) %>
|
||||
|
||||
<label for="todo_project_name"><%= Todo.human_attribute_name('project') %></label>
|
||||
<input id="todo_project_name" name="project_name" autocomplete="off" tabindex="3" size="30" type="text" value="<%= h(@initial_project_name) %>" />
|
||||
<input id="todo_project_name" name="project_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%= h(@initial_project_name) %>" />
|
||||
<div class="page_name_auto_complete" id="project_list" style="display:none"></div>
|
||||
|
||||
<label for="todo_context_name"><%= Todo.human_attribute_name('context') %></label>
|
||||
<input id="todo_context_name" name="context_name" autocomplete="off" tabindex="4" size="30" type="text" value="<%= h(@initial_context_name) %>" />
|
||||
<input id="todo_context_name" name="context_name" autocomplete="off" tabindex="<%= next_tab_index%>" size="30" type="text" value="<%= h(@initial_context_name) %>" />
|
||||
|
||||
<label for="tag_list"><%= Todo.human_attribute_name('tags') + ' (' + t('shared.separate_tags_with_commas') + ')' %></label>
|
||||
<%= text_field_tag "tag_list", @default_tags, :size => 30, :tabindex => 5 %>
|
||||
<%= text_field_tag "tag_list", @default_tags, :size => 30, :tabindex => next_tab_index %>
|
||||
<%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
|
||||
|
||||
<div class="due_input">
|
||||
<label for="todo_due"><%= Todo.human_attribute_name('due') %></label>
|
||||
<%= t.text_field("due", "size" => 12, "class" => "Date", "tabindex" => 6, "autocomplete" => "off") %>
|
||||
<%= t.text_field("due", "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off") %>
|
||||
</div>
|
||||
|
||||
<div class="show_from_input">
|
||||
<label for="todo_show_from"><%= Todo.human_attribute_name('show_from') %></label>
|
||||
<%= t.text_field("show_from", "size" => 12, "class" => "Date", "tabindex" => 7, "autocomplete" => "off") %>
|
||||
<%= t.text_field("show_from", "size" => 12, "class" => "Date", "tabindex" => next_tab_index, "autocomplete" => "off") %>
|
||||
</div>
|
||||
|
||||
<div class="depends_on">
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
<label id="label_for_predecessor_input" for="predecessor_input" style="display:none"><%= t('todos.add_another_dependency')%></label>
|
||||
<%= text_field_tag "predecessor_input", nil, :size => 30, :tabindex => 8 %>
|
||||
<%= text_field_tag "predecessor_input", nil, :size => 30, :tabindex => next_tab_index %>
|
||||
<%= hidden_field_tag "predecessor_list", ""%>
|
||||
</div>
|
||||
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<div class="submit_box">
|
||||
<div class="widgets">
|
||||
<button type="submit" class="positive" id="todo_new_action_submit" tabindex="8">
|
||||
<button type="submit" class="positive" id="todo_new_action_submit" tabindex="<%= next_tab_index%>">
|
||||
<%= image_tag("accept.png", :alt => "") + t('shared.add_action') %>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue