mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
fix for mobile new todo tags no being saved
the mobile interface shares the form for creating and updating todos. the todo controller was using different names for them. this change aligns them.
This commit is contained in:
parent
c8947519b7
commit
b932ac210f
4 changed files with 7 additions and 7 deletions
|
@ -1424,8 +1424,8 @@ class TodosController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_tags
|
def update_tags
|
||||||
if params[:tag_list]
|
if params[:todo_tag_list]
|
||||||
@todo.tag_with(params[:tag_list])
|
@todo.tag_with(params[:todo_tag_list])
|
||||||
@todo.tags(true) #force a reload for proper rendering
|
@todo.tags(true) #force a reload for proper rendering
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,8 +23,8 @@ form_for(todo, :html=> { :name=>'todo', :id => dom_id(@todo, 'form'), :class =>
|
||||||
<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 %>" />
|
<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>
|
</div>
|
||||||
|
|
||||||
<label class="tag_list_label" for="<%= dom_id(@todo, 'tag_list') %>"><%= t('todos.tags') %></label>
|
<label class="tag_list_label" for="<%= dom_id(@todo, 'todo_tag_list') %>"><%= t('todos.tags') %></label>
|
||||||
<%= text_field_tag 'tag_list', tag_list_text, :id => dom_id(@todo, 'tag_list'), :size => 30, :tabindex => next_tab_index %>
|
<%= text_field_tag 'todo_tag_list', tag_list_text, :id => dom_id(@todo, 'todo_tag_list'), :size => 30, :tabindex => next_tab_index %>
|
||||||
|
|
||||||
<div class="due_input">
|
<div class="due_input">
|
||||||
<label for="<%= dom_id(@todo, 'due_label') %>"><%= Todo.human_attribute_name('due') %></label>
|
<label for="<%= dom_id(@todo, 'due_label') %>"><%= Todo.human_attribute_name('due') %></label>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<% this_year = current_user.time.to_date.strftime("%Y").to_i -%>
|
<% this_year = current_user.time.to_date.strftime("%Y").to_i -%>
|
||||||
<h2><label for="todo_description"><%= t('common.description') %></label></h2>
|
<h2><label for="todo_description"><%= t('common.description') %></label></h2>
|
||||||
<%= text_field( "todo", "description", "tabindex" => 1, "maxlength" => 100, "size" => 50) %>
|
<%= text_field( "todo", "description", "tabindex" => 1, "maxlength" => 100, "size" => 50) %>
|
||||||
<h2><label for="tag_list"><%= t('todos.tags') %></label></h2>
|
<h2><label for="todo_tag_list"><%= t('todos.tags') %></label></h2>
|
||||||
<%= text_field_tag "tag_list", @tag_list_text, :size => 50, :tabindex => 2 %>
|
<%= text_field_tag "todo_tag_list", @tag_list_text, :size => 50, :tabindex => 2 %>
|
||||||
<h2><label for="todo_context_id"><%= t('common.context') %></label></h2>
|
<h2><label for="todo_context_id"><%= t('common.context') %></label></h2>
|
||||||
<%= unless @mobile_from_context
|
<%= unless @mobile_from_context
|
||||||
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 3} )
|
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 3} )
|
||||||
|
|
|
@ -230,7 +230,7 @@ table.c {
|
||||||
display:inline;
|
display:inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
input#todo_description, input#tag_list, textarea#todo_notes, select#todo_project_id, select#todo_context_id {
|
input#todo_description, input#todo_tag_list, textarea#todo_notes, select#todo_project_id, select#todo_context_id {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue