1. Refactoring form objects and database objects to use inheritance and abstract base class for consistency and reduced redundancy.\n2. Contact us page button links updated to resolve error of missing link causing page refresh instead of expected functionality.
This commit is contained in:
114
templates/pages/store/_supplier.html
Normal file
114
templates/pages/store/_supplier.html
Normal file
@@ -0,0 +1,114 @@
|
||||
{% extends 'layouts/layout.html' %}
|
||||
|
||||
{% block title %}{{ model.title }}{% endblock %}
|
||||
|
||||
{% block page_body %}
|
||||
{% set supplier = model.supplier %}
|
||||
{% set block_id = 'styles' %}
|
||||
{% include 'layouts/_shared_store.html' %}
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/sections/store.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pages/page_store_supplier.css') }}">
|
||||
|
||||
<!-- HTML content -->
|
||||
<div class="card">
|
||||
<form id="{{ model.ID_FORM_SUPPLIER }}" class="{{ model.FLAG_CONTAINER }}" action="{{ url_for('routes_store.supplier') }}" method="POST">
|
||||
<h2 class="label-title">Supplier</h2>
|
||||
{{ model.form.hidden_tag() }}
|
||||
<div class="card subcard">
|
||||
<div class="container-input">
|
||||
{{ model.form.name_company.label }}
|
||||
{{ model.form.name_company(size=100) }}
|
||||
{% for error in model.form.name_company.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card subcard">
|
||||
<h3>Contact</h3>
|
||||
<div class="container-input">
|
||||
{{ model.form.name_contact.label }}
|
||||
{{ model.form.name_contact(size=50) }}
|
||||
{% for error in model.form.name_contact.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.department_contact.label }}
|
||||
{{ model.form.department_contact(size=50) }}
|
||||
{% for error in model.form.department_contact.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.id_address.label }}
|
||||
{{ model.form.id_address() }}
|
||||
{% for error in model.form.id_address.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
<button id="{{ model.ID_BUTTON_ADD_SUPPLIER }}">Add new address</button>
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.phone_number.label }}
|
||||
{{ model.form.phone_number(size=20) }}
|
||||
{% for error in model.form.phone_number.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.fax.label }}
|
||||
{{ model.form.fax(size=20) }}
|
||||
{% for error in model.form.fax.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.email.label }}
|
||||
{{ model.form.email(size=254) }}
|
||||
{% for error in model.form.email.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.website.label }}
|
||||
{{ model.form.website(size=254) }}
|
||||
{% for error in model.form.website.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.id_currency.label }}
|
||||
{{ model.form.id_currency() }}
|
||||
{% for error in model.form.id_currency.errors %}
|
||||
<p class="{{ model.FLAG_ERROR }}">{{ error }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.recaptcha() }}
|
||||
</div>
|
||||
<div class="container-input">
|
||||
{{ model.form.submit() }}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Include JavaScript -->
|
||||
<script src="{{ url_for('routes_store.scripts_section_store') }}"></script>
|
||||
<script type="module" src="{{ url_for('static', filename='js/pages/store/supplier.js') }}"></script>
|
||||
|
||||
<!--
|
||||
<script>
|
||||
// pass arguments from model to JS
|
||||
var hashPageCurrent = "{{ model.HASH_PAGE_STORE_SUPPLIER }}";
|
||||
|
||||
/*
|
||||
// hookup elements
|
||||
$(document).ready(function() {
|
||||
console.log('Hooking up store supplier page...');
|
||||
hookupStorePageSupplier();
|
||||
});
|
||||
*/
|
||||
</script>
|
||||
-->
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user