reset isDefault to 0 on copy, 8921
This commit is contained in:
parent
5e967d9b82
commit
913ed8ec26
3 changed files with 25 additions and 3 deletions
|
|
@ -105,6 +105,22 @@ sub definition {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 duplicate
|
||||
|
||||
Subclass the duplicate method so that the isDefault flag is set to 0 on any
|
||||
copy.
|
||||
|
||||
=cut
|
||||
|
||||
sub duplicate {
|
||||
my $self = shift;
|
||||
my $newTemplate = $self->SUPER::duplicate;
|
||||
$newTemplate->update({isDefault => 0});
|
||||
return $newTemplate;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue