Code Duplication    Length = 3-4 lines in 3 locations

main/lp/learnpath.class.php 3 locations

@@ 7350-7353 (lines=4) @@
7347
7348
        $form->addHeader($legend);
7349
7350
        if ($action != 'move') {
7351
            $form->addText(
7352
                'title',
7353
                get_lang('Title'),
7354
                true,
7355
                ['id' => 'idTitle', 'class' => 'learnpath_item_form']
7356
            );
@@ 8403-8406 (lines=4) @@
8400
8401
        $form->addHeader($legend);
8402
8403
        if ($action != 'move') {
8404
            $form->addText('title', get_lang('Title'), true, ['class' => 'learnpath_item_form']);
8405
            $defaults['title'] = $item_title;
8406
        }
8407
8408
        $selectParent = $form->addSelect(
8409
            'parent',
@@ 8608-8610 (lines=3) @@
8605
            $form->addHeader(get_lang('EditCurrentStudentPublication'));
8606
        }
8607
8608
        if ($action != 'move') {
8609
            $form->addText('title', get_lang('Title'), true, ['class' => 'learnpath_item_form', 'id' => 'idTitle']);
8610
        }
8611
8612
        $parentSelect = $form->addSelect(
8613
            'parent',