From db9d524bf9084f34b8b93c428364152e498be2b2 Mon Sep 17 00:00:00 2001 From: Mukhtar Date: Fri, 19 Aug 2016 17:40:30 +0300 Subject: [PATCH 1/3] #ARC-4 Fixes bugs --- projects/forms.py | 1 + projects/views.py | 2 +- ratings/templatetags/specializtions_tags.py | 1 + users/templates/contractor_profile.html | 1 + users/templates/portfolio_create_form.html | 4 +++- users/templatetags/user_tags.py | 2 ++ 6 files changed, 9 insertions(+), 2 deletions(-) diff --git a/projects/forms.py b/projects/forms.py index 75783c4..0771918 100644 --- a/projects/forms.py +++ b/projects/forms.py @@ -151,6 +151,7 @@ class RealtyForm(forms.ModelForm): class PortfolioForm(forms.ModelForm): duplicate = forms.BooleanField(required=False,label='Some label here') + images_ids = forms.CharField(required=True) class Meta: model = Portfolio diff --git a/projects/views.py b/projects/views.py index ca8d423..f921360 100644 --- a/projects/views.py +++ b/projects/views.py @@ -660,7 +660,7 @@ def contractor_portfolio_create(request): work_sell.contractor = instance.user work_sell.save() - images_ids = request.POST.get('images-ids').split(';')[:-1] + images_ids = request.POST.get('images_ids').split(';')[:-1] for pk in images_ids: picture = Picture.objects.get(pk=pk) temp_file = ContentFile(picture.file.read()) diff --git a/ratings/templatetags/specializtions_tags.py b/ratings/templatetags/specializtions_tags.py index 564e8d5..6ef72bb 100644 --- a/ratings/templatetags/specializtions_tags.py +++ b/ratings/templatetags/specializtions_tags.py @@ -15,6 +15,7 @@ def specialization_widget(context, user_id, class_name=None): 'user_id': user_id, } + @register.inclusion_tag('templatetags/specializations_widget.html', takes_context=True) def specialization_team_widget(context, team_id): team_id = int(team_id) diff --git a/users/templates/contractor_profile.html b/users/templates/contractor_profile.html index b831ce4..4bc6c16 100644 --- a/users/templates/contractor_profile.html +++ b/users/templates/contractor_profile.html @@ -604,6 +604,7 @@ }); location.reload(); } else if (data.status == 'no') { + $.each(data.form_errors, function (k, v) { $('.error-' + k).html(v).show(); }); diff --git a/users/templates/portfolio_create_form.html b/users/templates/portfolio_create_form.html index 557c16d..f8fc71d 100644 --- a/users/templates/portfolio_create_form.html +++ b/users/templates/portfolio_create_form.html @@ -98,7 +98,7 @@ - + @@ -106,6 +106,8 @@
+ {{ portfolio_form.images_ids.errors.as_text }} Выберите файлы diff --git a/users/templatetags/user_tags.py b/users/templatetags/user_tags.py index be8033c..a8bf069 100644 --- a/users/templatetags/user_tags.py +++ b/users/templatetags/user_tags.py @@ -2,6 +2,8 @@ from django import template register = template.Library() + + @register.filter('has_group') def has_group(user, group_name): groups = user.groups.all().values_list('name', flat=True) From cbd8173342de58450b8063e8590bb2ba03d03f78 Mon Sep 17 00:00:00 2001 From: shishman Date: Fri, 19 Aug 2016 18:17:06 +0300 Subject: [PATCH 2/3] css edited --- assets/css/main.css | 22 ++++++++++++++-------- users/templates/contractor_office.html | 4 ++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 7e2b3f7..4a9dcfa 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1113,7 +1113,7 @@ footer:after { float: left; background-color: #F2F2F2; position: relative; - padding: 30px 0 0 0; + padding: 30px 0 30px 0; } .titleF1 { @@ -1243,9 +1243,9 @@ footer:after { background: none; } -.searchF1 { +/*.searchF1 { margin: 18px 0 0 0; -} +}*/ .searchInp { width: 100%; @@ -1371,6 +1371,7 @@ label { display: block; position: relative; float: left; + margin-right: 10px; } input[type="checkbox"] + span { @@ -1399,7 +1400,7 @@ input[type="checkbox"]:checked + span { font-weight: bold; color: #2c2c2c; float: left; - margin: 2px 0 0 18px; + margin: 2px 0 0 0px; } .linkSort { @@ -2030,7 +2031,7 @@ input[type="checkbox"]:checked + span { .galleryWork2 { width: 75%; - float: left; + float: right; } .galleryWork2 .col-lg-4:hover { @@ -2062,9 +2063,9 @@ input[type="checkbox"]:checked + span { border-color: #DFDFDF; } -.polsF3 { +/*.polsF3 { margin-bottom: 23px; -} +}*/ .mLeft { float: left; @@ -5568,7 +5569,7 @@ input[type="radio"]:checked + span { } .dashedCol4 { width: 254px; - height: 239px; + height: 199px; position: absolute; overflow: hidden; display: block; @@ -5732,4 +5733,9 @@ input[type="radio"]:checked + span { .linkSort button:focus{ outline: none; } +.executorBlock .dashedCol4{ + height: 136px; + margin: 11px 0 0 0; + padding: 26px 24px 26px 24px; +} /*end_new*/ \ No newline at end of file diff --git a/users/templates/contractor_office.html b/users/templates/contractor_office.html index 4aec367..de876f1 100644 --- a/users/templates/contractor_office.html +++ b/users/templates/contractor_office.html @@ -103,7 +103,7 @@ {{ contractor.team }}

Россия, Москва

- {# #} + {# #}
-
+
{% for p in portfolios %}
From 659e860c3b5404790bb798914781a1afa37ee5d1 Mon Sep 17 00:00:00 2001 From: shishman Date: Fri, 19 Aug 2016 19:48:48 +0300 Subject: [PATCH 3/3] css edited --- assets/css/main.css | 24 ++++++++++++++++++++++-- users/templates/user_profile_edit.html | 20 ++++++++++---------- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 4a9dcfa..0bf5b8c 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -5248,7 +5248,7 @@ input[type="radio"]:checked + span { padding: 0 15px; font-size: 15px; background-color: white; - color: #9c9c9c; + color: #444; float: left; margin-right: 26px; font-family: 'Arial-MT-Regular', sans-serif; @@ -5578,7 +5578,7 @@ input[type="radio"]:checked + span { .dashedCol4:after { content: ""; position: absolute; - height: 50px; + height: 23px; width: 100%; background: #fff; bottom: 0; @@ -5738,4 +5738,24 @@ input[type="radio"]:checked + span { margin: 11px 0 0 0; padding: 26px 24px 26px 24px; } +.doneBlock .new-dashed .dashedCol44{ + height: 117px; + margin-left: -35px; +} +#fileUploadContainer .list-new-new{ + margin-top: 15px; + margin-bottom: 15px; +} +#fileUploadContainer .list-new-new li{ + margin: 4px 0 4px 0; +} +.birth_edit_dat .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn){ + width: 190px; +} +.btn-submit-link{ + color: #333 !important; + background: #fff; + border-color: #ccc !important; + margin-bottom: 0 !important +} /*end_new*/ \ No newline at end of file diff --git a/users/templates/user_profile_edit.html b/users/templates/user_profile_edit.html index 419bfe9..04016ae 100644 --- a/users/templates/user_profile_edit.html +++ b/users/templates/user_profile_edit.html @@ -6,8 +6,8 @@ {% block content %} {% include 'partials/header.html' %} -
-
+
+
{% csrf_token %} @@ -99,7 +99,7 @@
-
+
{{ form.date_of_birth }}
@@ -115,7 +115,7 @@ -

{{ text }}

+

{{ text }}    

{% endfor %}
@@ -123,7 +123,7 @@
Сайт
Skype
-{#
Электронная почта:
#} +{#
Электронная почта:
#}
Телефон
@@ -136,9 +136,9 @@
-{#
#} -{# #} -{#
#} +{#
#} +{# #} +{#
#}
@@ -160,6 +160,6 @@ {% include 'partials/footer.html' %} -
-
+
+
{% endblock %}