my ($self) = @_;
my $html = $self->render('requirement_spec/_edit_time_and_cost_estimate', { output => 0 });
+ my $first = ($self->requirement_spec->sections_sorted || [])->[0];
+ $first = ($first->children_sorted || [])->[0] if $first;
$self->js
->hide('#time_cost_estimate')
->after('#time_cost_estimate', $html)
->on('#time_cost_estimate INPUT[type=text]', 'keydown', 'kivi.requirement_spec.time_cost_estimate_input_key_down')
+ ->action_if($first && $first->id, 'focus', '#time_and_cost_estimate_form_complexity_id_' . $first->id)
->render($self);
}
[%- P.simple_format(item.fb_number _ ": " _ item.description) -%]
</td>
<td>
- [%- L.select_tag('requirement_spec_items[].complexity_id', SELF.complexities, id=id_prefix _ '_complexity_id', title_key='description', default=item.complexity_id, style="width: 100%") %]<br>
+ [%- L.select_tag('requirement_spec_items[].complexity_id', SELF.complexities, id=id_prefix _ '_complexity_id_' _ item.id, title_key='description', default=item.complexity_id, style="width: 100%") %]<br>
</td>
<td>
- [%- L.select_tag('requirement_spec_items[].risk_id', SELF.risks, id=id_prefix _ '_risk_id', title_key='description', default=item.risk_id, style="width: 100%") %]<br>
+ [%- L.select_tag('requirement_spec_items[].risk_id', SELF.risks, id=id_prefix _ '_risk_id_' _ item.id, title_key='description', default=item.risk_id, style="width: 100%") %]<br>
</td>
[%- IF !item.children.size -%]
<td align="right" nowrap>[%- P.man_days_tag('requirement_spec_items[].time_estimation', item, id=id_prefix _ '_time_estimation') %]</td>