Code Duplication    Length = 13-13 lines in 2 locations

class/class.datafieldmanager.php 2 locations

@@ 91-103 (lines=13) @@
88
                    $form->addElement(new XoopsFormText($title, $name, 50, 250, $myts->htmlSpecialChars($value)));
89
                }
90
                break;
91
            case 'textarea':
92
                if ($custom == '1') {
93
                    $form_textarea_tray = new XoopsFormElementTray($title, '', $name);
94
                    $form_textarea_tray->addElement(new XoopsFormLabel('', '<table><tr><td>'));
95
                    $form_textarea_tray->addElement(new XoopsFormText('<b>' . _MD_CUSTOM_TITLE . '</b></td><td>', 'custom' . $name, 50, 250, $customtitle));
96
                    $form_textarea_tray->addElement(new XoopsFormLabel('', '</td></tr><tr><td>'));
97
                    $form_textarea_tray->addElement(new XoopsFormTextArea('<b>' . _MD_CUSTOM_VALUE . '</b></td><td>', $name, $value, $rows, $cols));
98
                    $form_textarea_tray->addElement(new XoopsFormLabel('', '</td></tr></table>'));
99
                    $form->addElement($form_textarea_tray);
100
                } else {
101
                    $form->addElement(new XoopsFormTextArea($title, $name, $value, $rows, $cols));
102
                }
103
                break;
104
            case 'yesno':
105
                $form->addElement(new XoopsFormRadioyn($title, $name, $value, _YES, _NO));
106
                break;
@@ 134-146 (lines=13) @@
131
                }
132
                $form->addElement($form_select);
133
                break;
134
            case 'dhtml':
135
                if ($custom == '1') {
136
                    $form_dhtmlarea_tray = new XoopsFormElementTray($title, '', $name);
137
                    $form_dhtmlarea_tray->addElement(new XoopsFormLabel('', '<table><tr><td>'));
138
                    $form_dhtmlarea_tray->addElement(new XoopsFormText('<b>' . _MD_CUSTOM_TITLE . '</b></td><td>', 'custom' . $name, 50, 250, $customtitle));
139
                    $form_dhtmlarea_tray->addElement(new XoopsFormLabel('', '</td></tr><tr><td>'));
140
                    $form_dhtmlarea_tray->addElement(new XoopsFormDhtmlTextArea('<b>' . _MD_CUSTOM_VALUE . '</b></td><td>', $name, $value, $rows, $cols));
141
                    $form_dhtmlarea_tray->addElement(new XoopsFormLabel('', '</td></tr></table>'));
142
                    $form->addElement($form_dhtmlarea_tray);
143
                } else {
144
                    $form->addElement(new XoopsFormDhtmlTextArea($title, $name, $value, $rows, $cols));
145
                }
146
                break;
147
            case 'address':
148
                //Query all address fields associated with the address type that belongs to the locid.
149
                $addressfields = getAddressFields('0');