Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed company contact information fields from template and cms/models #7401

Merged
merged 11 commits into from
Sep 21, 2021
12 changes: 0 additions & 12 deletions network-api/networkapi/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ def setUp(self):
ai_uses_personal_data='Yes',
ai_is_transparent='No',
ai_helptext='The AI is a black box and no one knows how it works',
email='test@example.org',
live_chat='http://example.org/chat',
phone_number='1-555-555-5555',
twitter='@TwitterHandle',
)
self.software_product_page = SoftwareProductPageFactory.create(
# page fields
Expand Down Expand Up @@ -353,10 +349,6 @@ def test_product_page_import_mappings(self):
self.assertEqual(mappings["Manages security help text"], "manage_vulnerabilities_helptext")
self.assertEqual(mappings["Has privacy policy"], "privacy_policy")
self.assertEqual(mappings["Privacy policy help text"], "privacy_policy_helptext")
self.assertEqual(mappings["Phone number"], "phone_number")
self.assertEqual(mappings["Live chat"], "live_chat")
self.assertEqual(mappings["Email address"], "email")
self.assertEqual(mappings["Twitter"], "twitter")

def test_general_product_page_import_mappings(self):
"""
Expand Down Expand Up @@ -433,10 +425,6 @@ def test_product_page_export_fields(self):
self.assertIn("Manages security help text", export_fields)
self.assertIn("Has privacy policy", export_fields)
self.assertIn("Privacy policy help text", export_fields)
self.assertIn("Phone number", export_fields)
self.assertIn("Live chat", export_fields)
self.assertIn("Email address", export_fields)
self.assertIn("Twitter", export_fields)

def test_general_page_export_fields(self):
export_fields = self.general_product_page.get_export_fields()
Expand Down
8 changes: 0 additions & 8 deletions network-api/networkapi/wagtailpages/factory/buyersguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ class Meta:
ai_uses_personal_data = LazyFunction(get_extended_yes_no_value)
ai_is_transparent = LazyFunction(get_extended_yes_no_value)
ai_helptext = Faker('sentence')
email = Faker('email')
live_chat = Faker('url')
phone_number = Faker('phone_number')
twitter = '@TwitterHandle'


class SoftwareProductPageFactory(ProductPageFactory):
Expand Down Expand Up @@ -234,10 +230,6 @@ def create_general_product_visual_regression_product(seed, pni_homepage):
ai_uses_personal_data='Yes',
ai_is_transparent='No',
ai_helptext='The AI is a black box and no one knows how it works',
email='test@example.org',
live_chat='http://example.org/chat',
phone_number='1-555-555-5555',
twitter='@TwitterHandle',
)


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 3.1.11 on 2021-09-17 00:50

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('wagtailpages', '0035_auto_20210910_2042'),
]

operations = [
migrations.RemoveField(
model_name='productpage',
name='email',
),
migrations.RemoveField(
model_name='productpage',
name='live_chat',
),
migrations.RemoveField(
model_name='productpage',
name='phone_number',
),
migrations.RemoveField(
model_name='productpage',
name='twitter',
),
]
44 changes: 0 additions & 44 deletions network-api/networkapi/wagtailpages/pagemodels/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,28 +506,6 @@ class ProductPage(AirtableMixin, FoundationMetadataPageMixin, Page):
blank=True
)

# How to contact the company
phone_number = models.CharField(
max_length=100,
help_text='Phone Number',
blank=True,
)
live_chat = models.CharField(
max_length=100,
help_text='Live Chat',
blank=True,
)
email = models.CharField(
max_length=100,
help_text='Email',
blank=True,
)
twitter = models.CharField(
max_length=100,
help_text='Twitter username',
blank=True,
)

# Un-editable voting fields. Don't add these to the content_panels.
creepiness_value = models.IntegerField(default=0) # The total points for creepiness
votes = models.ForeignKey(
Expand Down Expand Up @@ -574,10 +552,6 @@ def map_import_fields(cls):
"Manages security help text": "manage_vulnerabilities_helptext",
"Has privacy policy": "privacy_policy",
"Privacy policy help text": "privacy_policy_helptext",
"Phone number": "phone_number",
"Live chat": "live_chat",
"Email address": "email",
"Twitter": "twitter",
}
return mappings

Expand Down Expand Up @@ -622,10 +596,6 @@ def get_export_fields(self):
"Manages security help text": self.manage_vulnerabilities_helptext,
"Has privacy policy": self.privacy_policy,
"Privacy policy help text": self.privacy_policy_helptext,
"Phone number": self.phone_number,
"Live chat": self.live_chat,
"Email address": self.email,
"Twitter": self.twitter if self.twitter else ''
}

def get_status_for_airtable(self):
Expand Down Expand Up @@ -744,16 +714,6 @@ def get_voting_json(self):
heading='Security',
classname='collapsible'
),
MultiFieldPanel(
[
FieldPanel('phone_number'),
FieldPanel('live_chat'),
FieldPanel('email'),
FieldPanel('twitter'),
],
heading='Ways to contact the company',
classname='collapsible'
),
MultiFieldPanel(
[
InlinePanel('updates', label='Update')
Expand Down Expand Up @@ -810,10 +770,6 @@ def get_voting_json(self):
TranslatableField('manage_vulnerabilities_helptext'),
SynchronizedField('privacy_policy'),
TranslatableField('privacy_policy_helptext'),
SynchronizedField('phone_number'),
SynchronizedField('live_chat'),
SynchronizedField('email'),
SynchronizedField('twitter'),
]

@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,6 @@ <h2 class="h3-heading">{% trans "Artificial Intelligence" %}</h2>
</section>
{% endif %}


{% if product.product_type == 'general' %}
<section class="criterion-group">
<h2 class="h3-heading">{% trans "Company contact info" %}</h3>

<div>
{% include "fragments/product_contact.html" with product=product %}
</div>
</section>
{% endif %}

</div>
</div>
</div>
Expand Down

This file was deleted.

12 changes: 6 additions & 6 deletions source/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
@tailwind utilities;

@layer base {
ol {
@apply tw-m-[revert] tw-list-decimal tw-p-[revert];
}
ol {
@apply tw-m-[revert] tw-list-decimal tw-p-[revert];
}

ul {
@apply tw-m-[revert] tw-list-disc tw-p-[revert];
}
ul {
@apply tw-m-[revert] tw-list-disc tw-p-[revert];
}
}

// mofo-bootstrap
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
important: true,
corePlugins: {
// overriding TW default container
container: false
container: false,
},
plugins: [
plugin(function ({ addUtilities }) {
Expand Down