redesign for mulituser
change validation concept (client and server) using entities
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
<div class="card text-bg-dark">
|
||||
<div class="card-content">
|
||||
<div class="card-body">
|
||||
<form class="form form-vertical" id="editaccount" method="post" action="<?= base_url() ?>/editAccount">
|
||||
<form class="form form-vertical" id="editaccount" method="post" action="<?= base_url() ?>/viewAccounts">
|
||||
<input type="hidden" value="<?= $id??0 ?>" name="id" id="id">
|
||||
<?php if (! empty($validation)) : ?>
|
||||
<?php if (! empty($errors)) : ?>
|
||||
<div class='alert alert-danger mt-2'>
|
||||
<div class="errors" role="alert">
|
||||
<ul>
|
||||
<?php foreach ($validation as $error) : ?>
|
||||
<?php foreach ($errors as $error) : ?>
|
||||
<li><?= esc($error) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
@@ -26,33 +26,36 @@
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label for="parent">Überkonto:</label>
|
||||
<?= form_dropdown('parent', $ddlist, $parent??0,'id="parent" class="form-select"'); ?>
|
||||
<select name="parent" class="form-select" required id="parent" >
|
||||
<option value="0">----</option>
|
||||
<?php foreach ($ddlist as $key => $value): ?>
|
||||
<option value="<?= $key ?>" <?= ($key == ($parent??0))?'selected':'' ?>><?= $value ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="typeAccount" value="account" name="type" <?= set_radio('type', 'account') ?>>
|
||||
<label class="form-check-label" for="inlineCheckbox1">Konto</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="typeInput" value="input" name="type" <?= set_radio('type', 'input') ?> >
|
||||
<label class="form-check-label" for="inlineCheckbox2">Einnahmen</label>
|
||||
</div>
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" id="typeOutput" value="output" name="type" <?= set_radio('type', 'output', true) ?> >
|
||||
<label class="form-check-label" for="inlineCheckbox3">Ausgaben</label>
|
||||
<div class="form-check form-switch">
|
||||
<label class="form-check-label" for="account">Typ Konto</label>
|
||||
<input class="form-check-input" type="checkbox" id="account" name="account" <?= set_checkbox('account', 'on', $account??false) ?> >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-check form-switch">
|
||||
<label class="form-check-label" for="bookable">Buchbarkeit</label>
|
||||
<input class="form-check-input" type="checkbox" id="bookable" value="bookable" name="bookable" <?= set_checkbox('bookable', 'on', (($bookable??"f")=="t")?true:false) ?> >
|
||||
<input class="form-check-input" type="checkbox" id="bookable" value="bookable" name="bookable" <?= set_checkbox('bookable', 'on', $bookable??false) ?> >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-check form-switch">
|
||||
<label class="form-check-label" for="lkz">lkz</label>
|
||||
<input class="form-check-input" type="checkbox" id="lkz" value="1" name="lkz" <?= set_checkbox('lkz', '1', $lkz??false) ?>>
|
||||
<label class="form-check-label" for="monitor">Monitor</label>
|
||||
<input class="form-check-input" type="checkbox" id="monitor" name="monitor" <?= set_checkbox('monitor', 'on', $monitor??false) ?> >
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-check form-switch">
|
||||
<label class="form-check-label" for="deleted_at">Gelöscht</label>
|
||||
<input class="form-check-input" type="checkbox" id="deleted_at" value="1" name="deleted_at" <?= set_checkbox('deleted_at', '1', $deleted_at??false) ?>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
|
||||
Reference in New Issue
Block a user