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

URL du formulaire de satisfaction configurable #30

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SERVICE_TITLE=Webinaire
SERVICE_TAGLINE=Le service de webinaire

MEETING_LOGOUT_URL=
SATISFACTION_POLL_URL=https://dinum.evalandgo.com/s/index.php?id=JTk4ciU5Mm0lOTclQjE=&a=JTk2byU5NmglOUUlQUI=

WORDING_MEETING_PRESENTATION=présentation
WORDING_UPLOAD_FILE=envoyer
Expand Down
4 changes: 2 additions & 2 deletions web/flaskr/templates/meeting/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ <h3 class="fr-text--lg fr-mt-1-5v">{{ meeting.name }}</h3>
</div>
{% include 'meeting/modals.html' %}
{% endfor %}
{% if meetings|length %}
{% if meetings|length and config.get("SATISFACTION_POLL_URL") %}
<iframe id="iframe-poll"
frameborder=0
src="https://dinum.evalandgo.com/s/index.php?id=JTk4ciU5Mm0lOTclQjE=&a=JTk2byU5NmglOUUlQUI="
src="{{ config.get("SATISFACTION_POLL_URL") }}"
height="500" scrolling="no"
sandbox="allow-scripts allow-same-origin allow-forms"></iframe>
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions web/instance/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
SERVICE_TAGLINE = os.environ.get("SERVICE_TAGLINE")

MEETING_LOGOUT_URL = os.environ.get("MEETING_LOGOUT_URL", "")
SATISFACTION_POLL_URL = os.environ.get("SATISFACTION_POLL_URL")

# Database configuration
SQLALCHEMY_DATABASE_URI = os.environ.get("SQLALCHEMY_DATABASE_URI")
Expand Down
10 changes: 10 additions & 0 deletions web/tests/test_satisfaction_poll.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def test_no_satisfaction_poll(client_app, authenticated_user, bbb_response):
res = client_app.get("/welcome")
res.mustcontain(no="iframe")


def test_satisfaction_poll_url(client_app, authenticated_user, meeting, bbb_response):
client_app.app.config["SATISFACTION_POLL_URL"] = "https://poll.example.org"
res = client_app.get("/welcome")
res.mustcontain("iframe")
res.mustcontain("https://poll.example.org")