Skip to content

Commit

Permalink
Add ep vote app for 2024 (#664)
Browse files Browse the repository at this point in the history
* add ep vote app for 2024

* revert president app unintentional change

* finish renaming send to send_email

* refactor wordings based on feedback

* rm old ep vote app

* add ep vote app tests
  • Loading branch information
celuchmarek committed Apr 30, 2024
1 parent a9de1eb commit 2d78d95
Show file tree
Hide file tree
Showing 50 changed files with 760 additions and 1,268 deletions.
29 changes: 18 additions & 11 deletions app/controllers/apps/ep_vote_app/application_forms_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Apps::EpVoteApp::ApplicationFormsController < ApplicationController
helper FormatDaysHelper
before_action :set_metadata, :check_inactive_ep_application, :disable_current_topic
before_action :disable_feedback, only: [:show, :delivery, :create]
before_action :disable_feedback, only: [:show, :delivery, :create, :send_email, :authorized_person_send]

def show
render_step('start')
Expand All @@ -12,13 +12,18 @@ def delivery
render_step('delivery')
end

def permanent_resident
def create
render_self
end

def authorized_person_send
return render_self if request.post?
render_step('permanent_resident')
redirect_to delivery_apps_ep_vote_app_application_forms_path
end

def create
render_self
def send_email
return render_self if request.post?
redirect_to delivery_apps_ep_vote_app_application_forms_path
end

private def render_self
Expand All @@ -34,9 +39,8 @@ def create
private def form_params
params.require(:apps_ep_vote_app_application_form).permit(
:step,
:place_first_round,
:place_second_round,
:sk_citizen,
:place,
:citizenship,
:delivery,
:full_name, :pin, :nationality, :maiden_name,
:authorized_person_full_name, :authorized_person_pin,
Expand All @@ -45,14 +49,17 @@ def create
:delivery_street, :delivery_pobox, :delivery_municipality, :delivery_country,
:municipality_email,
:municipality_email_verified,
:permanent_resident,
:back
:sk_citizen_residency,
:back,
:eu_citizen_residency,
:eu_citizen_sk_resident,
:eu_citizen_non_sk_resident
)
end

private def set_metadata
@metadata.og.title = 'Žiadosť o hlasovací preukaz'
@metadata.og.image = 'https://volby.digital/images/share-2024.png'
@metadata.og.image = 'https://volby.digital/images/share-ep-2024.png'
@metadata.og.description = 'Aj keď budete počas volieb mimo trvalého pobytu, voliť sa dá. Stačí požiadať.'
end

Expand Down

This file was deleted.

Loading

0 comments on commit 2d78d95

Please sign in to comment.