Revision 6f90b1ba
Von Moritz Bunkus vor fast 8 Jahren hinzugefügt
SL/Controller/RequirementSpec.pm | ||
---|---|---|
66 | 66 |
$self->requirement_spec->$_($self->copy_source->$_) for qw(type_id status_id customer_id title hourly_rate is_template) |
67 | 67 |
} |
68 | 68 |
|
69 |
$self->_setup_form_action_bar; |
|
70 |
|
|
69 | 71 |
$self->render('requirement_spec/new', title => $self->requirement_spec->is_template ? t8('Create a new requirement spec template') : t8('Create a new requirement spec')); |
70 | 72 |
} |
71 | 73 |
|
... | ... | |
682 | 684 |
return !!$template; |
683 | 685 |
} |
684 | 686 |
|
687 |
sub _setup_form_action_bar { |
|
688 |
my ($self) = @_; |
|
689 |
|
|
690 |
for my $bar ($::request->layout->get('actionbar')) { |
|
691 |
$bar->add( |
|
692 |
action => [ |
|
693 |
t8('Save'), |
|
694 |
submit => [ '#basic_settings_form', { action => 'RequirementSpec/' . ($self->requirement_spec->id ? 'update' : 'create') } ], |
|
695 |
accesskey => 'enter', |
|
696 |
], |
|
697 |
|
|
698 |
link => [ |
|
699 |
t8('Abort'), |
|
700 |
link => $self->url_for(action => 'list', is_template => $self->requirement_spec->is_template), |
|
701 |
], |
|
702 |
); |
|
703 |
} |
|
704 |
} |
|
705 |
|
|
685 | 706 |
1; |
templates/webpages/requirement_spec/_form.html | ||
---|---|---|
68 | 68 |
[%- END %] |
69 | 69 |
|
70 | 70 |
<p> |
71 |
[% IF submit_as == 'post' %] |
|
72 |
[% L.hidden_tag("action", "RequirementSpec/dispatch", id=id_prefix _ '_action') %] |
|
73 |
[% L.submit_tag("action_" _ (SELF.requirement_spec.id ? "update" : "create"), LxERP.t8('Save'), id=id_prefix _ '_action_update') %] |
|
74 |
<a href="[% SELF.url_for(action="list", is_template=SELF.requirement_spec.is_template) %]">[% LxERP.t8('Abort') %]</a> |
|
75 |
[% ELSE %] |
|
71 |
[% IF submit_as != 'post' %] |
|
76 | 72 |
[% L.ajax_submit_tag("controller.pl?action=RequirementSpec/update", "#" _ id_prefix, LxERP.t8("Save"), id=id_prefix _ '_submit') %] |
77 | 73 |
<script type="text/javascript"><!-- |
78 | 74 |
$(function() { |
Auch abrufbar als: Unified diff
ActionBar: Verwendung im Pflichtenheft-Controller