param('titleWidth', 70)
->setTitle(_t('@bills', 'Change bill status').' ')
->select('status', _t('@bills', 'Status'), false, function () {
$statuses = Bills::getStatusData();
unset($statuses[Bills::STATUS_PROCESSING]);
unset($statuses[Bills::STATUS_WAITING]);
return $statuses;
}, false, ['optionsID' => false, 'optionsTitle' => false])
->divider(function() use ($form){ $data = $form->_data();
$user = Users::model()->userData($data['user_id'], ['login']);
return '
'._t('@bills', 'After changing the status to "[status]", the amount of [amount] will be credited to the account of the user [user_link].', [
'status' => '
'._t('@bills', 'completed').'',
'user_link' => '
'.(isset($user['login']) ? $user['login'] : '').'',
'amount' => Currency::formatPriceAndCurrency($data['amount']),
]).'
';
})
->formJavascript('onReady', function(){ return 'returnToList = true;'; })
->buttonSubmit()
->buttonCancel()
->buttonHref(_t('@bills', 'check'), function () use ($form) { ?> ['class' => ['hidden']]])
->buttonHref(_t('@bills', 'extra'), function () use ($form) { ?> ['class' => ['hidden']]])
->contentWrapper(function($html) use ($form) { ?>
= $html ?>