|
@@ -119,6 +119,7 @@ class ONUAdmin extends WorkflowBaseAdmin
|
|
|
$id = $subject->getId();
|
|
|
$readonly = is_null($id) ? false : 'readonly';
|
|
|
$disabled = is_null($id) ? false : 'disabled';
|
|
|
+ $servicePortAdd = is_null($id) ? true : false;
|
|
|
$flashbag = $this->get('session')->getFlashBag();
|
|
|
if ($id) {
|
|
|
$flashbag->add('warning', $this->trans('warning.disabled.fields'));
|
|
@@ -293,8 +294,8 @@ class ONUAdmin extends WorkflowBaseAdmin
|
|
|
->with('Huawei', ['class' => "col-md-12 {$hidden['Huawei']} olt_mark Huawei"])
|
|
|
->add('servicePorts', CollectionType::class, array(
|
|
|
'entry_type' => "FTTHBundle\\Form\\ServicePortType",
|
|
|
- 'allow_add' => true,
|
|
|
- 'allow_delete' => true,
|
|
|
+ 'allow_add' => $servicePortAdd,
|
|
|
+ 'allow_delete' => false,
|
|
|
'required' => false,
|
|
|
'by_reference' => false,
|
|
|
'disabled' => $disabled,
|