Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bo): 🐛 Fix 500 on users page due to missing model for email #926

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading