Commit 4534170d authored by Björn Eyselein's avatar Björn Eyselein
Browse files

Fix weiter Button

parent fe363cde
......@@ -2,75 +2,73 @@
@(user: User, completeFlashcard: CompleteFlashcard, isRepeating: Boolean)(implicit requestHeader: RequestHeader, messagesProvider: MessagesProvider)
@title = @{
"Lernen"
}
@title = @{
"Lernen"
}
@scripts = {
<script src="@routes.Assets.versioned("learn.js")"></script>
}
@scripts = {
<script src="@routes.Assets.versioned("learn.js")"></script>
}
@choiceInputType = @{
completeFlashcard.flashcard.cardType match {
case CardType.SingleChoice => "radio"
case CardType.MultipleChoice => "checkbox"
case _ => ""
@choiceInputType = @{
completeFlashcard.flashcard.cardType match {
case CardType.SingleChoice => "radio"
case CardType.MultipleChoice => "checkbox"
case _ => ""
}
}
}
@main(title, Some(user), scripts) {
@main(title, Some(user), scripts) {
@helper.CSRF.formField
@helper.CSRF.formField
<section id="flashcardDiv" data-cardtype="@completeFlashcard.flashcard.cardType">
<div class="card-panel">
<h4 class="center-align">@completeFlashcard.flashcard.question</h4>
</div>
<section id="flashcardDiv" data-cardtype="@completeFlashcard.flashcard.cardType">
<div class="card-panel">
<h4 class="center-align">@completeFlashcard.flashcard.question</h4>
</div>
<br>
<br>
@completeFlashcard.flashcard.cardType match {
case CardType.Vocable | CardType.Text => {
<div class="row">
<div class="input-field col s12">
<input type="text" id="translation_input">
<label for="translation_input">Übersetzung</label>
@completeFlashcard.flashcard.cardType match {
case CardType.Vocable | CardType.Text => {
<div class="row">
<div class="input-field col s12">
<input type="text" id="translation_input">
<label for="translation_input">Übersetzung</label>
</div>
</div>
</div>
<p id="correctionTextPar">&nbsp;</p>
}
case CardType.SingleChoice | CardType.MultipleChoice => {
<p id="correctionTextPar">&nbsp;</p>
@for(answer <- scala.util.Random.shuffle(completeFlashcard.choiceAnswers)) {
<p>
<label for="choice_@answer.id">
<input id="choice_@answer.id" name="choice_answers" type="@choiceInputType" data-choiceid="@answer.id">
<span>@answer.answer</span>
</label>
</p>
}
case CardType.SingleChoice | CardType.MultipleChoice => {
@for(answer <- scala.util.Random.shuffle(completeFlashcard.choiceAnswers)) {
<p>
<label for="choice_@answer.id">
<input id="choice_@answer.id" name="choice_answers" type="@choiceInputType" data-choiceid="@answer.id">
<span>@answer.answer</span>
</label>
</p>
}
}
}
}
</section>
</section>
<br>
<br>
<div class="row" id="btnsRow">
<button class="btn btn-large waves-effect green" onclick="checkSolution();" id="checkSolutionBtn"
data-href="@routes.HomeController.checkSolution(completeFlashcard.flashcard.langId, completeFlashcard.flashcard.collId, completeFlashcard.flashcard.id)">
Lösung testen
</button>
<a
@if(isRepeating) {
href="@routes.HomeController.startLearning(completeFlashcard.flashcard.langId, completeFlashcard.flashcard.collId)"
} else {
href="@routes.HomeController.startRepeating(completeFlashcard.flashcard.langId, completeFlashcard.flashcard.collId)"
}
id="nextFlashcardBtn" class="btn btn-large waves-effect blue disabled">Weiter</a>
</div>
}
<div class="row" id="btnsRow">
<button class="btn btn-large waves-effect green" onclick="checkSolution();" id="checkSolutionBtn"
data-href="@routes.HomeController.checkSolution(completeFlashcard.flashcard.langId, completeFlashcard.flashcard.collId, completeFlashcard.flashcard.id)">
Lösung testen
</button>
<a
@if(isRepeating) {
href="@routes.HomeController.startRepeating(completeFlashcard.flashcard.langId, completeFlashcard.flashcard.collId)"
} else {
href="@routes.HomeController.startLearning(completeFlashcard.flashcard.langId, completeFlashcard.flashcard.collId)"
}
id="nextFlashcardBtn" class="btn btn-large waves-effect blue disabled">Weiter</a>
</div>
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment