new try (see last messages)

This commit is contained in:
Dario 2020-12-09 18:57:33 +01:00 committed by Ulf Gebhardt
parent 461cb404c5
commit 6adc21b3b8
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 7 additions and 6 deletions

View File

@ -178,9 +178,9 @@
sm->deleteLoginCookies(request, response);
}
std::string form_action_url = ServerConfig::g_serverPath;
std::string form_action_url = ServerConfig::g_serverPath + "/";
if(mSession && !mSession->getNewUser().isNull()) {
form_action_url = "https://" + mSession->getNewUser()->getGroupBaseUrl();
form_action_url = "https://" + mSession->getNewUser()->getGroupBaseUrl() + "/";
} else {
// TODO: find maybe a better way, especially together with language changer
form_action_url = "";
@ -192,7 +192,7 @@
<div class="center-form-container">
<%@ include file="flags.cpsp" %>
<div class="center-form-form">
<form action="<%= form_action_url %>/" method="POST">
<form action="<%= form_action_url %>" method="POST">
<input class="form-control" type="text" name="login-email" placeholder="<%= langCatalog->gettext("E-Mail") %>" value="<%= presetEmail %>"/>
<input class="form-control" type="password" name="login-password" placeholder="<%= langCatalog->gettext("Password") %>" />
<button type="submit" name="submit" class="center-form-submit form-button"><%= langCatalog->gettext(" Login ") %></button>

View File

@ -26,7 +26,7 @@ enum PageState {
PageState state = PAGE_STATE_OVERVIEW;
auto groups = controller::Group::listAll();
Poco::AutoPtr<controller::Group> choosen_group;
if(!form.empty()) {
auto group_id_string = form.get("group_id", "");
@ -36,7 +36,7 @@ enum PageState {
int group_id = 0;
if(DataTypeConverter::NUMBER_PARSE_OKAY == DataTypeConverter::strToInt(group_id_string, group_id)) {
std::string group_alias = "";
Poco::AutoPtr<controller::Group> choosen_group;
for(auto it = groups.begin(); it != groups.end(); it++) {
auto group_model = (*it)->getModel();
if(group_model->getID() == group_id) {
@ -82,8 +82,9 @@ enum PageState {
// should be only one
Poco::AutoPtr<model::gradido::Transaction> transaction = tasks[0].cast<model::gradido::Transaction>();
if(transaction->getSignCount() == 0) {
pt->unlock();
response.redirect(ServerConfig::g_serverPath + "/checkTransactions");
response.redirect("https://" + choosen_group->getModel()->getUrl() + "account/checkTransactions");
return;
}
} else if(referer_was_checkTransaction && user->getModel()->getGroupId()) {