Browse Source

Add back button

dev
Philipp Lang 5 years ago
parent
commit
67efb867bb
  1. 6
      assets/css/app.css
  2. 7
      assets/js/app.js
  3. 3
      views/daten.twig.htm
  4. 3
      views/stepper.twig.htm
  5. 3
      views/vorhaben.twig.htm

6
assets/css/app.css

@ -23,6 +23,12 @@ body {
} }
} }
.button-row {
display: grid;
grid-template-columns: max-content 1fr;
grid-gap: 0.5rem;
}
form { form {
font-family: sans-serif; font-family: sans-serif;
background: var(--bg-color); background: var(--bg-color);

7
assets/js/app.js

@ -107,6 +107,13 @@ window.stepper = {
var _self = this; var _self = this;
this.step = index; this.step = index;
if (index === 0) {
window.setTimeout(function() {
_self.value.kind = null;
}, 500);
}
this.$nextTick(function() { this.$nextTick(function() {
_self.$refs.slider.scrollLeft = _self.$refs.slider.scrollWidth / 4 * index; _self.$refs.slider.scrollLeft = _self.$refs.slider.scrollWidth / 4 * index;
}); });

3
views/daten.twig.htm

@ -71,7 +71,10 @@
<input type="text" x-model="value.einnahme" id="einnahme"> <input type="text" x-model="value.einnahme" id="einnahme">
</label> </label>
<div class="button-row">
<button @click="slideTo($event, step-1)" type="button">Zurück</button>
<button type="submit">Absenden</button> <button type="submit">Absenden</button>
</div>
</div> </div>
</div> </div>

3
views/stepper.twig.htm

@ -62,9 +62,12 @@
<div x-text="units.currency.to(Math.round(parseInt(value.anschluss.umschuldung) / 1000 + parseInt(value.anschluss.zuskap) / 1000) * 1000)"></div> <div x-text="units.currency.to(Math.round(parseInt(value.anschluss.umschuldung) / 1000 + parseInt(value.anschluss.zuskap) / 1000) * 1000)"></div>
</div> </div>
<div class="separator gray"></div> <div class="separator gray"></div>
<div class="button-row">
<button @click="slideTo($event, step-1)" type="button">Zurück</button>
<button @click="slideTo($event, step+1)" type="button">Werte übernehmen und weiter zum letzten Schritt</button> <button @click="slideTo($event, step+1)" type="button">Werte übernehmen und weiter zum letzten Schritt</button>
</div> </div>
</div> </div>
</div>
{% include 'daten.twig.htm' %} {% include 'daten.twig.htm' %}

3
views/vorhaben.twig.htm

@ -66,6 +66,9 @@
<div x-text="units.currency.to( Math.round((value.{{kind}}.{{main.value}} * (1+parts.notar+parts.grundsteuer+parts.makler) + value.{{kind}}.{{second.value}} - value.{{kind}}.eigenkapital) / 1000)*1000 )"></div> <div x-text="units.currency.to( Math.round((value.{{kind}}.{{main.value}} * (1+parts.notar+parts.grundsteuer+parts.makler) + value.{{kind}}.{{second.value}} - value.{{kind}}.eigenkapital) / 1000)*1000 )"></div>
</div> </div>
<div class="separator gray"></div> <div class="separator gray"></div>
<div class="button-row">
<button @click="slideTo($event, step-1)" type="button">Zurück</button>
<button @click="slideTo($event, step+1)" type="button">Werte übernehmen und weiter zum letzten Schritt</button> <button @click="slideTo($event, step+1)" type="button">Werte übernehmen und weiter zum letzten Schritt</button>
</div> </div>
</div> </div>
</div>

Loading…
Cancel
Save