mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Merge pull request #80 from maddentim/fixes
Fix for #1291 - Adding todo to mobile interface does not save tag
This commit is contained in:
commit
f6d08a9cf5
4 changed files with 7 additions and 7 deletions
|
|
@ -1424,8 +1424,8 @@ class TodosController < ApplicationController
|
|||
end
|
||||
|
||||
def update_tags
|
||||
if params[:tag_list]
|
||||
@todo.tag_with(params[:tag_list])
|
||||
if params[:todo_tag_list]
|
||||
@todo.tag_with(params[:todo_tag_list])
|
||||
@todo.tags(true) #force a reload for proper rendering
|
||||
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 %>" />
|
||||
</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 => next_tab_index %>
|
||||
<label class="tag_list_label" for="<%= dom_id(@todo, 'todo_tag_list') %>"><%= t('todos.tags') %></label>
|
||||
<%= 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">
|
||||
<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 -%>
|
||||
<h2><label for="todo_description"><%= t('common.description') %></label></h2>
|
||||
<%= text_field( "todo", "description", "tabindex" => 1, "maxlength" => 100, "size" => 50) %>
|
||||
<h2><label for="tag_list"><%= t('todos.tags') %></label></h2>
|
||||
<%= text_field_tag "tag_list", @tag_list_text, :size => 50, :tabindex => 2 %>
|
||||
<h2><label for="todo_tag_list"><%= t('todos.tags') %></label></h2>
|
||||
<%= text_field_tag "todo_tag_list", @tag_list_text, :size => 50, :tabindex => 2 %>
|
||||
<h2><label for="todo_context_id"><%= t('common.context') %></label></h2>
|
||||
<%= unless @mobile_from_context
|
||||
collection_select( "todo", "context_id", @contexts, "id", "name", {}, {"tabindex" => 3} )
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ table.c {
|
|||
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%;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue