mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-07 16:24:21 +01:00
replace 'None' project by empty string, fix #440
This commit is contained in:
parent
d7944c2464
commit
a29009d3da
8 changed files with 10 additions and 12 deletions
|
|
@ -104,7 +104,6 @@ module Todos
|
|||
def project_specified_by_name?
|
||||
return false if @attributes['project_id'].present?
|
||||
return false if project_name.blank?
|
||||
return false if project_name == 'None'
|
||||
true
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1135,7 +1135,7 @@ end
|
|||
def update_project
|
||||
@project_changed = false;
|
||||
if params['todo']['project_id'].blank? && !params['project_name'].nil?
|
||||
if params['project_name'] == 'None'
|
||||
if params['project_name'].blank?
|
||||
project = Project.null_object
|
||||
else
|
||||
project = current_user.projects.where(:name => params['project_name'].strip).first
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
text_area_tag( "recurring_todo[notes]", @form_helper.notes, {:cols => 29, :rows => 6}) -%>
|
||||
|
||||
<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" size="30" type="text" value="<%= @form_helper.project.nil? ? 'None' : @form_helper.project.name.gsub(/"/,""") %>" />
|
||||
<input id="edit_recurring_todo_project_name" name="project_name" autocomplete="off" size="30" type="text" value="<%= @form_helper.project.nil? ? '' : @form_helper.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>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<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="<%= next_tab_index%>" 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? ? '' : h(@todo.project.name) %>" />
|
||||
</div>
|
||||
|
||||
<div class="context_input">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue