Make sure that the isMailField flag is preserved when editing the fields.
This commit is contained in:
parent
18dd11345c
commit
15531fc7b0
2 changed files with 10 additions and 3 deletions
|
|
@ -7,6 +7,7 @@
|
|||
edit screen of the parent asset rather than that of the new asset. (Martin
|
||||
Kamerbeek / Oqapi).
|
||||
- fixed: Make sure that Form subclasses are found by WebGUI::Form::FieldType
|
||||
- fixed #9356: Data Form Mail Fields
|
||||
|
||||
7.6.7
|
||||
- fixed #9263: Thingy possibleValues processing, and List type autodetection.
|
||||
|
|
|
|||
|
|
@ -1164,18 +1164,21 @@ sub www_editField {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_editFieldSave {
|
||||
my $self = shift;
|
||||
return $self->session->privilege->insufficient
|
||||
my $session = $self->session;
|
||||
return $session->privilege->insufficient
|
||||
unless $self->canEdit;
|
||||
my $form = $self->session->form;
|
||||
my $form = $session->form;
|
||||
my $fieldName = $form->process('fieldName');
|
||||
my $newName = $self->session->url->urlize($form->process('newName') || $form->process('label'));
|
||||
my $newName = $session->url->urlize($form->process('newName') || $form->process('label'));
|
||||
$newName =~ tr{-/}{};
|
||||
|
||||
# Make sure we don't rename special fields
|
||||
my $isMailField = 0;
|
||||
if ($fieldName) {
|
||||
my $field = $self->getFieldConfig($fieldName);
|
||||
if ($field->{isMailField}) {
|
||||
$newName = $fieldName;
|
||||
$isMailField = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1202,6 +1205,9 @@ sub www_editFieldSave {
|
|||
vertical => $form->process("vertical", 'yesNo'),
|
||||
extras => $form->process("extras"),
|
||||
);
|
||||
if ($isMailField) {
|
||||
$field{isMailField} = 1;
|
||||
}
|
||||
|
||||
my $newSelf = $self->addRevision;
|
||||
if ($fieldName) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue