Code Duplication    Length = 3-4 lines in 3 locations

main/lp/learnpath.class.php 3 locations

@@ 7398-7401 (lines=4) @@
7395
7396
        $form->addHeader($legend);
7397
7398
        if ($action != 'move') {
7399
            $form->addText(
7400
                'title',
7401
                get_lang('Title'),
7402
                true,
7403
                ['id' => 'idTitle', 'class' => 'learnpath_item_form']
7404
            );
@@ 8451-8454 (lines=4) @@
8448
8449
        $form->addHeader($legend);
8450
8451
        if ($action != 'move') {
8452
            $form->addText('title', get_lang('Title'), true, ['class' => 'learnpath_item_form']);
8453
            $defaults['title'] = $item_title;
8454
        }
8455
8456
        $selectParent = $form->addSelect(
8457
            'parent',
@@ 8656-8658 (lines=3) @@
8653
            $form->addHeader(get_lang('EditCurrentStudentPublication'));
8654
        }
8655
8656
        if ($action != 'move') {
8657
            $form->addText('title', get_lang('Title'), true, ['class' => 'learnpath_item_form', 'id' => 'idTitle']);
8658
        }
8659
8660
        $parentSelect = $form->addSelect(
8661
            'parent',