mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
check field add poll
This commit is contained in:
parent
ff0da0cf49
commit
60207dc361
@ -250,7 +250,10 @@ class PollController extends EmailsController {
|
|||||||
|
|
||||||
// emails
|
// emails
|
||||||
$newpoll->setMailOnComment( true );
|
$newpoll->setMailOnComment( true );
|
||||||
|
if(isset($data['isOwnerNotifiedByEmailOnNewVote'])){
|
||||||
|
|
||||||
$newpoll->setMailOnVote( $data['isOwnerNotifiedByEmailOnNewVote'] );
|
$newpoll->setMailOnVote( $data['isOwnerNotifiedByEmailOnNewVote'] );
|
||||||
|
}
|
||||||
$newpoll->setDescription( $data['description'] );
|
$newpoll->setDescription( $data['description'] );
|
||||||
$newpoll->setHideResults( false );
|
$newpoll->setHideResults( false );
|
||||||
// possible answers
|
// possible answers
|
||||||
@ -278,7 +281,7 @@ class PollController extends EmailsController {
|
|||||||
elseif ( $data[ 'kind' ] == 'date' ) {
|
elseif ( $data[ 'kind' ] == 'date' ) {
|
||||||
|
|
||||||
$choices = $data[ 'dateChoices' ];
|
$choices = $data[ 'dateChoices' ];
|
||||||
if ( $data[ 'hasSeveralHours' ] == true ) {
|
if ( isset($data[ 'hasSeveralHours' ]) && $data[ 'hasSeveralHours' ] == true ) {
|
||||||
// different hours spans make more choices
|
// different hours spans make more choices
|
||||||
|
|
||||||
foreach ( $choices as $c ) {
|
foreach ( $choices as $c ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user