module.exports = ({
  action,
  csrfToken,
  errors,
  place
}) =>
  `
  <form method="POST" action="${action}" class="form">
    <input type="hidden" name="_csrf" value="${csrfToken}" />
    ${buildErrors(errors)}
    <div class="form__section">
      <label for="place_name">Name</label>
      <input type="text" name="place[name]" id="place_name" value="${place.name}"  />
    </div>
    <div class="form__section">
      <label for="place_slug">Slug</label>
      <input type="text" name="place[slug]" id="place_slug" value="${place.slug}"  />
    </div>
    <div class="form__section">
      <label for="place_address">Address</label>
      <input type="text" name="place[address]" id="place_address" value="${place.address}"  />
    </div>
    <div class="form__section">
      <label for="place_lat">Latitude</label>
      <input type="text" name="place[lat]" id="place_lat" value="${place.lat}"  />
    </div>
    <div class="form__section">
      <label for="place_long">Longitude</label>
      <input type="text" name="place[long]" id="place_long" value="${place.long}"  />
    </div>
    <div class="form__section">
      <label for="place_description">Description</label>
      <input type="text" name="place[description]" id="place_description" value="${place.description}"  />
    </div>
    <div class="form__section">
      <label for="place_content">Content</label>
      <textarea name="place[content]" id="place_content" placeholder="Enter markdown content here..." rows="1" data-js="textarea" >${place.content}</textarea>
    </div>
    <div class="form__section">
      <button type="submit">Submit</button>
      <a href="/${place.slug}">Cancel</a>
    </div>
  </form>
  `

const buildErrors = (errors) => {
  if (!errors || errors.length === 0) return ''
  return errors.map(e => `<div class="form__errors">${e}</div>`)
}

@@ -365,16 +365,24 @@
 .name%7D%22 
+required
  /%3E%0A    
@@ -541,24 +541,32 @@
 lace.slug%7D%22 
+required
  /%3E%0A    %3C/di
@@ -740,16 +740,24 @@
 dress%7D%22 
+required
  /%3E%0A    
@@ -920,16 +920,24 @@
 e.lat%7D%22 
+required
  /%3E%0A    
@@ -1105,16 +1105,24 @@
 .long%7D%22 
+required
  /%3E%0A    
@@ -1320,16 +1320,24 @@
 ption%7D%22 
+required
  /%3E%0A    
@@ -1554,16 +1554,24 @@
 xtarea%22 
+required
 %3E$%7Bplace

Make sure each input is required