forked from GNUsocial/gnu-social
[Poll] Added variable num of options
not sure if it is the right way to do it
This commit is contained in:
@@ -30,6 +30,13 @@ use Symfony\Component\Form\Form as SymfForm;
|
||||
const MAX_OPT = 5;
|
||||
class NewPollForm extends Form
|
||||
{
|
||||
/**
|
||||
* Creates a form with variable num of fields
|
||||
*
|
||||
* @param int $optionNum
|
||||
*
|
||||
* @return SymfForm
|
||||
*/
|
||||
public static function make(int $optionNum): SymfForm
|
||||
{
|
||||
$optionNum = min(MAX_OPT,$optionNum);
|
||||
|
Reference in New Issue
Block a user