Skip to content

Commit 8671a05

Browse files
committed
modify submit
1 parent c86b410 commit 8671a05

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

spring-security-oauth/src/main/java/org/baeldung/web/RedditController.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ public String submit(Model model, @RequestParam Map<String, String> formParams)
7979
@RequestMapping("/post")
8080
public String showSubmissionForm(Model model) throws JsonProcessingException, IOException {
8181
try {
82-
List<String> subreddits = getSubreddit();
83-
model.addAttribute("subreddits", subreddits);
84-
8582
String needsCaptchaResult = needsCaptcha();
8683
if (needsCaptchaResult.equalsIgnoreCase("true")) {
8784
String newCaptchaResult = getNewCaptcha();

spring-security-oauth/src/main/webapp/WEB-INF/jsp/submissionForm.jsp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@
2323
<br><br>
2424
<div class="form-group">
2525
<label class="col-sm-3">Subreddit</label>
26-
<span class="col-sm-9">
27-
<select name="sr">
28-
<c:forEach items="${subreddits}" var="item">
29-
<option value="${item}">${item}</option>
30-
</c:forEach>
31-
</select>
32-
</span>
26+
<span class="col-sm-9"><input name="sr" placeholder="Subreddit" class="form-control" /></span>
3327
</div>
3428
<br><br>
3529

0 commit comments

Comments
 (0)