add change_maximum size
Co-Authored-By: xxnitram <xxnitram@users.noreply.github.com>
This commit is contained in:
@ -51,9 +51,14 @@
|
||||
<textarea class="form-control" id="description" required
|
||||
rows="3" th:name="description"></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-3">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" id="maxInfiniteUsers" th:name="maxInfiniteUsers"
|
||||
type="checkbox">
|
||||
<label class="custom-control-label" for="maxInfiniteUsers">Anzahl unbegrenzt</label>
|
||||
</div>
|
||||
<div class="form-group mt-3" id="userMaximum">
|
||||
<label for="userMaximum">Teilnehmeranzahl</label>
|
||||
<input class="form-control" id="userMaximum" required th:name="userMaximum"
|
||||
<input class="form-control" th:name="userMaximum"
|
||||
type="number" min="1" max="10000">
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
@ -111,6 +116,12 @@
|
||||
$('#lectureParent').fadeToggle();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#maxInfiniteUsers').change(function () {
|
||||
$('#userMaximum').fadeToggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
@ -6,7 +6,11 @@
|
||||
<meta charset="utf-8">
|
||||
<title>Gruppenerstellung</title>
|
||||
<th:block th:fragment="headcontent">
|
||||
<!-- Links, Skripts, Styles hier einfügen! -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
||||
rel="stylesheet">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
|
||||
</th:block>
|
||||
</head>
|
||||
<body>
|
||||
@ -46,10 +50,15 @@
|
||||
<textarea class="form-control" id="description" required
|
||||
rows="3" th:name="description"></textarea>
|
||||
</div>
|
||||
<div class="form-group mt-3">
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" id="maxInfiniteUsers" th:name="maxInfiniteUsers"
|
||||
type="checkbox">
|
||||
<label class="custom-control-label" for="maxInfiniteUsers">Anzahl unbegrenzt</label>
|
||||
</div>
|
||||
<div class="form-group mt-3" id="userMaximum">
|
||||
<label for="userMaximum">Teilnehmeranzahl</label>
|
||||
<input class="form-control" id="userMaximum" required th:name="userMaximum"
|
||||
type="number" min="1">
|
||||
<input class="form-control" th:name="userMaximum"
|
||||
type="number" min="1" max="10000">
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<input class="custom-control-input" id="visibility" th:name="visibility"
|
||||
@ -76,6 +85,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#maxInfiniteUsers').change(function () {
|
||||
$('#userMaximum').fadeToggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -70,13 +70,14 @@
|
||||
<div class="col-3" style="white-space: nowrap">
|
||||
<div style="display: inline-block; margin: 0">
|
||||
<h2>Mitglieder</h2>
|
||||
<div>
|
||||
<h4>
|
||||
<div th:switch="${group.getUserMaximum() != 100000}">
|
||||
<h4 th:case="${true}">
|
||||
<a th:text="${group.getMembers().size()}"></a>
|
||||
<a>von maximal</a>
|
||||
<a th:text="${group.getUserMaximum()}"></a>
|
||||
<a>Benutzern.</a>
|
||||
</h4>
|
||||
<h4 th:case="${false}"> unbegrenzte Teilnehmeranzahl</h4>
|
||||
</div>
|
||||
<div th:if="${group.getRoles().get(user.getId()) == admin}">
|
||||
<form method="get"
|
||||
|
||||
@ -37,13 +37,14 @@
|
||||
<div class="row">
|
||||
<div class="col-10">
|
||||
<h1>Mitglieder bearbeiten</h1>
|
||||
<div>
|
||||
<h5>
|
||||
<div th:switch="${group.getUserMaximum() != 100000}">
|
||||
<h5 th:case="${true}">
|
||||
<a th:text="${group.getMembers().size()}"></a>
|
||||
<a>von maximal</a>
|
||||
<a th:text="${group.getUserMaximum()}"></a>
|
||||
<a>Benutzern.</a>
|
||||
</h5>
|
||||
<h5 th:case="${false}"> unbegrenzte Teilnehmeranzahl</h5>
|
||||
</div>
|
||||
<div class="shadow p-2" style="border: 10px solid aliceblue; background: aliceblue">
|
||||
<div class="form-group pt-4" th:if="${account.getRoles().contains('orga')}">
|
||||
@ -68,6 +69,24 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="form-group pt-4">
|
||||
<form action="/gruppen2/details/members/changeMaximum" method="post">
|
||||
<div class="row">
|
||||
<div class="col-10">
|
||||
<label for="maximum">maximale Teilnehmer ändern</label>
|
||||
<input class="form-control" id="maximum" required th:name="maximum"
|
||||
type="number" th:min="${group.getMembers().size()}" max="10000">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button class="btn btn-primary"
|
||||
style="background: #52a1eb; border-style: none"
|
||||
th:name="group_id" th:value="${group.getId()}"
|
||||
type="submit">Erstellen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<table class="table" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -92,7 +111,7 @@
|
||||
type="hidden">
|
||||
<button class="btn btn-warning btn-sm" type="submit" style="margin: 5px">Rolle
|
||||
ändern
|
||||
</button><!-- th:if -->
|
||||
</button>
|
||||
</form>
|
||||
<form action="/gruppen2/details/members/deleteUser" method="post">
|
||||
<input th:name="group_id" th:value="${group.getId()}"
|
||||
|
||||
Reference in New Issue
Block a user