Compare commits

...

2 Commits

  1. 9
      project/commons/context_processors.py
  2. 4
      project/customer/views/clients.py
  3. 4
      project/customer/views/profile.py
  4. 1
      project/settings.py
  5. 8
      project/static/css/style.css
  6. 8
      project/static/js/profile/search-main-external-api.js
  7. 2
      project/templates/callback/callback_form.html
  8. 2
      project/templates/callback/req_avail_new.txt
  9. 5
      project/templates/docs/_base/base_add.html

@ -0,0 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf import settings
def get_dadata_api_key(request):
return {
"dadata_api_key": settings.DADATA_API_KEY
}

@ -25,13 +25,11 @@ def clients_list(request, page_num=None):
page, pagination_form = pagination(request, client_list, page_num) page, pagination_form = pagination(request, client_list, page_num)
client_form = forms.ClientForm() client_form = forms.ClientForm()
dadata_api_key = settings.DADATA_API_KEY
dictionary = { dictionary = {
'page': page, 'page': page,
'pagination_form': pagination_form, 'pagination_form': pagination_form,
'client_form': client_form, 'client_form': client_form
'dadata_api_key': dadata_api_key
} }
return render(request, template_name, dictionary) return render(request, template_name, dictionary)

@ -87,7 +87,6 @@ def profile_edit(request):
accounts = models.BankAccount.objects.get_all(profile) accounts = models.BankAccount.objects.get_all(profile)
bank_account_form = forms.BankAccountForm(initial={'company': profile}) bank_account_form = forms.BankAccountForm(initial={'company': profile})
dadata_api_key = settings.DADATA_API_KEY
if request.method == 'POST': if request.method == 'POST':
form = form_class(data=request.POST, files=request.FILES, instance=profile) form = form_class(data=request.POST, files=request.FILES, instance=profile)
@ -113,8 +112,7 @@ def profile_edit(request):
'form': form, 'form': form,
'profile': profile, 'profile': profile,
'accounts': accounts, 'accounts': accounts,
'bank_account_form': bank_account_form, 'bank_account_form': bank_account_form
'dadata_api_key': dadata_api_key
} }
return render(request, template_name, dictionary) return render(request, template_name, dictionary)

@ -140,6 +140,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
'sekizai.context_processors.sekizai', 'sekizai.context_processors.sekizai',
'project.callback.context_processors.add_forms', 'project.callback.context_processors.add_forms',
'project.customer.context_processors.license_check_soon_ends', 'project.customer.context_processors.license_check_soon_ends',
'project.commons.context_processors.get_dadata_api_key',
) )

@ -571,6 +571,7 @@ table.list tr td {font-size:14px;color:#313942;padding:7px;word-break: break-all
.filters ul li a.selected { color:#646669;text-decoration:none;} .filters ul li a.selected { color:#646669;text-decoration:none;}
.filters select {font-size:13px;margin-left:20px;} .filters select {font-size:13px;margin-left:20px;}
#filters_form {padding:10px 25px;overflow:hidden;} #filters_form {padding:10px 25px;overflow:hidden;}
#filters_form #id_doc_date {padding:10px 0 10px 20px; margin:0;font-size:13px;width:100%;height:auto;}
.pagination {margin-top: 5px; padding-top: 1ex; width: 99%; color:#646669;font-size:13px;} .pagination {margin-top: 5px; padding-top: 1ex; width: 99%; color:#646669;font-size:13px;}
.pagination select {font-size:13px;} .pagination select {font-size:13px;}
@ -624,6 +625,13 @@ tr.doc-row:hover {cursor:pointer;}
.white_bg {background:#fff!important;} .white_bg {background:#fff!important;}
#req-avail-form {display:none;} #req-avail-form {display:none;}
#req-avail-form #id_name, #id_phone{width: 260px;font-size: 16px;font-family: Arial;font-style: italic;height: 35px;}
#req-avail-form #id_message {width:260px;padding: 10px 0 0 10px;}
#req-avail-form #id_captcha_1{float: right;width: 90px;height: 35px;font-size: 18px;}
#req-avail-form .captcha_refresh {margin: 0 0 0 10px;}
#req-avail-form .green-btn2 {background: #fed13e;border: none;cursor: pointer;font-size: 22px;padding: 15px 40px;color: #4e5661;font-family: "Arial Narrow", Arial, sans-serif;font-stretch: ultra-condensed;font-weight: bold;text-transform: uppercase;}
#req-avail-form .green-btn2:hover {background: #ffca3e;}
.close-message {display:inline-block;float:right;} .close-message {display:inline-block;float:right;}
.profile_title {font-size:16px;height:33px;width:790px;border-bottom:solid 1px #fed13e;margin: 10px 0 25px 0;} .profile_title {font-size:16px;height:33px;width:790px;border-bottom:solid 1px #fed13e;margin: 10px 0 25px 0;}
.profile_label {float:left;width:285px;font-size:13px;height:36px;line-height:36px;color: #797979;} .profile_label {float:left;width:285px;font-size:13px;height:36px;line-height:36px;color: #797979;}

@ -65,8 +65,10 @@ $(document).ready(function() {
if (data.name && data.name.full) if (data.name && data.name.full)
profileOrgFullName.val(join([data.opf && data.opf.full || "", data.name.full], " ")); profileOrgFullName.val(join([data.opf && data.opf.full || "", data.name.full], " "));
if (data.address) { if (data.address) {
profileAddress.val(data.address.value); var address = data.address.value;
profileLegalAddress.val(data.address.value); profileAddress.val(address);
profileLegalAddress.val(address);
profilePostalAddress.val(address);
} }
if (data.management) { if (data.management) {
@ -131,7 +133,7 @@ $(document).ready(function() {
profileInputs = [ profileInputs = [
profileOrgName, profileOrgFullName, profileInn, profileKpp, profileOrgName, profileOrgFullName, profileInn, profileKpp,
profileOqrn, profileBossName, profileBossSurname, profileBossMiddleName, profileOqrn, profileBossName, profileBossSurname, profileBossMiddleName,
profileAddress, profileLegalAddress profileAddress, profileLegalAddress, profilePostalAddress
]; ];
} else { } else {

@ -1,7 +1,7 @@
<form id="req-avail-form" action="" method="post" title="Задать вопрос"> <form id="req-avail-form" action="" method="post" title="Задать вопрос">
{% csrf_token %} {% csrf_token %}
<div class='grey-box'> <div class='grey-box'>
<div style="margin: 0px 0px 20px 0px;">Оставьте свои контакты и мы перезвоним вам, ответим на все ваши вопросы</div> <div style="margin: 0px 0px 20px 0px;font-size:18px;color:#646669;font-weight: normal;font-stretch: ultra-condensed;font-family: Arial Narrow, Arial, sans-serif;">Оставьте свои контакты и мы перезвоним вам, ответим на все ваши вопросы</div>
<p>{{ reqf.name }}</p> <p>{{ reqf.name }}</p>
<p>{{ reqf.phone }}</p> <p>{{ reqf.phone }}</p>
<p>{{ reqf.message }}</p> <p>{{ reqf.message }}</p>

@ -1,5 +1,5 @@
{% load url from future %} {% load url from future %}
Заказ товара с сайта Запрос обратной связи с сайта dokumentor.ru
Имя клиента: {{ req.name }} Имя клиента: {{ req.name }}
Телефон/E-mail: {{ req.phone }} Телефон/E-mail: {{ req.phone }}

@ -23,4 +23,9 @@
<script src="{{ STATIC_URL }}js/docs/client.form.js"></script> <script src="{{ STATIC_URL }}js/docs/client.form.js"></script>
{% include form_template_js %} {% include form_template_js %}
<script src="{{ STATIC_URL }}js/lib/jquery.suggestions.min.js"></script>
<script src="{{ STATIC_URL }}js/client/search-external-api.js"></script>
{% include 'hbs/bank-tpl.html' %}
{% endblock %} {% endblock %}

Loading…
Cancel
Save