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

(bug) Fix button path to edit_organization from organization dashboard #261

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 1 addition & 4 deletions new_arrivals_chi/app/authorize_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def toggle_suspend_organization(organization_id):


@authorize.route(
"/admin/edit_organization/<int:organization_id>", methods=["GET", "POST"]
"/admin/edit_organization/<int:organization_id>", methods=["GET"]
)
@admin_required
def admin_edit_organization(organization_id):
Expand All @@ -482,9 +482,6 @@ def admin_edit_organization(organization_id):

organization = Organization.query.get(organization_id)

if request.method == "POST":
# Handle the form submission
pass
return render_template(
"edit_organization.html",
organization_id=organization_id,
Expand Down
6 changes: 3 additions & 3 deletions new_arrivals_chi/app/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@
"welcome": "Welcome to Chicago!"
},
"info": {
"languages_spoken": "Languages Spoken: English, Spanish",
"open_hours": "Open Hours: Monday - Friday, 9:00 AM - 5:00 PM",
"languages_spoken": "Languages Spoken",
"open_hours": "Open Hours",
"organization_name": "Organization Name",
"supplies_and_services": "Supplies and Services: Food"
"supplies_and_services": "Supplies and Services"
},
"lawyers": {
"content": [
Expand Down
6 changes: 3 additions & 3 deletions new_arrivals_chi/app/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@
"welcome": "\u00a1Bienvenido a Chicago!"
},
"info": {
"languages_spoken": "Idiomas hablados: English, Spanish",
"open_hours": "Horas de Atenci\u00f3n: Lunes - Viernes, 9:00 AM - 5:00 PM",
"languages_spoken": "Idiomas hablados",
"open_hours": "Horas de Atenci\u00f3n",
"organization_name": "Nombre de la Organizaci\u00f3n",
"supplies_and_services": "Recursos y Servicios: Comida"
"supplies_and_services": "Recursos y Servicios"
},
"lawyers": {
"content": [
Expand Down
5 changes: 2 additions & 3 deletions new_arrivals_chi/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,14 @@ def edit_organization(organization_id):
language = bleach.clean(request.args.get(KEY_LANGUAGE, DEFAULT_LANGUAGE))
translations = current_app.config[KEY_TRANSLATIONS][language]

user = current_user
organization = extract_organization(user.organization_id)
organization = Organization.query.get(organization_id)

return render_template(
"edit_organization.html",
organization_id=organization_id,
organization=organization,
language=language,
translations=translations,
organization_id=organization_id,
)


Expand Down
2 changes: 1 addition & 1 deletion new_arrivals_chi/app/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1>{{ organization.name | escape }}</h1>
<button class="button button-blue" onclick="navigateTo('{{ url_for('main.org', organization_id=organization.id) }}', '{{ language }}')">
{{ translations[language]['profile']['view_org_page'] | escape }}
</button>
<button class="button button-green" onclick="navigateTo('{{ url_for('main.dashboard') }}', '{{ language }}')">
<button class="button button-green" onclick="navigateTo('{{ url_for('main.edit_organization', organization_id=organization.id) }}', '{{ language }}')">
{{ translations[language]['profile']['update_org_info'] | escape }}
</button>
<button class="button button-orange" onclick="navigateTo('{{ url_for('authorize.change_password') }}', '{{ language }}')">
Expand Down
Loading