Code Duplication    Length = 3-4 lines in 4 locations

class/form.php 4 locations

@@ 477-480 (lines=4) @@
474
	 */
475
	protected function GetElementHidden($elt) {
476
		$s_html = $this->GetHtmlInput($elt);
477
		if (isset($elt['value']))
478
			$s_html = str_replace('/>'
479
				, ' value="' . $elt['value'] . '" />'
480
				, $s_html);
481
		return $s_html;
482
	} // end of func GetElementHidden
483
@@ 501-504 (lines=4) @@
498
				, $s_html);
499
500
		// Label is alt text
501
		if (isset($elt['label']))
502
			$s_html = str_replace('/>'
503
				, 'alt="' . $elt['label'] . '" />'
504
				, $s_html);
505
506
		return $s_html;
507
	} // end of func GetElementImage
@@ 662-664 (lines=3) @@
659
		$s_html = $this->GetHtmlInput($elt);
660
		$s_html = str_replace('<input', '<button', $s_html);
661
		// Can have value, alough useless
662
		if (isset($elt['value']))
663
			$s_html = str_replace('/>', 'value="' . $elt['value'] . '" />'
664
				, $s_html);
665
		// Label set bteween tags
666
		if (isset($elt['label']))
667
			$s_html = str_replace('/>', '>' . $elt['label'] . '</button>'
@@ 666-668 (lines=3) @@
663
			$s_html = str_replace('/>', 'value="' . $elt['value'] . '" />'
664
				, $s_html);
665
		// Label set bteween tags
666
		if (isset($elt['label']))
667
			$s_html = str_replace('/>', '>' . $elt['label'] . '</button>'
668
				, $s_html);
669
		return $s_html;
670
	} // end of func GetElementButtonX
671