[#2279] Added an empty select field for the statuses.
This commit is contained in:
@@ -22,6 +22,11 @@ class OverheadTimesheetHook < Redmine::Hook::ViewListener
|
|||||||
|
|
||||||
# Added a new field for filtering based on "billable?"
|
# Added a new field for filtering based on "billable?"
|
||||||
def plugin_timesheet_views_timesheet_form(context={})
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ describe OverheadTimesheetHook, "#plugin_timesheet_views_timesheet_form", :type
|
|||||||
response.should have_tag('label[class=?][for=?]', 'select_all', 'timesheet[billable][]')
|
response.should have_tag('label[class=?][for=?]', 'select_all', 'timesheet[billable][]')
|
||||||
end
|
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'
|
it 'should pre-select the values from the submission'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user