Änderungen vom Wochenende

This commit is contained in:
aschwarz
2023-03-19 19:59:36 +01:00
parent 15ec7a0a34
commit a6850ffff8
5 changed files with 521 additions and 280 deletions

View File

@ -1,3 +1,4 @@
{if $action == ''}
<!doctype html>
<html lang="de">
<head>
@ -9,7 +10,58 @@
<!--
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
-->
<style type="text/css">
body {
background-color : #FFF;
}
.headline {
padding-top: 10px;
padding-bottom: 10px;
padding-left: 20px;
}
</style>
</head>
<body>
<div class="container">
<div class="grid">
<div class="headline col-12 bg-white">
<p class="text-center"><img width="200" src="../media/jumi.png" class="rounded float-right" alt="JU & MI"></p>
</div>
<form action="?action=umfrage" method='post' name='start'>
{if $umfrage_anzeigen == '0'}
<div class="col-12 ">
<h4>
<p class="text-center">Aktuell sind keine Umfragen verfügbar</p>
</h4>
</div>
{/if}
{if $umfrage_anzeigen == '1'}
<input type="hidden" name="umid" value="{$umfrage_umid}">
<script type="text/javascript">
window.onload=function(){
window.setTimeout(document.start.submit.bind(document.start), 5000);
};
</script>
</form>
{/if}
</div>
</div>
</body>
</html>
{/if}
{if $action == 'umfrage'}
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Umfrage</title>
<!-- https://www.budde-mediendesign.de/blog/programmierung/das-bootstrap-4-grid-system-->
<link href="../bootstrap/node_modules/bootstrap/dist/css/bootstrap.ali.css" rel="stylesheet">
<!--
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
-->
<style type="text/css">
body {
background-color : #FFF;
@ -35,7 +87,6 @@
padding-bottom: 20px;
padding-left: 20px;
}
.prog-col {
background-color: #35B6BB;
}
@ -88,6 +139,7 @@
<body >
<!-- hier kommt der Inhalt der Seite hin -->
<div class="container">
{if $umfrage_showende != '1'}
<div class="progress" style="height: 5px;">
<div class="progress-bar prog-col" role="progressbar" style="width:{$umfrage_progress}%" aria-valuenow="{$umfrage_progress}" aria-valuemin="0" aria-valuemax="100"></div>
</div>
@ -97,65 +149,96 @@
<p class="text-center">{$umfrage_headline}</p>
</h2>
</div>
<form action="" method='post' name='erfassen'>
{section name=table_data loop=$table_data}
<div class="question col-12 ">
<h4>
<p class="text-center">{$table_data[table_data].frage}</p>
</h4>
{if $table_data[table_data].multiple == '1'}<p class="text-center small">Mehrfachantworten möglich</p>{/if}
</div>
<br>
<div class="col-12 btn-group-vertical btn-toolbar" role="group" aria-label="Basic radio toggle button group">
{section name=inner loop=$table_data[table_data].inner}
{if $table_data[table_data].multiple == '0'}
<input value="{$table_data[table_data].inner[inner].uaid}" type="radio" class="btn-check" name="antwort" id="btnradio{$smarty.section.inner.rownum}" autocomplete="off">
{else}
<input value="{$table_data[table_data].inner[inner].uaid}" type="checkbox" class="btn-check" name="antwort_{$table_data[table_data].inner[inner].uaid}" id="btnradio{$smarty.section.inner.rownum}" autocomplete="off">
{/if}
<label class="answer btn btn-outline-primary" for="btnradio{$smarty.section.inner.rownum}">{$table_data[table_data].inner[inner].antwort}</label>
<form action="?action=umfrage" method='post' name='erfassen'>
{if $umfrage_showfreitext == '0'}
{section name=table_data loop=$table_data}
<div class="question col-12 ">
<h4>
<p class="text-center">{$table_data[table_data].frage}</p>
</h4>
{if $table_data[table_data].multiple == '1'}
<p class="text-center small">Mehrfachantworten möglich</p>
{/if}
</div>
<br>
<div class="col-12 btn-group-vertical btn-toolbar" role="group" aria-label="Basic radio toggle button group">
{section name=inner loop=$table_data[table_data].inner}
{if $table_data[table_data].multiple == '0'}
<input value="{$table_data[table_data].inner[inner].uaid}" type="radio" class="btn-check" name="antwort" id="btnradio{$smarty.section.inner.rownum}" autocomplete="off" {if $table_data[table_data].inner[inner].selected == '1'} checked {/if}>
{else}
<input value="{$table_data[table_data].inner[inner].uaid}" type="checkbox" class="btn-check" name="antwort_{$table_data[table_data].inner[inner].uaid}" id="btnradio{$smarty.section.inner.rownum}" autocomplete="off" {if $table_data[table_data].inner[inner].selected == '1'} checked {/if}>
{/if}
<label class="answer btn btn-outline-primary" for="btnradio{$smarty.section.inner.rownum}">{$table_data[table_data].inner[inner].antwort}</label>
{/section}
</div>
<div class="col-12 btn-group">
<input type="hidden" name="row" value="{$pagination_row}">
<input type="hidden" name="allcount" value="{$pagination_allcount}">
{if $umfrage_start0 == '1'}
<input type="submit" class="btn btn-light" name="but_prev" value="Zurück">
{/if}
{if $umfrage_start0 == '2'}
<a disabled class="btn btn-light">Zurück</a>
{/if}
{if $umfrage_end0 == '1'}
<input type="hidden" name="save" value="{$table_data[table_data].ufid}">
<input type="hidden" name="exit" value="0">
<input type="submit" class="btn btn-primary" name="but_next" value="Weiter">
{/if}
{if $umfrage_end0 == '2'}
<input type="hidden" name="save" value="{$table_data[table_data].ufid}">
<input type="hidden" name="exit" value="1">
<input type="submit" class="btn btn-primary" name="but_next" value="Umfrage beenden">
{/if}
</div>
{/section}
</div>
<!--
<div class="col-12 btn-group">
{if $umfrage_start0 == '1'}
<input type="hidden" name="start" value="{$umfrage_start_newstart}">
{$umfrage_start_newstart}
<input type='submit' class="btn btn-light" name='senden' value="Zurück">
{/if}
{if $umfrage_start0 == '2'}
<a disabled class="btn btn-light">Zurück</a>
{if $umfrage_showfreitext == '1'}
<div class="question col-12 ">
<h4>
<p class="text-center">Raum für Hinweise/Bemerkungen</p>
</h4>
</div>
<br>
<div class="col-12 btn-group-vertical btn-toolbar" role="group" aria-label="Basic radio toggle button group">
<textarea class="form-control" id="freitext" name="freitext" rows="6">{$umfrage_value_freitext}</textarea>
</div>
<div class="col-12 btn-group">
<input type="hidden" name="row" value="{$pagination_row}">
<input type="hidden" name="allcount" value="{$pagination_allcount}">
{if $umfrage_start0 == '1'}
<input type="submit" class="btn btn-light" name="but_prev" value="Zurück">
{/if}
{if $umfrage_start0 == '2'}
<a disabled class="btn btn-light">Zurück</a>
{/if}
{if $umfrage_end0 == '1'}
<input type="hidden" name="save" value="freitext">
<input type="hidden" name="exit" value="0">
<input type="submit" class="btn btn-primary" name="but_next" value="Weiter">
{/if}
{if $umfrage_end0 == '2'}
<input type="hidden" name="save" value="freitext">
<input type="hidden" name="exit" value="1">
<input type="submit" class="btn btn-primary" name="but_next" value="Umfrage beenden">
{/if}
</div>
{/if}
{if $umfrage_end0 == '1'}
<input type="hidden" name="start" value="{$umfrage_end_newstart}">
<input type="hidden" name="save" value="{$table_data[table_data].ufid}">
{$umfrage_end_newstart}
<input type='submit' class="btn btn-primary" name='senden' value="Weiter">
{/if}
{if $umfrage_end0 == '2'}
<input type="hidden" name="start" value="{$umfrage_end_newstart}">
{$umfrage_end_newstart}
<input type="hidden" name="save" value="{$table_data[table_data].ufid}">
<input type="hidden" name="exit" value="1">
<input type='submit' class="btn btn-primary" name='senden' value="Umfrage beenden">
{/if}
</div>
-->
<div id="div_pagination">
{$pagination_row} / {$pagination_allcount}
<input type="hidden" name="row" value="{$pagination_row}">
<input type="hidden" name="allcount" value="{$pagination_allcount}">
<input type="submit" class="button" name="but_prev" value="Previous">
<input type="submit" class="button" name="but_next" value="Next">
</div>
{/section}
</div>
</form>
{/if}
{if $umfrage_showende == '1'}
<div class="grid">
<div class="headline col-12 bg-white">
<p class="text-center"><img width="200" src="../media/jumi.png" class="rounded float-right" alt="JU & MI"></p>
</div>
<div class="col-12 ">
<h4>
<p class="text-center">Herzlichen Dank für deine Teilnahme</p>
</h4>
</div>
</div>
{/if}
</div>
<!--
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
@ -167,3 +250,4 @@
<script src="../bootstrap/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
{/if}