Merge pull request #141 from hhu-propra2/prevent-private-lectures
prevent private lectures in frontend, still needs validation
This commit is contained in:
@ -61,13 +61,13 @@
|
||||
<input class="form-control" th:name="userMaximum"
|
||||
type="number" min="1" max="10000">
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<div class="custom-control custom-checkbox" id="privateCheckbox">
|
||||
<input class="custom-control-input" id="visibility" th:name="visibility"
|
||||
type="checkbox">
|
||||
<label class="custom-control-label" for="visibility">Private
|
||||
Gruppe</label>
|
||||
</div>
|
||||
<div class="custom-control custom-checkbox">
|
||||
<div class="custom-control custom-checkbox" id="lectureCheckbox">
|
||||
<input class="custom-control-input" id="lecture" th:name="lecture"
|
||||
type="checkbox">
|
||||
<label class="custom-control-label" for="lecture">Veranstaltung</label>
|
||||
@ -117,6 +117,18 @@
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#lecture').change(function () {
|
||||
$('#privateCheckbox').fadeToggle();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#visibility').change(function () {
|
||||
$('#lectureCheckbox').fadeToggle();
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('#maxInfiniteUsers').change(function () {
|
||||
$('#userMaximum').fadeToggle();
|
||||
@ -125,4 +137,4 @@
|
||||
</script>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -7,7 +7,6 @@ import mops.gruppen2.domain.Visibility;
|
||||
import mops.gruppen2.domain.event.Event;
|
||||
import mops.gruppen2.repository.EventRepository;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -155,9 +154,8 @@ class GroupServiceTest {
|
||||
assertThat(groupService.getAllGroupWithVisibilityPublic("test1").size()).isEqualTo(3);
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@Test
|
||||
void getAllGroupWithVisibilityPublicTestIsUserInGroup() {
|
||||
void getAllGroupWithVisibilityPublic_UserInGroup() {
|
||||
// eventService.saveEvent(new CreateGroupEvent(uuidFromInt(0), "test1", null, GroupType.SIMPLE, Visibility.PUBLIC, 20L));
|
||||
// eventService.saveEvent(new AddUserEvent(uuidFromInt(0), "test1", "test", "test", "test@test"));
|
||||
|
||||
|
Reference in New Issue
Block a user