Skip to content

Commit

Permalink
Merge pull request #30 from yaal-coop/issue-12-form-link
Browse files Browse the repository at this point in the history
URL du formulaire de satisfaction configurable
  • Loading branch information
klorydryk authored Oct 9, 2023
2 parents 4138d02 + 32a36ad commit f80501f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
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")

0 comments on commit f80501f

Please sign in to comment.