Code Duplication    Length = 26-26 lines in 2 locations

src/projects/fcreate.php 1 location

@@ 672-697 (lines=26) @@
669
670
// generate controls for 'decimal' field
671
672
elseif ($form == 'floatform')
673
{
674
    $xml .= '<control name="min_value" required="' . get_html_resource(RES_REQUIRED3_ID) . '">'
675
          . '<label>' . get_html_resource(RES_MIN_VALUE_ID) . '</label>'
676
          . '<editbox maxlen="' . ustrlen(MIN_FIELD_FLOAT) . '">'
677
          . ustr2html($min_value)
678
          . '</editbox>'
679
          . '</control>';
680
681
    $xml .= '<control name="max_value" required="' . get_html_resource(RES_REQUIRED3_ID) . '">'
682
          . '<label>' . get_html_resource(RES_MAX_VALUE_ID) . '</label>'
683
          . '<editbox maxlen="' . ustrlen(MAX_FIELD_FLOAT) . '">'
684
          . ustr2html($max_value)
685
          . '</editbox>'
686
          . '</control>';
687
688
    $xml .= '<control name="def_value">'
689
          . '<label>' . get_html_resource(RES_DEFAULT_VALUE_ID) . '</label>'
690
          . '<editbox maxlen="' . ustrlen(MAX_FIELD_FLOAT) . '">'
691
          . ustr2html($def_value)
692
          . '</editbox>'
693
          . '</control>';
694
695
    $notes .= '<note>' . ustrprocess(get_html_resource(RES_ALERT_DECIMAL_VALUE_OUT_OF_RANGE_ID), MIN_FIELD_FLOAT, MAX_FIELD_FLOAT) . '</note>'
696
            . '<note>' . get_html_resource(RES_ALERT_MIN_MAX_VALUES_ID) . '</note>';
697
}
698
699
// generate controls for 'string' field
700

src/projects/fmodify.php 1 location

@@ 444-469 (lines=26) @@
441
442
// generate controls for 'decimal' field
443
444
elseif ($field['field_type'] == FIELD_TYPE_FLOAT)
445
{
446
    $xml .= '<control name="min_value" required="' . get_html_resource(RES_REQUIRED3_ID) . '">'
447
          . '<label>' . get_html_resource(RES_MIN_VALUE_ID) . '</label>'
448
          . '<editbox maxlen="' . ustrlen(MIN_FIELD_FLOAT) . '">'
449
          . ustr2html($param1)
450
          . '</editbox>'
451
          . '</control>';
452
453
    $xml .= '<control name="max_value" required="' . get_html_resource(RES_REQUIRED3_ID) . '">'
454
          . '<label>' . get_html_resource(RES_MAX_VALUE_ID) . '</label>'
455
          . '<editbox maxlen="' . ustrlen(MAX_FIELD_FLOAT) . '">'
456
          . ustr2html($param2)
457
          . '</editbox>'
458
          . '</control>';
459
460
    $xml .= '<control name="def_value">'
461
          . '<label>' . get_html_resource(RES_DEFAULT_VALUE_ID) . '</label>'
462
          . '<editbox maxlen="' . ustrlen(MAX_FIELD_FLOAT) . '">'
463
          . ustr2html($default)
464
          . '</editbox>'
465
          . '</control>';
466
467
    $notes .= '<note>' . ustrprocess(get_html_resource(RES_ALERT_DECIMAL_VALUE_OUT_OF_RANGE_ID), MIN_FIELD_FLOAT, MAX_FIELD_FLOAT) . '</note>'
468
            . '<note>' . get_html_resource(RES_ALERT_MIN_MAX_VALUES_ID) . '</note>';
469
}
470
471
// generate controls for 'string' field
472