Revision 0db760fd
Von Bernd Bleßmann vor mehr als 7 Jahren hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
681 | 681 |
my $params = delete($::form->{part}) || { }; |
682 | 682 |
|
683 | 683 |
delete $params->{id}; |
684 |
# never overwrite existing partnumber for parts in use, should be a read-only field in that case anyway |
|
685 |
delete $params->{partnumber} if $self->part->partnumber and $self->part->used_in_record; |
|
686 | 684 |
$self->part->assign_attributes(%{ $params}); |
687 | 685 |
$self->part->bin_id(undef) unless $self->part->warehouse_id; |
688 | 686 |
|
templates/webpages/part/_basic_data.html | ||
---|---|---|
19 | 19 |
<table id="ic3"> |
20 | 20 |
<tr> |
21 | 21 |
<th align="right">[% 'Part Number' | $T8 %]</th> |
22 |
[% SET readonly = 1 %] |
|
23 |
[%- IF !SELF.part.id or !SELF.part.used_in_record %][% readonly = 0 %][% END %] |
|
24 |
<td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, readonly=readonly class="initial_focus") %]</td> |
|
22 |
<td>[% L.input_tag("part.partnumber", SELF.part.partnumber, size=40, class="initial_focus") %]</td> |
|
25 | 23 |
</tr> |
26 | 24 |
<tr> |
27 | 25 |
<th align="right">[% 'Part Classification' | $T8 %]</th> |
... | ... | |
239 | 237 |
<td><hr size="3" noshade></td> |
240 | 238 |
</tr> |
241 | 239 |
</table> |
242 |
|
Auch abrufbar als: Unified diff
Part Controller - Artikelnummern immer änderbar
behebt #264 (redmine)