param('titleWidth', 80) ->setTitle(_t('@bills', 'Operations with user account')) ->tab('inc', _t('@bills', 'Balance Top Up')) ->divider(function() use($form){ $user = $form->_data(); return '
'. _t('@bills', 'Top Up [user_email]\'s balance with the amount:', [ 'user_email' => ''. (! empty($user['email']) ? $user['email'] : $user['phone_number']) .'' ]) .'
'; }) ->text('inc_amount', _t('@bills', 'Amount'), '0', false) ->param('attr', ['placeholder' => '0.00']) ->width(70) ->label(Currency::default()) ->rule(TYPE_UNUM) ->text('inc_description', _t('@bills', 'Description'), _t('@bills', 'Gift from the administration'), false) ->checkbox('inc_enotify') ->label(_t('@bills', 'Send notification to the user')) ->tab('dec', _t('@bills', 'Debit the Account')) ->divider(function() use($form){ $user = $form->_data(); return ''. _t('@bills', 'Write off the specified amount from the account [user_email]:', [ 'user_email' => ''. (! empty($user['email']) ? $user['email'] : $user['phone_number']) .'' ]) .'
'; }) ->text('dec_amount', _t('@bills', 'Amount'), '0', false) ->param('attr', ['placeholder' => '0.00']) ->width(70) ->label(Currency::default()) ->rule(TYPE_UNUM) ->text('dec_description', _t('@bills', 'Description'), _t('@bills', 'Account write-off'), false) ->checkbox('dec_enotify') ->label(_t('@bills', 'Send notification to the user')) ->text('operation', '', $this->input->get('ftab', TYPE_STR) ? $this->input->get('ftab', TYPE_STR) : 'inc', false) ->hidden(function(){ return true;}) ->formJavascript('onReady', function(){ return 'returnToList = true;'; }) ->buttonSubmit() ->buttonCancel() ->contentWrapper(function($html) use ($form){ ?> = $html ?>