Skip to content

Commit

Permalink
fix(bo): 🐛 Fix 500 on users page due to missing model for email (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattboll authored Dec 9, 2024
1 parent 5e6e447 commit 873a387
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
@Controller
@RequiredArgsConstructor
public class BOUserController {
private static final String EMAIL = "email";
private final UserService userService;

@GetMapping("/bo/users")
public String getBOUser(Model model) {
model.addAttribute(EMAIL, new EmailDTO());
model.addAttribute("users", userService.findAll());
return "bo/users";
}
Expand Down
4 changes: 2 additions & 2 deletions dossierfacile-bo/src/main/resources/templates/bo/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<div>
<div class="container">
<form th:method="post" th:action="@{/bo/users}" th:object="${email}" >
<label for="name" class="form-label" id="">Email:</label>
<input required type="text" name="name" id="name" placeholder="on domain dossierfacile.fr ..."
<label for="email" class="form-label" id="">Email:</label>
<input required type="text" name="name" id="email" placeholder="on domain dossierfacile.fr ..."
oninput="setCustomValidity('')" th:field="*{email}"/>
<button style="font-size: initial;float: right;padding: 10px 16px 11px;" type="submit" name='action' value='ROLE_ADMIN' class="btn btn-info">create admin</button>
<button style="margin-right: 10px;font-size: initial;float: right;padding: 10px 16px 11px;" type="submit" name='action' value='ROLE_OPERATOR' class="btn btn-success">create operator</button>
Expand Down

0 comments on commit 873a387

Please sign in to comment.