| @@ 405-422 (lines=18) @@ | ||
| 402 | )); |
|
| 403 | ||
| 404 | $partners = $this->getPartners(); |
|
| 405 | if (count($partners) <= 1) { |
|
| 406 | $this->add(array( |
|
| 407 | 'name' => 'partner', |
|
| 408 | 'type' => 'Zend\Form\Element\Hidden', |
|
| 409 | 'attributes' => array( |
|
| 410 | 'value' => 0 |
|
| 411 | ) |
|
| 412 | )); |
|
| 413 | } else { |
|
| 414 | $this->add(array( |
|
| 415 | 'type' => 'Zend\Form\Element\Select', |
|
| 416 | 'name' => 'partner', |
|
| 417 | 'options' => array( |
|
| 418 | 'value_options' => $partners, |
|
| 419 | 'label' => $translator->translate('Sponsor', 'playgroundgame') |
|
| 420 | ) |
|
| 421 | )); |
|
| 422 | } |
|
| 423 | ||
| 424 | $fbAppIds = $this->getFbAppIds(); |
|
| 425 | $fbAppIds_label = array(); |
|
| @@ 28-46 (lines=19) @@ | ||
| 25 | )); |
|
| 26 | ||
| 27 | $categories = $this->getPrizeCategories(); |
|
| 28 | if (count($categories) == 0) { |
|
| 29 | $this->add(array( |
|
| 30 | 'name' => 'prizeCategory', |
|
| 31 | 'type' => 'Zend\Form\Element\Hidden', |
|
| 32 | 'attributes' => array( |
|
| 33 | 'value' => 0 |
|
| 34 | ) |
|
| 35 | )); |
|
| 36 | } else { |
|
| 37 | $this->add(array( |
|
| 38 | 'type' => 'Zend\Form\Element\MultiCheckbox', |
|
| 39 | 'name' => 'prizeCategory', |
|
| 40 | 'options' => array( |
|
| 41 | 'value_options' => $categories, |
|
| 42 | 'label' => $translator->translate('Catégorie de gain', 'playgroundgame') |
|
| 43 | ), |
|
| 44 | 'attributes' => array() |
|
| 45 | )); |
|
| 46 | } |
|
| 47 | ||
| 48 | $submitElement = new Element\Button('submit'); |
|
| 49 | $submitElement->setLabel($translator->translate('Create', 'playgroundgame')) |
|