From 60c115392098c6d979f79ab8365a052a723f137f Mon Sep 17 00:00:00 2001 From: Kevin Etchells Date: Wed, 16 Oct 2024 15:06:36 +0100 Subject: [PATCH] Feature/sign up updates (#1108) * Add GLD to BusinessUnit and Alphabetise * Add question to sign-up --- django_app/redbox_app/redbox_core/forms.py | 3 + ...r_redbox_tasks_alter_user_business_unit.py | 23 +++++ django_app/redbox_app/redbox_core/models.py | 98 ++++++++++--------- .../redbox_app/templates/sign-up-page-3.html | 7 ++ 4 files changed, 83 insertions(+), 48 deletions(-) create mode 100644 django_app/redbox_app/redbox_core/migrations/0053_user_redbox_tasks_alter_user_business_unit.py diff --git a/django_app/redbox_app/redbox_core/forms.py b/django_app/redbox_app/redbox_core/forms.py index bafa98e16..23a85be86 100644 --- a/django_app/redbox_app/redbox_core/forms.py +++ b/django_app/redbox_app/redbox_core/forms.py @@ -28,6 +28,7 @@ class Meta: "usage_at_work", "usage_outside_work", "how_useful", + "redbox_tasks", "task_1_description", "task_1_regularity", "task_1_duration", @@ -75,6 +76,7 @@ class Meta: "usage_at_work": "At WORK, how often have you used GenAI like ChatGPT, Claude or Gemini?", "usage_outside_work": "OUTSIDE of work, how often have you used GenAI like ChatGPT, Claude or Gemini?", "how_useful": "How useful have you found GenAI?", + "redbox_tasks": "What tasks are you hoping to use Redbox for?", "task_1_description": "Task 1: Please describe the task", "task_1_regularity": "Task 1: How often do you do this?", "task_1_duration": "Task 1: How long does it take you to do this?", @@ -122,6 +124,7 @@ class Meta: "usage_at_work": forms.RadioSelect(attrs={"class": "govuk-radios__item"}), "usage_outside_work": forms.RadioSelect(attrs={"class": "govuk-radios__item"}), "how_useful": forms.RadioSelect(attrs={"class": "govuk-radios__item"}), + "redbox_tasks": forms.TextInput(attrs={"class": "govuk-input govuk-!-width-one-half"}), "task_1_description": forms.TextInput(attrs={"class": "govuk-input govuk-!-width-one-half"}), "task_1_regularity": forms.TextInput(attrs={"class": "govuk-input govuk-!-width-one-half"}), "task_1_duration": forms.TextInput(attrs={"class": "govuk-input govuk-!-width-one-half"}), diff --git a/django_app/redbox_app/redbox_core/migrations/0053_user_redbox_tasks_alter_user_business_unit.py b/django_app/redbox_app/redbox_core/migrations/0053_user_redbox_tasks_alter_user_business_unit.py new file mode 100644 index 000000000..8459d07cc --- /dev/null +++ b/django_app/redbox_app/redbox_core/migrations/0053_user_redbox_tasks_alter_user_business_unit.py @@ -0,0 +1,23 @@ +# Generated by Django 5.1.2 on 2024-10-16 12:39 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('redbox_core', '0052_chatllmbackend_display'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='redbox_tasks', + field=models.TextField(blank=True, null=True), + ), + migrations.AlterField( + model_name='user', + name='business_unit', + field=models.CharField(blank=True, choices=[('Borders Unit', 'Borders Unit'), ('Central Costs', 'Central Costs'), ('Central Digital and Data Office', 'Central Digital and Data Office'), ('Civil Service Commission', 'Civil Service Commission'), ('Civil Service Human Resources', 'Civil Service Human Resources'), ('CO Chief Operating Officer', 'CO Chief Operating Officer'), ('CO Digital', 'CO Digital'), ('CO HMT Commercial', 'CO HMT Commercial'), ('CO People and Places', 'CO People and Places'), ('CO Strategy, Finance, and Performance', 'CO Strategy Finance, and Performance'), ('Commercial Models', 'Commercial Models'), ('COP Presidency', 'COP Presidency'), ('Covid Inquiry', 'Covid Inquiry'), ('Crown Commercial Service', 'Crown Commercial Service'), ('CS Modernisation and Reform Unit', 'CS Modernisation and Reform Unit'), ('Delivery Group', 'Delivery Group'), ('Economic and Domestic Secretariat', 'Economic and Domestic Secretariat'), ('Equality and Human Rights Commission', 'Equality and Human Rights Commission'), ('Equality Hub', 'Equality Hub'), ('Flexible CS Pool', 'Flexible CS Pool'), ('Geospatial Commission', 'Geospatial Commission'), ('Government Business Services', 'Government Business Services'), ('Government Commercial and Grants Function', 'Government Commercial and Grants Function'), ('Government Communication Service', 'Government Communication Service'), ('Government Digital Service', 'Government Digital Service'), ('Government in Parliament', 'Government in Parliament'), ('Government Legal Department', 'Government Legal Department'), ('Government People Group', 'Government People Group'), ('Government Property Agency', 'Government Property Agency'), ('Government Security Group', 'Government Security Group'), ('Grenfell Inquiry', 'Grenfell Inquiry'), ('Infected Blood Inquiry', 'Infected Blood Inquiry'), ('Infrastructure and Projects Authority', 'Infrastructure and Projects Authority'), ('Inquiries Sponsorship Team', 'Inquiries Sponsorship Team'), ('Intelligence and Security Committee', 'Intelligence and Security Committee'), ('Joint Intelligence Organisation', 'Joint Intelligence Organisation'), ('National Security Secretariat', 'National Security Secretariat'), ("Office for Veterans' Affairs", "Office for Veterans' Affairs"), ('Office of Government Property', 'Office of Government Property'), ('Office of the Registrar of Consultant Lobbyists', 'Office of the Registrar of Consultant Lobbyists'), ("Prime Minister's Office", "Prime Minister's Office"), ('Propriety and Constitution Group', 'Propriety and Constitution Group'), ('Public Bodies and Priority Projects Unit', 'Public Bodies and Priority Projects Unit'), ('Public Inquiry Response Unit', 'Public Inquiry Response Unit'), ('Public Sector Fraud Authority', 'Public Sector Fraud Authority'), ('UKSV', 'UKSV'), ('Union and Constitution Group', 'Union and Constitution Group'), ('Other', 'Other')], max_length=64, null=True), + ), + ] diff --git a/django_app/redbox_app/redbox_core/models.py b/django_app/redbox_app/redbox_core/models.py index 5adef2517..8c572bff7 100644 --- a/django_app/redbox_app/redbox_core/models.py +++ b/django_app/redbox_app/redbox_core/models.py @@ -248,73 +248,74 @@ class Profession(models.TextChoices): OT = "OT", _("Other") class BusinessUnit(models.TextChoices): - PRIME_MINISTERS_OFFICE = "Prime Minister's Office", _("Prime Minister's Office") - DELIVERY_GROUP = "Delivery Group", _("Delivery Group") - NATIONAL_SECURITY_SECRETARIAT = "National Security Secretariat", _("National Security Secretariat") - ECONOMIC_AND_DOMESTIC_SECRETARIAT = "Economic and Domestic Secretariat", _("Economic and Domestic Secretariat") - PROPRIETY_AND_CONSTITUTION_GROUP = "Propriety and Constitution Group", _("Propriety and Constitution Group") - GOVERNMENT_IN_PARLIAMENT = "Government in Parliament", _("Government in Parliament") - JOINT_INTELLIGENCE_ORGANISATION = "Joint Intelligence Organisation", _("Joint Intelligence Organisation") - INTELLIGENCE_AND_SECURITY_COMMITTEE = ( - "Intelligence and Security Committee", - _("Intelligence and Security Committee"), - ) - GOVERNMENT_DIGITAL_SERVICE = "Government Digital Service", _("Government Digital Service") + BORDERS_UNIT = "Borders Unit", _("Borders Unit") + CENTRAL_COSTS = "Central Costs", _("Central Costs") CENTRAL_DIGITAL_AND_DATA_OFFICE = "Central Digital and Data Office", _("Central Digital and Data Office") - GOVERNMENT_COMMUNICATION_SERVICE = "Government Communication Service", _("Government Communication Service") - GOVERNMENT_PEOPLE_GROUP = "Government People Group", _("Government People Group") - GOVERNMENT_SECURITY_GROUP = "Government Security Group", _("Government Security Group") - UKSV = "UKSV", _("UKSV") - GOVERNMENT_COMMERCIAL_AND_GRANTS_FUNCTION = ( - "Government Commercial and Grants Function", - _("Government Commercial and Grants Function"), - ) + CIVIL_SERVICE_COMMISSION = "Civil Service Commission", _("Civil Service Commission") CIVIL_SERVICE_HUMAN_RESOURCES = "Civil Service Human Resources", _("Civil Service Human Resources") - INFRASTRUCTURE_AND_PROJECTS_AUTHORITY = ( - "Infrastructure and Projects Authority", - _("Infrastructure and Projects Authority"), - ) - OFFICE_OF_GOVERNMENT_PROPERTY = "Office of Government Property", _("Office of Government Property") - GOVERNMENT_BUSINESS_SERVICES = "Government Business Services", _("Government Business Services") - BORDERS_UNIT = "Borders Unit", _("Borders Unit") - EQUALITY_HUB = "Equality Hub", _("Equality Hub") - PUBLIC_SECTOR_FRAUD_AUTHORITY = "Public Sector Fraud Authority", _("Public Sector Fraud Authority") CO_CHIEF_OPERATING_OFFICER = "CO Chief Operating Officer", _("CO Chief Operating Officer") - FLEXIBLE_CS_POOL = "Flexible CS Pool", _("Flexible CS Pool") + CO_DIGITAL = "CO Digital", _("CO Digital") + CO_HMT_COMMERCIAL = "CO HMT Commercial", _("CO HMT Commercial") CO_PEOPLE_AND_PLACES = "CO People and Places", _("CO People and Places") CO_STRATEGY_FINANCE_AND_PERFORMANCE = ( "CO Strategy, Finance, and Performance", _("CO Strategy Finance, and Performance"), ) - CENTRAL_COSTS = "Central Costs", _("Central Costs") - CO_HMT_COMMERCIAL = "CO HMT Commercial", _("CO HMT Commercial") - CO_DIGITAL = "CO Digital", _("CO Digital") - PUBLIC_BODIES_AND_PRIORITY_PROJECTS_UNIT = ( - "Public Bodies and Priority Projects Unit", - _("Public Bodies and Priority Projects Unit"), - ) - PUBLIC_INQUIRY_RESPONSE_UNIT = "Public Inquiry Response Unit", _("Public Inquiry Response Unit") - CS_MODERNISATION_AND_REFORM_UNIT = "CS Modernisation and Reform Unit", _("CS Modernisation and Reform Unit") - OFFICE_FOR_VETERANS_AFFAIRS = "Office for Veterans' Affairs", _("Office for Veterans' Affairs") - GRENFELL_INQUIRY = "Grenfell Inquiry", _("Grenfell Inquiry") - INFECTED_BLOOD_INQUIRY = "Infected Blood Inquiry", _("Infected Blood Inquiry") + COMMERCIAL_MODELS = "Commercial Models", _("Commercial Models") + COP_PRESIDENCY = "COP Presidency", _("COP Presidency") COVID_INQUIRY = "Covid Inquiry", _("Covid Inquiry") - CIVIL_SERVICE_COMMISSION = "Civil Service Commission", _("Civil Service Commission") + CROWN_COMMERCIAL_SERVICE = "Crown Commercial Service", _("Crown Commercial Service") + CS_MODERNISATION_AND_REFORM_UNIT = "CS Modernisation and Reform Unit", _("CS Modernisation and Reform Unit") + DELIVERY_GROUP = "Delivery Group", _("Delivery Group") + ECONOMIC_AND_DOMESTIC_SECRETARIAT = "Economic and Domestic Secretariat", _("Economic and Domestic Secretariat") EQUALITY_AND_HUMAN_RIGHTS_COMMISSION = ( "Equality and Human Rights Commission", _("Equality and Human Rights Commission"), ) + EQUALITY_HUB = "Equality Hub", _("Equality Hub") + FLEXIBLE_CS_POOL = "Flexible CS Pool", _("Flexible CS Pool") + GEOSPATIAL_COMMISSION = "Geospatial Commission", _("Geospatial Commission") + GOVERNMENT_BUSINESS_SERVICES = "Government Business Services", _("Government Business Services") + GOVERNMENT_COMMERCIAL_AND_GRANTS_FUNCTION = ( + "Government Commercial and Grants Function", + _("Government Commercial and Grants Function"), + ) + GOVERNMENT_COMMUNICATION_SERVICE = "Government Communication Service", _("Government Communication Service") + GOVERNMENT_DIGITAL_SERVICE = "Government Digital Service", _("Government Digital Service") + GOVERNMENT_IN_PARLIAMENT = "Government in Parliament", _("Government in Parliament") + GOVERNMENT_LEGAL_DEPARTMENT = "Government Legal Department", _("Government Legal Department") + GOVERNMENT_PEOPLE_GROUP = "Government People Group", _("Government People Group") GOVERNMENT_PROPERTY_AGENCY = "Government Property Agency", _("Government Property Agency") + GOVERNMENT_SECURITY_GROUP = "Government Security Group", _("Government Security Group") + GRENFELL_INQUIRY = "Grenfell Inquiry", _("Grenfell Inquiry") + INFECTED_BLOOD_INQUIRY = "Infected Blood Inquiry", _("Infected Blood Inquiry") + INFRASTRUCTURE_AND_PROJECTS_AUTHORITY = ( + "Infrastructure and Projects Authority", + _("Infrastructure and Projects Authority"), + ) + INQUIRIES_SPONSORSHIP_TEAM = "Inquiries Sponsorship Team", _("Inquiries Sponsorship Team") + INTELLIGENCE_AND_SECURITY_COMMITTEE = ( + "Intelligence and Security Committee", + _("Intelligence and Security Committee"), + ) + JOINT_INTELLIGENCE_ORGANISATION = "Joint Intelligence Organisation", _("Joint Intelligence Organisation") + NATIONAL_SECURITY_SECRETARIAT = "National Security Secretariat", _("National Security Secretariat") + OFFICE_FOR_VETERANS_AFFAIRS = "Office for Veterans' Affairs", _("Office for Veterans' Affairs") + OFFICE_OF_GOVERNMENT_PROPERTY = "Office of Government Property", _("Office of Government Property") OFFICE_OF_THE_REGISTRAR_OF_CONSULTANT_LOBBYISTS = ( "Office of the Registrar of Consultant Lobbyists", _("Office of the Registrar of Consultant Lobbyists"), ) - CROWN_COMMERCIAL_SERVICE = "Crown Commercial Service", _("Crown Commercial Service") + PRIME_MINISTERS_OFFICE = "Prime Minister's Office", _("Prime Minister's Office") + PROPRIETY_AND_CONSTITUTION_GROUP = "Propriety and Constitution Group", _("Propriety and Constitution Group") + PUBLIC_BODIES_AND_PRIORITY_PROJECTS_UNIT = ( + "Public Bodies and Priority Projects Unit", + _("Public Bodies and Priority Projects Unit"), + ) + PUBLIC_INQUIRY_RESPONSE_UNIT = "Public Inquiry Response Unit", _("Public Inquiry Response Unit") + PUBLIC_SECTOR_FRAUD_AUTHORITY = "Public Sector Fraud Authority", _("Public Sector Fraud Authority") + UKSV = "UKSV", _("UKSV") UNION_AND_CONSTITUTION_GROUP = "Union and Constitution Group", _("Union and Constitution Group") - GEOSPATIAL_COMMISSION = "Geospatial Commission", _("Geospatial Commission") - COMMERCIAL_MODELS = "Commercial Models", _("Commercial Models") - COP_PRESIDENCY = "COP Presidency", _("COP Presidency") - INQUIRIES_SPONSORSHIP_TEAM = "Inquiries Sponsorship Team", _("Inquiries Sponsorship Team") OTHER = "Other", _("Other") class AIExperienceLevel(models.TextChoices): @@ -446,6 +447,7 @@ class DurationTasks(models.TextChoices): usage_at_work = models.CharField(null=True, blank=True, max_length=64, choices=RegularityAI) usage_outside_work = models.CharField(null=True, blank=True, max_length=64, choices=RegularityAI) how_useful = models.CharField(null=True, blank=True, max_length=64, choices=Usefulness) + redbox_tasks = models.TextField(null=True, blank=True) # Page 4 task_1_description = models.TextField(null=True, blank=True) task_1_regularity = models.TextField(null=True, blank=True) diff --git a/django_app/redbox_app/templates/sign-up-page-3.html b/django_app/redbox_app/templates/sign-up-page-3.html index 55f469646..681a75dd0 100644 --- a/django_app/redbox_app/templates/sign-up-page-3.html +++ b/django_app/redbox_app/templates/sign-up-page-3.html @@ -162,6 +162,13 @@

Digital Confidence

+
+ + {{ form.redbox_tasks }} +
+
{{ govukButton(text="Continue") }}