<%- include("../partials/header") %>
<div class="container">
	<div class="row">
		<h1 style="text-align:center">
			Edit <%=campground.name%>
		</h1>
		<div style="width:30%; margin: 30px auto">
			<form method="POST" action="/campgrounds/<%=campground._id%>?_method=PUT" enctype="multipart/form-data">
				<div class="form-group">
					<input type="text" class="form-control" name="name" value="<%=campground.name%>">
				</div>
				<div class="form-group">
					<input type="number" name="price" class="form-control" value="<%=campground.price%>" min="1" step="1">
				</div>
				<div class="form-group">
                    <label for="image">Image</label>
                    <input type="file" id="image" name="image" accept="image/*" required>
                </div>
				<div class="form-group">
					<input type="text" name="description" class="form-control" value="<%=campground.description%>">
				</div>
				<div class="form-group">
					<button class="btn btn-md btn-primary btn-block">
					Submit
					</button>
				</div>
			</form>
			<a href="/campgrounds">Go back</a>
		</div>
	</div>
</div>
<%- include("../partials/footer") %>