Skip to content

Commit

Permalink
Changed box vendor ID field back to text to allow for Amazon's item I…
Browse files Browse the repository at this point in the history
…D codes and added Sam's Club and Amazon lookup links
  • Loading branch information
westbl committed May 25, 2019
1 parent a43e305 commit 399f919
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions chezbetty/templates/admin/box_edit.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,17 @@

<td>{{ vb.vendor.name }} <input type="hidden" name="box-vendor-id-{{ vb.id}}" value="{{ vb.vendor_id }}"></td>
<td>
<input type="number" min="0" class="form-control" id="box-vendor-item_num-{{ vb.id }}" name="box-vendor-item_num-{{ vb.id }}" value="{{ vb.item_number }}">
<input type="text" class="form-control" id="box-vendor-item_num-{{ vb.id }}" name="box-vendor-item_num-{{ vb.id }}" value="{{ vb.item_number }}">
</td>
<td>
{% if vb.vendor.name == "Costco" %}
<a href="http://www.costcobusinessdelivery.com/CatalogSearch?storeId=11301&catalogId=11701&langId=-1&keyword={{ vb.item_number }}">View on Costco</a>
{% elif vb.vendor.name == "Sam's Club" %}
<a href="https://duckduckgo.com/?q=\site%3Asamsclub.com+{{ vb.item_number }}+{{ box.name }}&t=h_&ia=web">View on Sam's Club</a>
{% elif vb.vendor.name == "Boxed" %}
<a href="https://duckduckgo.com/?q=\site%3Aboxed.com+{{ vb.item_number }}+{{ box.name }}&t=h_&ia=web">View on Boxed</a>
{% elif vb.vendor.name == "Amazon" %}
<a href="https://www.amazon.com/dp/{{ vb.item_number }}">View on Amazon</a>
{% endif %}
</td>
</tr>
Expand All @@ -194,7 +198,7 @@
</select>
</td>
<td>
<input type="number" min="0" class="form-control" id="box-vendor-item_num-new" name="box-vendor-item_num-new">
<input type="text" class="form-control" id="box-vendor-item_num-new" name="box-vendor-item_num-new">
</td>

</tr>
Expand Down
2 changes: 1 addition & 1 deletion chezbetty/templates/admin/boxes_add.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<tr>
<td>Vendor Number</td>
<td>{{ forms.dropdown("box-vendor", vendors, d['box-vendor']|default("0")) }}</td>
<td><input type="number" min="0" class="form-control" id="box-vendor-item_num" name="box-vendor-item_num" value="{{ d['box-vendor-item_num'] }}"></td>
<td><input type="text" class="form-control" id="box-vendor-item_num" name="box-vendor-item_num" value="{{ d['box-vendor-item_num'] }}"></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion chezbetty/templates/admin/item_edit.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
</select>
</td>
<td>
<input type="number" min="0" class="form-control" id="item-vendor-item_num-new" name="item-vendor-item_num-new">
<input type="text" class="form-control" id="item-vendor-item_num-new" name="item-vendor-item_num-new">
</td>

</tr>
Expand Down

0 comments on commit 399f919

Please sign in to comment.