diff --git a/project/customer/views/clients_ajax.py b/project/customer/views/clients_ajax.py index eae393f..7fbcf73 100644 --- a/project/customer/views/clients_ajax.py +++ b/project/customer/views/clients_ajax.py @@ -59,7 +59,7 @@ def clients_add_ajax(request): 'field_errors': form.errors, # ошибки полей 'form_errors': non_field_errors, # ошибки формы #'reload': form.is_valid() and 'reload_on_success' in request.GET - 'reload': False, + 'reload': True, 'id': new_client_id, 'name': new_client_str, } @@ -90,7 +90,7 @@ def clients_edit_ajax(request, id): 'success': form.is_valid(), 'field_errors': form.errors, # ошибки полей 'form_errors': non_field_errors, # ошибки формы - 'reload': False + 'reload': True, } return HttpResponse(json.dumps(data), mimetype='application/json') @@ -110,6 +110,6 @@ def clients_delete_ajax(request, id): data = { 'success': True, 'message': {'title': 'Инфо', 'msg': 'Контрагент удалён.',}, - 'reload': False + 'reload': True, } return HttpResponse(json.dumps(data), mimetype='application/json') diff --git a/project/static/css/style.css b/project/static/css/style.css index 23a9457..731489a 100644 --- a/project/static/css/style.css +++ b/project/static/css/style.css @@ -221,3 +221,4 @@ div.blockMsg { width: 100%; height: 100%; top: 0; left: 0; text-align: center; } .doc_status2 {color:blue;} tr.doc-row:hover {cursor:pointer;} +#clients tr:nth-child(odd) {background: #f5f5f5;} diff --git a/project/static/js/dialogs.js b/project/static/js/dialogs.js index a95e389..33cdd7b 100644 --- a/project/static/js/dialogs.js +++ b/project/static/js/dialogs.js @@ -106,7 +106,7 @@ function update_form_fields(form, obj_values) { for (var key in obj_values) if (obj_values.hasOwnProperty(key)) { var value = obj_values[key]; - var input = $('input[name="' + key + '"]', form); + var input = $(':input[name="' + key + '"]', form); if (input) { var input_type = input.attr('type'); if (input_type == 'checkbox' || input_type == 'radio') diff --git a/project/templates/customer/clients/list.html b/project/templates/customer/clients/list.html index df2efbc..fed1e1b 100644 --- a/project/templates/customer/clients/list.html +++ b/project/templates/customer/clients/list.html @@ -24,25 +24,7 @@ {% for obj in page.object_list %} - - - - {{ obj.name }} - - - {{ obj.contact_name }} - {{ obj.contact_phone }} - - - Редактировать - - - - - [X] - - - + {% include "customer/clients/list_item.html" %} {% endfor %} diff --git a/project/templates/customer/clients/list_item.html b/project/templates/customer/clients/list_item.html new file mode 100644 index 0000000..85564a0 --- /dev/null +++ b/project/templates/customer/clients/list_item.html @@ -0,0 +1,19 @@ + + + + {{ obj.name }} + + + {{ obj.contact_name }} + {{ obj.contact_phone }} + + + Редактировать + + + + + [X] + + + diff --git a/project/templates/docs/aktrabot/as_pdf.html b/project/templates/docs/aktrabot/as_pdf.html index c421070..da28691 100644 --- a/project/templates/docs/aktrabot/as_pdf.html +++ b/project/templates/docs/aktrabot/as_pdf.html @@ -113,7 +113,8 @@ на сумму {{ obj.sum_full_total_price|floatformat:2 }} руб.

- + Вышеперечисленные услуги выполнены полностью и в срок. Заказчик претензий по объему, качеству и срокам оказания услуг не имеет. +

{{ obj.doc_text|safe }} diff --git a/project/xls_templates/aktrabot.xls b/project/xls_templates/aktrabot.xls index abec873..d6f9064 100644 Binary files a/project/xls_templates/aktrabot.xls and b/project/xls_templates/aktrabot.xls differ