mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
update creation transaction and layout
This commit is contained in:
parent
f131a4111b
commit
c31e33c34a
33
composer.lock
generated
33
composer.lock
generated
@ -613,16 +613,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/log",
|
"name": "psr/log",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/log.git",
|
"url": "https://github.com/php-fig/log.git",
|
||||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
|
"reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
"url": "https://api.github.com/repos/php-fig/log/zipball/bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2",
|
||||||
"reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
|
"reference": "bf73deb2b3b896a9d9c75f3f0d88185d2faa27e2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -631,7 +631,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "1.1.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -656,7 +656,7 @@
|
|||||||
"psr",
|
"psr",
|
||||||
"psr-3"
|
"psr-3"
|
||||||
],
|
],
|
||||||
"time": "2018-11-20T15:27:04+00:00"
|
"time": "2019-10-25T08:06:51+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/simple-cache",
|
"name": "psr/simple-cache",
|
||||||
@ -2468,16 +2468,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.2.4",
|
"version": "v4.2.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4"
|
"reference": "b76bbc3c51f22c570648de48e8c2d941ed5e2cf2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/97e59c7a16464196a8b9c77c47df68e4a39a45c4",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/b76bbc3c51f22c570648de48e8c2d941ed5e2cf2",
|
||||||
"reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4",
|
"reference": "b76bbc3c51f22c570648de48e8c2d941ed5e2cf2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2485,6 +2485,7 @@
|
|||||||
"php": ">=7.0"
|
"php": ">=7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"ircmaxell/php-yacc": "0.0.4",
|
||||||
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
|
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0"
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
@ -2515,7 +2516,7 @@
|
|||||||
"parser",
|
"parser",
|
||||||
"php"
|
"php"
|
||||||
],
|
],
|
||||||
"time": "2019-09-01T07:51:21+00:00"
|
"time": "2019-10-25T18:33:07+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phar-io/manifest",
|
"name": "phar-io/manifest",
|
||||||
@ -3953,16 +3954,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "squizlabs/php_codesniffer",
|
"name": "squizlabs/php_codesniffer",
|
||||||
"version": "3.5.1",
|
"version": "3.5.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||||
"reference": "82cd0f854ceca17731d6d019c7098e3755c45060"
|
"reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/82cd0f854ceca17731d6d019c7098e3755c45060",
|
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/65b12cdeaaa6cd276d4c3033a95b9b88b12701e7",
|
||||||
"reference": "82cd0f854ceca17731d6d019c7098e3755c45060",
|
"reference": "65b12cdeaaa6cd276d4c3033a95b9b88b12701e7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4000,7 +4001,7 @@
|
|||||||
"phpcs",
|
"phpcs",
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"time": "2019-10-16T21:14:26+00:00"
|
"time": "2019-10-28T04:36:32+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
|
|||||||
@ -45,9 +45,14 @@ class DashboardController extends AppController
|
|||||||
|
|
||||||
// login server cannot detect host ip
|
// login server cannot detect host ip
|
||||||
//echo "client ip: $ip<br>";
|
//echo "client ip: $ip<br>";
|
||||||
//echo $session_id;
|
//echo $session_id; echo "<br>";
|
||||||
if($session_id != 0 && $session->read('session_id') != $session_id) {
|
//echo $session->read('session_id');
|
||||||
|
if($session_id != 0) {
|
||||||
|
$userStored = $session->read('StateUser');
|
||||||
|
$transactionPendings = $session->read('Transactions.pending');
|
||||||
|
if($session->read('session_id') != $session_id ||
|
||||||
|
( $userStored && !isset($userStored['id'])) ||
|
||||||
|
intval($transactionPendings) > 0) {
|
||||||
$http = new Client();
|
$http = new Client();
|
||||||
try {
|
try {
|
||||||
$loginServer = Configure::read('LoginServer');
|
$loginServer = Configure::read('LoginServer');
|
||||||
@ -65,6 +70,8 @@ class DashboardController extends AppController
|
|||||||
if($key === 'state') { continue; }
|
if($key === 'state') { continue; }
|
||||||
$session->write('StateUser.' . $key, $value );
|
$session->write('StateUser.' . $key, $value );
|
||||||
}
|
}
|
||||||
|
$transactionPendings = $json['Transaction.pending'];
|
||||||
|
$session->write('Transaction.pending', $transactionPendings);
|
||||||
$session->write('session_id', $session_id);
|
$session->write('session_id', $session_id);
|
||||||
$stateUserTable = TableRegistry::getTableLocator()->get('StateUsers');
|
$stateUserTable = TableRegistry::getTableLocator()->get('StateUsers');
|
||||||
if($json['user']['public_hex'] != '') {
|
if($json['user']['public_hex'] != '') {
|
||||||
@ -84,12 +91,13 @@ class DashboardController extends AppController
|
|||||||
//echo $newStateUser->id;
|
//echo $newStateUser->id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// for debugging
|
// for debugging
|
||||||
|
|
||||||
$this->set('user', $json['user']);
|
$this->set('user', $json['user']);
|
||||||
$this->set('json', $json);
|
//$this->set('json', $json);
|
||||||
$this->set('timeUsed', microtime(true) - $startTime);
|
$this->set('timeUsed', microtime(true) - $startTime);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -98,8 +106,7 @@ class DashboardController extends AppController
|
|||||||
//echo $json['user']['email_checked'];
|
//echo $json['user']['email_checked'];
|
||||||
//var_dump($json);
|
//var_dump($json);
|
||||||
//
|
//
|
||||||
return $this->redirect(Router::url('/', true) . 'account/', 303);
|
//return $this->redirect(Router::url('/', true) . 'account/', 303);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,8 +116,15 @@ class DashboardController extends AppController
|
|||||||
|
|
||||||
//continue;
|
//continue;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// login already in session
|
||||||
|
$user = $session->read('StateUser');
|
||||||
|
$this->set('user', $user);
|
||||||
|
$this->set('timeUsed', microtime(true) - $startTime);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// no login
|
||||||
return $this->redirect(Router::url('/', true) . 'account/', 303);
|
return $this->redirect(Router::url('/', true) . 'account/', 303);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,6 +92,8 @@ class TransactionCreationsController extends AppController
|
|||||||
|
|
||||||
if ($this->request->is('post')) {
|
if ($this->request->is('post')) {
|
||||||
$requestData = $this->request->getData();
|
$requestData = $this->request->getData();
|
||||||
|
$mode = 'next';
|
||||||
|
if(isset($requestData['add'])) {$mode = 'add'; }
|
||||||
if($creationForm->validate($requestData)) {
|
if($creationForm->validate($requestData)) {
|
||||||
|
|
||||||
$pubKeyHex = '';
|
$pubKeyHex = '';
|
||||||
@ -139,12 +141,25 @@ class TransactionCreationsController extends AppController
|
|||||||
if($json['state'] != 'success') {
|
if($json['state'] != 'success') {
|
||||||
if($json['msg'] == 'session not found') {
|
if($json['msg'] == 'session not found') {
|
||||||
$session->destroy();
|
$session->destroy();
|
||||||
$this->Flash->error(__('session not found, please login again'));
|
return $this->redirect(Router::url('/', true) . 'account', 303);
|
||||||
|
//$this->Flash->error(__('session not found, please login again'));
|
||||||
} else {
|
} else {
|
||||||
$this->Flash->error(__('login server return error: ' . json_encode($json)));
|
$this->Flash->error(__('login server return error: ' . json_encode($json)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$pendingTransactionCount = $session->read('Transactions.pending');
|
||||||
|
if($pendingTransactionCount == null) {
|
||||||
|
$pendingTransactionCount = 1;
|
||||||
|
} else {
|
||||||
|
$pendingTransactionCount++;
|
||||||
|
}
|
||||||
|
$session->write('Transactions.pending', $pendingTransactionCount);
|
||||||
|
//echo "pending: " . $pendingTransactionCount;
|
||||||
|
if($mode === 'next') {
|
||||||
return $this->redirect(Router::url('/', true) . 'account/checkTransactions', 303);
|
return $this->redirect(Router::url('/', true) . 'account/checkTransactions', 303);
|
||||||
|
} else {
|
||||||
|
$this->Flash->success(__('Transaction submitted for review.'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class CreationForm extends Form
|
|||||||
protected function _buildSchema(Schema $schema)
|
protected function _buildSchema(Schema $schema)
|
||||||
{
|
{
|
||||||
return $schema
|
return $schema
|
||||||
->addField('receiver_pubkey_hex', ['type' => 'string'])
|
//->addField('receiver_pubkey_hex', ['type' => 'string'])
|
||||||
->addField('receiver', ['type' => 'select'])
|
->addField('receiver', ['type' => 'select'])
|
||||||
->addField('amount', ['type' => 'decimal', 'precision' => 2])
|
->addField('amount', ['type' => 'decimal', 'precision' => 2])
|
||||||
->addField('memo', ['type' =>'string', 'default' => '']);
|
->addField('memo', ['type' =>'string', 'default' => '']);
|
||||||
@ -37,12 +37,12 @@ class CreationForm extends Form
|
|||||||
])
|
])
|
||||||
->ascii('memo', __('Only Ascii Character allowed'))
|
->ascii('memo', __('Only Ascii Character allowed'))
|
||||||
->allowEmptyString('memo', null, 'create')
|
->allowEmptyString('memo', null, 'create')
|
||||||
->add('receiver_pubkey_hex', 'custom', [
|
/*->add('receiver_pubkey_hex', 'custom', [
|
||||||
'rule' => 'hexKey64',
|
'rule' => 'hexKey64',
|
||||||
'provider' => 'custom',
|
'provider' => 'custom',
|
||||||
'message' => 'a valid pubkey in hex format is required (64 character)'
|
'message' => 'a valid pubkey in hex format is required (64 character)'
|
||||||
])
|
])
|
||||||
->allowEmptyString('receiver_pubkey_hex', null, 'create')
|
->allowEmptyString('receiver_pubkey_hex', null, 'create')*/
|
||||||
->add('amount', 'custom', [
|
->add('amount', 'custom', [
|
||||||
'rule' => 'amount',
|
'rule' => 'amount',
|
||||||
'provider' => 'custom',
|
'provider' => 'custom',
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.Key</code>
|
* Generated from protobuf message <code>model.messages.gradido.Key</code>
|
||||||
*/
|
*/
|
||||||
final class Key extends \Google\Protobuf\Internal\Message
|
class Key extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
protected $key;
|
protected $key;
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.ReceiverAmount</code>
|
* Generated from protobuf message <code>model.messages.gradido.ReceiverAmount</code>
|
||||||
*/
|
*/
|
||||||
final class ReceiverAmount extends \Google\Protobuf\Internal\Message
|
class ReceiverAmount extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>bytes ed25519_receiver_pubkey = 1;</code>
|
* Generated from protobuf field <code>bytes ed25519_receiver_pubkey = 1;</code>
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.SenderAmount</code>
|
* Generated from protobuf message <code>model.messages.gradido.SenderAmount</code>
|
||||||
*/
|
*/
|
||||||
final class SenderAmount extends \Google\Protobuf\Internal\Message
|
class SenderAmount extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>bytes ed25519_sender_pubkey = 1;</code>
|
* Generated from protobuf field <code>bytes ed25519_sender_pubkey = 1;</code>
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.SignatureMap</code>
|
* Generated from protobuf message <code>model.messages.gradido.SignatureMap</code>
|
||||||
*/
|
*/
|
||||||
final class SignatureMap extends \Google\Protobuf\Internal\Message
|
class SignatureMap extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Each signature pair corresponds to a unique Key required to sign the transaction.
|
* Each signature pair corresponds to a unique Key required to sign the transaction.
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.SignaturePair</code>
|
* Generated from protobuf message <code>model.messages.gradido.SignaturePair</code>
|
||||||
*/
|
*/
|
||||||
final class SignaturePair extends \Google\Protobuf\Internal\Message
|
class SignaturePair extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>bytes pubKey = 1;</code>
|
* Generated from protobuf field <code>bytes pubKey = 1;</code>
|
||||||
|
|||||||
@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
*
|
*
|
||||||
* Generated from protobuf message <code>model.messages.gradido.StateCreateGroup</code>
|
* Generated from protobuf message <code>model.messages.gradido.StateCreateGroup</code>
|
||||||
*/
|
*/
|
||||||
final class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
class StateCreateGroup extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>string name = 1;</code>
|
* Generated from protobuf field <code>string name = 1;</code>
|
||||||
|
|||||||
@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
*
|
*
|
||||||
* Generated from protobuf message <code>model.messages.gradido.StateGroupChangeParent</code>
|
* Generated from protobuf message <code>model.messages.gradido.StateGroupChangeParent</code>
|
||||||
*/
|
*/
|
||||||
final class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
class StateGroupChangeParent extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 1;</code>
|
* Generated from protobuf field <code>.model.messages.gradido.Key groupPublicKey = 1;</code>
|
||||||
|
|||||||
@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
*
|
*
|
||||||
* Generated from protobuf message <code>model.messages.gradido.Timestamp</code>
|
* Generated from protobuf message <code>model.messages.gradido.Timestamp</code>
|
||||||
*/
|
*/
|
||||||
final class Timestamp extends \Google\Protobuf\Internal\Message
|
class Timestamp extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Number of complete seconds since the start of the epoch
|
* Number of complete seconds since the start of the epoch
|
||||||
|
|||||||
@ -13,7 +13,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
*
|
*
|
||||||
* Generated from protobuf message <code>model.messages.gradido.TimestampSeconds</code>
|
* Generated from protobuf message <code>model.messages.gradido.TimestampSeconds</code>
|
||||||
*/
|
*/
|
||||||
final class TimestampSeconds extends \Google\Protobuf\Internal\Message
|
class TimestampSeconds extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Number of complete seconds since the start of the epoch
|
* Number of complete seconds since the start of the epoch
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.Transaction</code>
|
* Generated from protobuf message <code>model.messages.gradido.Transaction</code>
|
||||||
*/
|
*/
|
||||||
final class Transaction extends \Google\Protobuf\Internal\Message
|
class Transaction extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>uint64 id = 1;</code>
|
* Generated from protobuf field <code>uint64 id = 1;</code>
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.TransactionBody</code>
|
* Generated from protobuf message <code>model.messages.gradido.TransactionBody</code>
|
||||||
*/
|
*/
|
||||||
final class TransactionBody extends \Google\Protobuf\Internal\Message
|
class TransactionBody extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* max 150 chars
|
* max 150 chars
|
||||||
|
|||||||
@ -14,7 +14,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
*
|
*
|
||||||
* Generated from protobuf message <code>model.messages.gradido.TransactionCreation</code>
|
* Generated from protobuf message <code>model.messages.gradido.TransactionCreation</code>
|
||||||
*/
|
*/
|
||||||
final class TransactionCreation extends \Google\Protobuf\Internal\Message
|
class TransactionCreation extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>.model.messages.gradido.ReceiverAmount receiverAmount = 1;</code>
|
* Generated from protobuf field <code>.model.messages.gradido.ReceiverAmount receiverAmount = 1;</code>
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use Google\Protobuf\Internal\GPBUtil;
|
|||||||
/**
|
/**
|
||||||
* Generated from protobuf message <code>model.messages.gradido.Transfer</code>
|
* Generated from protobuf message <code>model.messages.gradido.Transfer</code>
|
||||||
*/
|
*/
|
||||||
final class Transfer extends \Google\Protobuf\Internal\Message
|
class Transfer extends \Google\Protobuf\Internal\Message
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Generated from protobuf field <code>repeated .model.messages.gradido.SenderAmount senderAmounts = 1;</code>
|
* Generated from protobuf field <code>repeated .model.messages.gradido.SenderAmount senderAmounts = 1;</code>
|
||||||
|
|||||||
@ -9,17 +9,20 @@
|
|||||||
if(isset($user)) {
|
if(isset($user)) {
|
||||||
//var_dump($user);
|
//var_dump($user);
|
||||||
}
|
}
|
||||||
|
$this->assign('title', __('Willkommen') . ' ' . $user['first_name'] . ' ' . $user['last_name']);
|
||||||
?>
|
?>
|
||||||
<div class="grd_container">
|
|
||||||
<h1>Willkommen <?= $user['first_name'] ?> <?= $user['last_name'] ?></h1>
|
|
||||||
<div class="grd_container_small">
|
<div class="grd_container_small">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<h3>Geld ...</h3>
|
<h3>Gradido ...</h3>
|
||||||
<?= $this->Html->link(__('schöpfen'), ['controller' => 'TransactionCreations', 'action' => 'create'], ['class' => 'grd_bn grd_bg-bn']); ?>
|
<?= $this->Html->link(
|
||||||
<a class="grd_bn grd_bg-bn">überweisen</a>
|
__('schöpfen'),
|
||||||
|
['controller' => 'TransactionCreations', 'action' => 'create'],
|
||||||
|
['class' => 'grd-nav-bn grd-nav-bn-large']
|
||||||
|
); ?>
|
||||||
|
<a class="grd-nav-bn grd-nav-bn-large">überweisen</a>
|
||||||
|
</fieldset>
|
||||||
|
<fieldset class="grd-margin-top-10">
|
||||||
|
<h3>Account ...</h3>
|
||||||
|
<a class="grd-nav-bn" href="./account/user_delete"><?= __("löschen"); ?></a>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="grd-time-used">
|
|
||||||
<?= round($timeUsed * 1000.0, 4) ?> ms
|
|
||||||
</div>
|
|
||||||
@ -52,7 +52,8 @@ $cakeDescription = 'Gradido';
|
|||||||
<div class="container clearfix">
|
<div class="container clearfix">
|
||||||
<?= $this->fetch('content') ?>
|
<?= $this->fetch('content') ?>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<div class="grd-time-used dev-info">
|
||||||
</footer>
|
<?= round($timeUsed * 1000.0, 4) ?> ms
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
use Cake\Routing\Router;
|
||||||
/**
|
/**
|
||||||
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
||||||
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
|
||||||
@ -14,6 +15,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$cakeDescription = 'Gradido';
|
$cakeDescription = 'Gradido';
|
||||||
|
$session = $this->getRequest()->getSession();
|
||||||
|
$transactionPendings = $session->read('Transactions.pending');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
@ -34,23 +38,34 @@ $cakeDescription = 'Gradido';
|
|||||||
<?= $this->fetch('script') ?>
|
<?= $this->fetch('script') ?>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav class="top-bar expanded" data-topbar role="navigation">
|
<div class="versionstring dev-info">
|
||||||
<ul class="title-area large-3 medium-4 columns">
|
<p class="grd_small">Community Server in Entwicklung</p>
|
||||||
<li class="name">
|
<p class="grd_small">Alpha 0.4.2</p>
|
||||||
<h1><a href=""><?= $this->fetch('title') ?></a></h1>
|
</div>
|
||||||
|
<nav class="grd-left-bar expanded" data-topbar role="navigation">
|
||||||
|
<div class="grd-left-bar-section">
|
||||||
|
<ul class="grd-no-style">
|
||||||
|
<li><?= $this->Html->link(__('Startseite'), ['controller' => 'dashboard'], ['class' => 'grd-nav-bn'])?>
|
||||||
|
|
||||||
|
<?php if(intval($transactionPendings) > 0) : ?>
|
||||||
|
<li>
|
||||||
|
<a href="<?= Router::url('/', true) ?>account/checkTransactions" class="grd-nav-bn">
|
||||||
|
<?= __("Transaktionen unterzeichnen") . ' (' . intval($transactionPendings) . ')'?>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
<?php else: ?>
|
||||||
<div class="top-bar-section">
|
<li><a href="<?= Router::url('/', true) ?>account/logout" class="grd-nav-bn"><?= __("Logout"); ?></a></li>
|
||||||
<ul class="right">
|
<?php endif; ?>
|
||||||
<li><a href="./account/logout"><?= __("Logout"); ?></a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<?= $this->Flash->render() ?>
|
<div class="grd_container">
|
||||||
<div class="container clearfix">
|
<h1><?= $this->fetch('title') ?></h1>
|
||||||
|
<div class="flash-messages"><?= $this->Flash->render() ?></div>
|
||||||
<?= $this->fetch('content') ?>
|
<?= $this->fetch('content') ?>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<div class="grd-time-used dev-info">
|
||||||
</footer>
|
<?= round($timeUsed * 1000.0, 4) ?> ms
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* To change this template file, choose Tools | Templates
|
* To change this template file, choose Tools | Templates
|
||||||
* and open the template in the editor.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
$address_options = [__('Selbst eingeben:')];
|
$address_options = [];//__('Selbst eingeben:')];
|
||||||
foreach($receiverProposal as $i => $receiver) {
|
foreach($receiverProposal as $i => $receiver) {
|
||||||
//var_dump($receiver);
|
//var_dump($receiver);
|
||||||
array_push($address_options, [
|
array_push($address_options, [
|
||||||
@ -14,21 +14,17 @@ foreach($receiverProposal as $i => $receiver) {
|
|||||||
'title' => $receiver['key']
|
'title' => $receiver['key']
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
$this->assign('title', __('Schöpfungstransaktion'));
|
||||||
?>
|
?>
|
||||||
<div class="grd_container">
|
|
||||||
<h1><?= __('Schöpfungstransaktion') ?></h1>
|
|
||||||
<div class="grd_container_small">
|
<div class="grd_container_small">
|
||||||
<?= $this->Form->create($creationForm) ?>
|
<?= $this->Form->create($creationForm) ?>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<?= $this->Form->control('memo'); ?>
|
<?= $this->Form->control('memo'); ?>
|
||||||
<?= $this->Form->control('amount'); ?>
|
<?= $this->Form->control('amount'); ?>
|
||||||
<?= $this->Form->control('receiver', ['options' => $address_options]); ?>
|
<?= $this->Form->control('receiver', ['options' => $address_options]); ?>
|
||||||
<?= $this->Form->control('receiver_pubkey_hex', []) ?>
|
<!--<?= $this->Form->control('receiver_pubkey_hex', []) ?>-->
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?= $this->Form->button(__('Bestätigen')) ?>
|
<?= $this->Form->button(__('Transaktion(n) abschließen'), ['name' => 'next', 'class' => 'grd-form-bn grd-form-bn-succeed grd_clickable grd-width-200']) ?>
|
||||||
|
<?= $this->Form->button(__('Weitere Transaktion erstellen'), ['name' => 'add', 'class' => 'grd-form-bn grd_clickable grd-width-200']) ?>
|
||||||
<?= $this->Form->end() ?>
|
<?= $this->Form->end() ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="grd-time-used">
|
|
||||||
<?= round($timeUsed * 1000.0, 4) ?> ms
|
|
||||||
</div>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user