Skip to content

Commit

Permalink
Merge branch 'main' into fs-4604
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam-W1 committed Oct 2, 2024
2 parents b2580cd + 3f302af commit 02421a7
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/blueprints/fund_builder/forms/round.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class RoundForm(FlaskForm):
application_reminder_sent = RadioField(choices=[("true", "Yes"), ("false", "No")], default="false")
contact_us_banner_json = TextAreaField("Contact Us Banner")
reference_contact_page_over_email = RadioField(
"Reference contact page over emai", choices=[("true", "Yes"), ("false", "No")], default="false"
"Reference contact page over email", choices=[("true", "Yes"), ("false", "No")], default="false"
)
contact_email = StringField("Contact Email", validators=[DataRequired()])
contact_phone = StringField("Contact Phone", validators=[DataRequired()])
Expand Down
3 changes: 2 additions & 1 deletion app/blueprints/fund_builder/templates/fund.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{% extends "base.html" %}
{% set pageHeading %}{{ 'Update a Fund' if fund_id else 'Create a Fund' }} {% endset %}
{% from "macros/wtfToGovUk.html" import input %}
{% from "macros/wtfToGovUk.html" import yes_no %}
{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">{{ 'Update a Fund' if fund_id else 'Create a Fund' }}</h1>
<h1 class="govuk-heading-l">{{pageHeading}}</h1>
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<form method="POST">
Expand Down
5 changes: 4 additions & 1 deletion app/blueprints/fund_builder/templates/fund_config.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{% extends "base.html" %}
{% set pageHeading %}
Fund Settings
{% endset %}
{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{%- from "govuk_frontend_jinja/components/accordion/macro.html" import govukAccordion -%}
{%- from "govuk_frontend_jinja/components/summary-list/macro.html" import govukSummaryList -%}
{%- from "govuk_frontend_jinja/components/select/macro.html" import govukSelect -%}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">Fund Settings</h1>
<h1 class="govuk-heading-l">{{ pageHeading }}</h1>
<form method="POST">
{{ govukSelect({
"id": "fund_id",
Expand Down
4 changes: 3 additions & 1 deletion app/blueprints/fund_builder/templates/round.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends "base.html" %}
{% set pageHeading %}{{ 'Update a Round' if round_id else 'Create a Round' }}{% endset %}

{% from "macros/wtfToGovUk.html" import input %}
{% from "macros/wtfToGovUk.html" import dateinput %}
{% from "macros/wtfToGovUk.html" import multilineinput %}
Expand All @@ -8,7 +10,7 @@
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">{{ 'Update a Round' if round_id else 'Create a Round' }}</h1>
<h1 class="govuk-heading-l">{{ pageHeading }}</h1>
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<form method="POST">
Expand Down
13 changes: 7 additions & 6 deletions app/blueprints/fund_builder/templates/section.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
{% extends "base.html" %}
{% set pageHeading %}
{% if form.section_id.data %}
Update
{% else %}
Create{% endif %}&nbsp;Section
{% endset %}
{% from "macros/wtfToGovUk.html" import input %}
{% from "macros/wtfToGovUk.html" import yes_no %}
{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{%- from "govuk_frontend_jinja/components/select/macro.html" import govukSelect -%}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">
{% if form.section_id.data %}
Update
{% else %}
Create{% endif %}&nbsp;Section
</h1>
<h1 class="govuk-heading-l">{{ pageHeading }}</h1>
<form method="POST">
<div class="govuk-form-group">
<h3 class="govuk-heading-m">Section Name</h3>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{% extends "base.html" %}
{% set pageHeading %}View Full Assessment Config {% endset %}
{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{%- from "govuk_frontend_jinja/components/accordion/macro.html" import govukAccordion -%}
{%- from "govuk_frontend_jinja/components/summary-list/macro.html" import govukSummaryList -%}
{%- from "govuk_frontend_jinja/components/select/macro.html" import govukSelect -%}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">View Full Assessment Config</h1>
<h1 class="govuk-heading-l"> {{ pageHeading }}</h1>
<h2 class="govuk-heading-m">{{ fund.short_name }} - {{ round.short_name }}</h2>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/blueprints/self_serve/templates/create_form.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{% extends "base.html" %}
{% set pageHeading %}Create Application Form{% endset %}

{%- from "govuk_frontend_jinja/components/input/macro.html" import govukInput -%}
{%- from "govuk_frontend_jinja/components/textarea/macro.html" import govukTextarea -%}
{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">Create Application Form</h1>
<h1 class="govuk-heading-l">{{ pageHeading }}</h1>
<form id="form_form" method="POST">

<select multiple hidden name="selected_pages" id="frm_selected_pages"></select>
Expand Down
3 changes: 2 additions & 1 deletion app/blueprints/self_serve/templates/create_page.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{% extends "base.html" %}
{% set pageHeading %}Build Form Page{% endset %}

{%- from "govuk_frontend_jinja/components/input/macro.html" import govukInput -%}
{%- from "govuk_frontend_jinja/components/textarea/macro.html" import govukTextarea -%}
{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">Build Form Page</h1>
<h1 class="govuk-heading-l">{{ pageHeading }}</h1>
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<form method="POST" id="page_form">
Expand Down
1 change: 1 addition & 0 deletions app/blueprints/self_serve/templates/create_question.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% extends "base.html" %}

{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{%- from "govuk_frontend_jinja/components/input/macro.html" import govukInput -%}
{% from "govuk_frontend_jinja/components/radios/macro.html" import govukRadios %}
Expand Down
3 changes: 2 additions & 1 deletion app/blueprints/self_serve/templates/create_section.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{% extends "base.html" %}
{% set pageHeading %}Build Section{% endset %}

{%- from "govuk_frontend_jinja/components/input/macro.html" import govukInput -%}
{%- from "govuk_frontend_jinja/components/textarea/macro.html" import govukTextarea -%}
{%- from "govuk_frontend_jinja/components/button/macro.html" import govukButton -%}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<h1 class="govuk-heading-l">Build Section</h1>
<h1 class="govuk-heading-l">{{ pageHeading }}</h1>
<div class="govuk-form-group">
<fieldset class="govuk-fieldset">
<form method="POST" id="section_form">
Expand Down
2 changes: 1 addition & 1 deletion app/create_app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from flask import Flask
from flask_assets import Environment
from fsd_utils.logging import logging
from jinja2 import ChoiceLoader
from jinja2 import PackageLoader
from jinja2 import PrefixLoader
Expand All @@ -11,7 +12,6 @@
from app.blueprints.templates.routes import template_bp
from app.db.models import Fund # noqa:F401
from app.db.models import Round # noqa:F401
from fsd_utils.logging import logging


def create_app() -> Flask:
Expand Down
2 changes: 1 addition & 1 deletion app/db/queries/fund.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from flask import current_app
from sqlalchemy import select

from app.db import db
from app.db.models.fund import Fund
from app.db.models.fund import Organisation
from flask import current_app


def add_organisation(organisation: Organisation) -> Organisation:
Expand Down
2 changes: 1 addition & 1 deletion app/db/queries/round.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from flask import current_app
from sqlalchemy import select

from app.db import db
from app.db.models.round import Round
from flask import current_app


def add_round(round: Round) -> Round:
Expand Down
3 changes: 2 additions & 1 deletion copilot/fsd-fund-application-builder/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ variables:
AUTHENTICATOR_HOST: "https://authenticator.${COPILOT_ENVIRONMENT_NAME}.access-funding.test.levellingup.gov.uk"
COOKIE_DOMAIN: ".test.levellingup.gov.uk"
FLASK_ENV: ${COPILOT_ENVIRONMENT_NAME}
FORMS_SERVICE_PUBLIC_HOST: "https://forms.${COPILOT_ENVIRONMENT_NAME}.access-funding.test.levellingup.gov.uk"
FORM_RUNNER_EXTERNAL_HOST: "https://forms.${COPILOT_ENVIRONMENT_NAME}.access-funding.test.levellingup.gov.uk"
FORM_RUNNER_INTERNAL_HOST: "http://fsd-form-runner-adapter:3009"
FUND_STORE_API_HOST: "http://fsd-fund-store:8080"
NOTIFICATION_SERVICE_HOST: http://fsd-notification:8080
MAINTENANCE_MODE: false
Expand Down

0 comments on commit 02421a7

Please sign in to comment.