finalized contacts

This commit is contained in:
Jörg Henke
2022-04-09 14:42:58 +02:00
parent 9fe9555853
commit 4e966ed56e
9 changed files with 146 additions and 57 deletions

View File

@ -3,10 +3,30 @@ html {
}
body {
background-color: #eee;
background-color: #99c1f1;
height: calc(100% - 76px);
}
.formpane {
margin: 24px;
border: 1px solid silver;
border-radius: 4px;
padding: 24px;
background: whitesmoke;
}
.menudangerbutton {
color: #e00 !important;
border: 1px solid rgba(0,0,0,0);
}
.menudangerbutton:hover {
color: #f00 !important;
border: 1px solid silver;
border-radius: 4px;
background: rgba(255,0,0,0.2);
}
.body {
height: 100%;
width: 100%;
@ -14,11 +34,9 @@ body {
}
.page {
height: 100%;
width: 100%;
padding-bottom: 12px;
background-image: linear-gradient(to bottom, #eee, #777)
!important;
background-image: linear-gradient(to bottom, #99c1f1, #1a5f64) !important;
}
.emph {

View File

@ -6,26 +6,53 @@
</head>
<body>
<ul layout:fragment="menu">
<li class="nav-item" sec:authorize="hasRole('timetrack_user')"><a class="nav-link" th:href="@{/contact/contacts}">abbrechen</a></li>
<li class="nav-item dropdown menudangerbutton" sec:authorize="hasRole('timetrack_user')"><a class="nav-link dropdown-toggle" href="#"
id="navbarScrollingDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">Eintrag löschen</a>
<ul class="dropdown-menu dropdown-menu-light" aria-labelledby="navbarScrollingDropdown">
<li><a class="dropdown-item" th:href="@{/contact/delete/{id}(id=${contactBean.pk})}">endgültig löschen</a></li>
</ul></li>
</ul>
<main layout:fragment="content">
<div class="container">
<form th:action="@{/contact/insert}" th:object="${contactBean}" method="post">
<p>
Inhalt von Eintrag <span th:text="*{pk}"></span>:
</p>
<input type="hidden" th:field="*{pk}" />
<div class="form-group">
<label>Vorname</label> <input type="text" th:field="*{forename}" class="form-control" />
<div class="container formpane">
<form th:action="@{/contact/upsert}" th:object="${contactBean}" method="post">
<div class="row mb-3">
<label for="inputPk" class="col-sm-2 col-form-label">Inhalt von Eintrag</label>
<div class="col-sm-10">
<input id="inputPk" type="text" th:field="*{pk}" class="form-control" readonly="readonly" />
</div>
</div>
<div class="form-group">
<label>Nachname</label> <input type="text" th:field="*{surname}" class="form-control" />
<div class="row mb-3">
<label for="inputForename" class="col-sm-2 col-form-label">Vorname</label>
<div class="col-sm-10">
<input id="inputForename" type="text" th:field="*{forename}" class="form-control" />
</div>
</div>
<div class="form-group">
<label>Kontakt</label> <input type="text" th:field="*{contact}" class="form-control" />
<div class="row mb-3">
<label for="inputSurname" class="col-sm-2 col-form-label">Nachname</label>
<div class="col-sm-10">
<input id="inputSurname" type="text" th:field="*{surname}" class="form-control" />
</div>
</div>
<div class="form-group">
<label>Typ</label> <input type="text" th:field="*{type}" class="form-control" />
<div class="row mb-3">
<label for="inputContact" class="col-sm-2 col-form-label">Kontakt</label>
<div class="col-sm-10">
<input id="inputContact" type="text" th:field="*{contact}" class="form-control" />
</div>
</div>
<div class="row mb-3">
<label for="inputType" class="col-sm-2 col-form-label">Typ</label>
<div class="col-sm-10">
<select id="inputType" class="form-control select2-single" th:field="*{type}">
<option th:each="i : ${types}" th:value="${i}" th:text="${i.literal}"></option>
</select>
</div>
</div>
<div class="row mb-3">
<div class="col-sm-2">Änderung</div>
<div class="col-sm-10">
<button type="submit" class="btn btn-success">speichern</button>
<button type="submit" class="btn btn-danger" th:formaction="@{/contact/list}">verwerfen</button>
</div>
</div>
</form>
</div>

View File

@ -32,7 +32,7 @@
<li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href="#" id="navbarScrollingDropdown" role="button"
data-bs-toggle="dropdown" aria-expanded="false"> Module </a>
<ul class="dropdown-menu dropdown-menu-light" aria-labelledby="navbarScrollingDropdown">
<li><a class="dropdown-item" th:href="@{/contact/contacts}">Kontakte</a></li>
<li><a class="dropdown-item" th:href="@{/contact/list}">Kontakte</a></li>
<li><hr /></li>
<li><a class="dropdown-item" th:href="@{/logout}">[[${currentUser}]] abmelden</a></li>
</ul></li>