Created
January 29, 2018 18:46
-
-
Save andronex/7ea93bc4ad3386e2808355266b2041e3 to your computer and use it in GitHub Desktop.
Для вывода сообщения об ошибке через API Office с добавлением массива данных в data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($modx->context->key != 'mgr') { | |
switch ($modx->event->name) { | |
// Событие перед регистрацией пользователя | |
case 'OnBeforeUserFormSave': | |
******************************************************************** код ****************************************** | |
$modx->error->errors[] = array('changedriverphone' => true); //вывод в массив data | |
$modx->error->errors[] = array('id_driver' => (int)$_POST['id_driver'][$di]); //вывод в массив data | |
$modx->event->output('Вы уверены, что хотите сменить номер телефона водителя '. $modx->stripTags($_POST['driver-evacuator-name'][$di]) .' с '. $oldPhone .' на '. $newPhone .' ?<br>'); //вывод в message | |
******************************************************************** код ****************************************** | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment