Remove the cloud create submit page
This commit is contained in:
parent
17a975f28d
commit
af32ddf003
4 changed files with 13 additions and 24 deletions
|
@ -5,4 +5,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
* Removed the display page after a cloud creation, now everything is on result.php
|
||||||
|
|
23
create.php
23
create.php
|
@ -47,27 +47,8 @@ if (empty($_POST)) {
|
||||||
|
|
||||||
if ($cloud = $db->createCloud($text, $size, $duration)) {
|
if ($cloud = $db->createCloud($text, $size, $duration)) {
|
||||||
$viewUrl = 'result.php?id=' . $cloud['code'];
|
$viewUrl = 'result.php?id=' . $cloud['code'];
|
||||||
$viewName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $viewUrl;
|
header('Location: ' . $viewUrl);
|
||||||
$voteUrl = 'index.php?id=' . $cloud['code'];
|
die();
|
||||||
$voteName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $voteUrl;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<h2><?php echo L::cloud_links_warning ?></h2>
|
|
||||||
<div id="cloud_links">
|
|
||||||
<div id="cloud_links_results" class="cloud_link">
|
|
||||||
<div class="label"><?php echo L::cloud_link_view_title ?></div>
|
|
||||||
<div class="link">
|
|
||||||
<a href="<?php echo $viewUrl ?>" title="<?php echo L::cloud_link_view_tooltip ?>"><?php echo $viewName ?></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="cloud_links_vote" class="cloud_link">
|
|
||||||
<div class="label"><?php echo L::cloud_link_vote_title ?></div>
|
|
||||||
<div class="link">
|
|
||||||
<a href="<?php echo $voteUrl ?>" title="<?php echo L::cloud_link_vote_tooltip ?>"><?php echo $voteName ?></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<h2><?php echo L::create_errorCode ?></h2>
|
<h2><?php echo L::create_errorCode ?></h2>
|
||||||
|
|
|
@ -26,7 +26,7 @@ duration = "Durée de vie du nuage"
|
||||||
duration_tooltip = "Durée après laquelle le nuage sera supprimé"
|
duration_tooltip = "Durée après laquelle le nuage sera supprimé"
|
||||||
size = "Nombre de mots maximum par entrée"
|
size = "Nombre de mots maximum par entrée"
|
||||||
create_message = "Voulez-vous créer un nouveau nuage de mots?"
|
create_message = "Voulez-vous créer un nouveau nuage de mots?"
|
||||||
links_warning = "Attention, il n'y a aucun moyen de retrouver ces liens par la suite."
|
links_warning = "Attention, il n'y a aucun moyen de retrouver ces liens si vous fermez la fenêtre."
|
||||||
noId = "Aucun nuage se trouve à cet endroit, désolé."
|
noId = "Aucun nuage se trouve à cet endroit, désolé."
|
||||||
empty = "Il n'y a pas encore de mots dans ce nuage."
|
empty = "Il n'y a pas encore de mots dans ce nuage."
|
||||||
|
|
||||||
|
|
10
result.php
10
result.php
|
@ -9,7 +9,9 @@ if (isset($_GET['id'])) {
|
||||||
$id = null;
|
$id = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
|
<h2><?php echo L::cloud_links_warning ?></h2>
|
||||||
|
<?php
|
||||||
if ($db->isCloudSet()) {
|
if ($db->isCloudSet()) {
|
||||||
$nbWords = $db->countWords();
|
$nbWords = $db->countWords();
|
||||||
if ($nbWords == 0) {
|
if ($nbWords == 0) {
|
||||||
|
@ -19,7 +21,13 @@ if ($db->isCloudSet()) {
|
||||||
}
|
}
|
||||||
$voteUrl = 'index.php?id=' . $id;
|
$voteUrl = 'index.php?id=' . $id;
|
||||||
$voteName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $voteUrl;
|
$voteName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $voteUrl;
|
||||||
|
$viewUrl = 'result.php?id=' . $id;
|
||||||
|
$viewName = 'https://' . $_SERVER['HTTP_HOST'] . '/' . $viewUrl;
|
||||||
?>
|
?>
|
||||||
|
<div class="label"><?php echo L::cloud_link_view_title ?></div>
|
||||||
|
<div class="link">
|
||||||
|
<a href="<?php echo $viewUrl ?>" title="<?php echo L::cloud_link_view_tooltip ?>"><?php echo $viewName ?></a>
|
||||||
|
</div>
|
||||||
<div class="label"><?php echo L::cloud_link_vote_title ?></div>
|
<div class="label"><?php echo L::cloud_link_vote_title ?></div>
|
||||||
<div class="link">
|
<div class="link">
|
||||||
<a href="<?php echo $voteUrl ?>" title="<?php echo L::cloud_link_vote_tooltip ?>"><?php echo $voteName ?></a>
|
<a href="<?php echo $voteUrl ?>" title="<?php echo L::cloud_link_vote_tooltip ?>"><?php echo $voteName ?></a>
|
||||||
|
|
Loading…
Reference in a new issue