[#2279] Added an empty select field for the statuses.

This commit is contained in:
Eric Davis
2009-04-22 11:42:06 -07:00
parent b4fbbde01a
commit 467c1259d8
2 changed files with 11 additions and 2 deletions

View File

@@ -22,6 +22,11 @@ class OverheadTimesheetHook < Redmine::Hook::ViewListener
# Added a new field for filtering based on "billable?"
def plugin_timesheet_views_timesheet_form(context={})
context[:controller].send(:render_to_string, :partial => 'timesheet/overhead_form', :layout => false)
context[:controller].send(:render_to_string,
:partial => 'timesheet/overhead_form',
:layout => false,
:locals => {
:list_size => context[:list_size] || 5
})
end
end

View File

@@ -58,6 +58,10 @@ describe OverheadTimesheetHook, "#plugin_timesheet_views_timesheet_form", :type
response.should have_tag('label[class=?][for=?]', 'select_all', 'timesheet[billable][]')
end
it 'should add a multple select field called "billable"'
it 'should add a multple select field called "billable"' do
response = call_hook(:plugin_timesheet_views_timesheet_form, {})
response.should have_tag('select[name=?][multiple=multiple]', 'timesheet[billable][]')
end
it 'should pre-select the values from the submission'
end