extends layout.pug

block content
  a(href='..') <i class="fas fa-arrow-left"></i> Back to #{req.params.user}'s wishlist
  form(id='refreshform', method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/refresh/${req.params.id}`)
  form.inline(method='POST', action=`${_CC.config.base}wishlist/${req.params.user}/note/${req.params.id}`)
    .columns
      .column
        .field
          label.label Name
          .control
            input.input(name='name', value=item.name)
      .column
        .field
          label.label URL
          .control
            input.input(name='url', value=item.url)
      .column
        .field
          label.label Price
          .control
            input.input(name='price', value=item.price)
      .column
        .field
          label.label Image URL
          .control
            input.input(name='image', value=item.image)
      .column.is-narrow
          .field
            label.label Get Product Data
            input.is-ghost.button(type='submit', value='Refresh Data' style='width: 100%;', form='refreshform')
    .field
      label.label Note
      .control
        textarea.textarea(
          name='note'
        )= item.note
    .field.inline
      .control.inline
        input.button.is-primary(type='submit' value='Save Item')