You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
862 B
39 lines
862 B
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title></title>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>Edit <%=article.title%>'s Info</h1>
|
|
<nav>
|
|
<ul>
|
|
<li>
|
|
<a href="/">Home</a>
|
|
</li>
|
|
<li>
|
|
<a href="/articles">Articles Index</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</header>
|
|
<main>
|
|
<h2>Article Attributes:</h2>
|
|
<form action="/articles/<%=article._id%>?_method=PUT" method="post">
|
|
<input type="text" name="title" value="<%=article.title%>"/><br/>
|
|
<textarea name="body">
|
|
<%=article.body%>
|
|
</textarea><br/>
|
|
Choose and author:
|
|
<select name="authorId">
|
|
<% for(var i = 0; i < authors.length; i++) { %>
|
|
<option value="<%=authors[i]._id %>"><%=authors[i].name %></option>
|
|
<% } %>
|
|
</select><br/>
|
|
<input type="submit" value="Update Article"/>
|
|
</form>
|
|
</main>
|
|
</body>
|
|
</html>
|