Skip to content

Allow admins to validate meeting registration codes#3833

Merged
oriolgual merged 4 commits intomasterfrom
rbngzlv/validate_meeting_registration_codes
Jul 23, 2018
Merged

Allow admins to validate meeting registration codes#3833
oriolgual merged 4 commits intomasterfrom
rbngzlv/validate_meeting_registration_codes

Conversation

@rbngzlv
Copy link
Copy Markdown
Contributor

@rbngzlv rbngzlv commented Jul 11, 2018

🎩 What? Why?

Allow admins to validate the meeting registration code and notify the user.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • Add tests

📷 Screenshots (optional)

screen shot 2018-07-11 at 18 36 12

@rbngzlv rbngzlv self-assigned this Jul 11, 2018
@ghost ghost added the status: WIP label Jul 11, 2018
return broadcast(:invalid) if form.invalid?

if registration.blank?
form.errors.add :code, I18n.t("registrations.validate_registration_code.invalid", scope: "decidim.meetings.admin")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move this validation to the form?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command can just call form.registration if you need it here.

class RegistrationCodeValidatedEvent < Decidim::Events::SimpleEvent
i18n_attributes :registration_code

# delegate :code, to: :registration, prefix: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this?

@rbngzlv
Copy link
Copy Markdown
Contributor Author

rbngzlv commented Jul 13, 2018

@oriolgual done! Can you take a look?

@oriolgual oriolgual merged commit 9dcbfd0 into master Jul 23, 2018
@oriolgual oriolgual deleted the rbngzlv/validate_meeting_registration_codes branch July 23, 2018 10:44
@xabier
Copy link
Copy Markdown

xabier commented Jul 23, 2018

@oriolgual this feature is great for quick 0.14 let us know if there is progress on reviewing the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants