Projekt

Allgemein

Profil

GX-Bug #52604 » StepInputFix.patch

Till Tepelmann, 21.07.2017 10:28

Unterschiede anzeigen:

src/admin/includes/functions/general.php (revision )
2598 2598
}
2599 2599

  
2600 2600
/**
2601
 * Creates an input field of type number for configuration values which are not allowed to be empty and can have decimal
2602
 * IMPORTANT NOTE: name attribute gets replaced on admin/configuration.php:839
2603
 *
2604
 * @param string $name Value of name attribute.
2605
 * @param string|double       $step
2606
 *
2607
 * @return string Input element of type number.
2608
 */
2609
function cfg_number_required_step_input($step,$name)
2610
{
2611
	return '<input type="number" step="' . $step . '" min="0" name="configuration_value" value="' . $name . '" required/>';
2612
}
2613

  
2614
/**
2601 2615
 * Creates an input field of type email for configuration values.
2602 2616
 * IMPORTANT NOTE: name attribute gets replaced on admin/configuration.php:839
2603 2617
 *
......
2623 2637
function cfg_number_required_min_max_input($min, $max, $name)
2624 2638
{
2625 2639
	return '<input type="number" min="' . $min . '" max="' . $max . '" name="configuration_value" value="' . $name
2640
	       . '" required />';
2641
}
2642

  
2643
/**
2644
 * Creates an input field of type number for configuration values that are required an must have min and max with step
2645
 * IMPORTANT NOTE: name attribute gets replaced on admin/configuration.php:839
2646
 *
2647
 * @param string|int        $min Allowed minimum value of input field.
2648
 * @param string|int        $max
2649
 * @param string|double     $step
2650
 * @param string $name Value of name attribute.
2651
 *
2652
 * @return string Input element of type number.
2653
 */
2654
function cfg_number_required_min_max_step_input($min, $max, $step, $name)
2655
{
2656
	return '<input type="number" step="' . $step .'" min="' . $min . '" max="' . $max . '" name="configuration_value" value="' . $name
2626 2657
	       . '" required />';
2627 2658
}
2628 2659

  
    (1-1/1)