Commit 035a456d authored by BohdanDmytryshyn's avatar BohdanDmytryshyn
Browse files

Merge branch 'php-error' into 'master'

php fatal Error: Call to a member function getAction() on array in...

See merge request !37
parents 404e0872 dbadd502
...@@ -619,8 +619,7 @@ function civimobileapi_civicrm_navigationMenu(&$menu) { ...@@ -619,8 +619,7 @@ function civimobileapi_civicrm_navigationMenu(&$menu) {
*/ */
function civimobileapi_civicrm_buildForm($formName, &$form) { function civimobileapi_civicrm_buildForm($formName, &$form) {
civimobile_add_qr_popup(); civimobile_add_qr_popup();
$action = $form->getAction(); if ($formName == 'CRM_Event_Form_ManageEvent_EventInfo' && $form->getAction() == CRM_Core_Action::ADD) {
if ($formName == 'CRM_Event_Form_ManageEvent_EventInfo' && $action == CRM_Core_Action::ADD) {
$templatePath = realpath(dirname(__FILE__)."/templates"); $templatePath = realpath(dirname(__FILE__)."/templates");
$form->add('checkbox', 'default_qrcode_checkin_event', ts('When generating QR Code tokens, use this Event')); $form->add('checkbox', 'default_qrcode_checkin_event', ts('When generating QR Code tokens, use this Event'));
...@@ -633,7 +632,7 @@ function civimobileapi_civicrm_buildForm($formName, &$form) { ...@@ -633,7 +632,7 @@ function civimobileapi_civicrm_buildForm($formName, &$form) {
]); ]);
} }
if ($formName == 'CRM_Event_Form_Participant' && $action == CRM_Core_Action::ADD) { if ($formName == 'CRM_Event_Form_Participant' && $form->getAction() == CRM_Core_Action::ADD) {
$elementName = 'send_receipt'; $elementName = 'send_receipt';
if ($form->elementExists($elementName)) { if ($form->elementExists($elementName)) {
$element = $form->getElement($elementName); $element = $form->getElement($elementName);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment