Browse Source

hide unpaid publications

main
ghost 9 months ago
parent
commit
b410a79681
  1. 1
      src/Controller/ModuleController.php
  2. 15
      src/Controller/RoomController.php
  3. 5
      templates/default/module/post.html.twig

1
src/Controller/ModuleController.php

@ -201,6 +201,7 @@ class ModuleController extends AbstractController @@ -201,6 +201,7 @@ class ModuleController extends AbstractController
'mode' => $request->get('mode'),
'namespace' => $request->get('namespace'),
'error' => $request->get('error'),
'warning' => $request->get('warning'),
'sign' => $sign,
'message' => $message,
'username' => $username,

15
src/Controller/RoomController.php

@ -181,6 +181,7 @@ class RoomController extends AbstractController @@ -181,6 +181,7 @@ class RoomController extends AbstractController
$feed = [];
// Get pending from payment pool
/*
foreach ($entity->getRepository(Pool::class)->findBy(
[
'namespace' => $request->get('namespace'),
@ -227,6 +228,7 @@ class RoomController extends AbstractController @@ -227,6 +228,7 @@ class RoomController extends AbstractController
];
}
}
*/
// Get pending paradise
foreach ((array) $client->kevaPending() as $pending) // @TODO relate to this room
@ -628,7 +630,7 @@ class RoomController extends AbstractController @@ -628,7 +630,7 @@ class RoomController extends AbstractController
);
$pool->setAddress(
$client->getNewAddress()
$address = $client->getNewAddress()
);
$pool->setNamespace(
@ -667,8 +669,17 @@ class RoomController extends AbstractController @@ -667,8 +669,17 @@ class RoomController extends AbstractController
'mode' => $request->get('mode'),
'namespace' => $request->get('namespace'),
'sign' => $request->get('sign'),
'error' => null,
'message' => null,
'error' => null,
'warning' => sprintf(
$translator->trans('Send exactly %s KVA to %s (expires at %s)'),
$this->getParameter('app.add.post.cost.kva'),
$address,
date(
'c',
$this->getParameter('app.pool.timeout') + $time
)
),
'_fragment' => 'latest'
]
);

5
templates/default/module/post.html.twig

@ -1,8 +1,11 @@ @@ -1,8 +1,11 @@
{% if enabled %}
<form name="post" action="{{ path('room_post', { mode : mode, namespace : namespace }) }}" method="post">
{% if error %}
{% if error %}
<output name="error" for="form-post-message">{{ error }}</output>
{% endif %}
{% if warning %}
<output name="warning" for="form-post-message">{{ warning }}</output>
{% endif %}
<textarea name="message" id="form-post-message" placeholder="{{ 'enter your message...' | trans }}">{{ message }}</textarea>
{% if sign == 'anon' or sign == '' %}
<input type="radio" name="sign" value="anon" id="form-post-sign-anon" checked="checked" />

Loading…
Cancel
Save