Commit e0cdc1e8 authored by Zsolt Benke's avatar Zsolt Benke
Browse files

Rename method

parent 1b710711
Pipeline #21270 passed with stage
in 68 minutes and 2 seconds
......@@ -391,7 +391,7 @@ class Volunteer < ApplicationRecord
!user.present? && accepted?
end
def email_valid_for_invite?
def invite_email_valid?
invite_email&.match(Devise.email_regexp)
end
......
......@@ -4,7 +4,7 @@ p.text-warning Dieses Freiwilligenprofil wurde von Access importiert.
p.text-warning Ein Useraccount wurde bereits erstellt.
- if volunteer.user_needed_for_invitation? || volunteer.pending_invitation?
h3.small User Account erstellen
- if volunteer.email_valid_for_invite?
- if volunteer.invite_email_valid?
p Für die Emailadresse #{mail_to "#{volunteer.invite_email}", volunteer.invite_email} einen Account erstellen
- elsif volunteer.import.email.present?
p.text-danger Scheinbar ist die importierte Mailadresse nicht gültig.
......@@ -19,6 +19,6 @@ p.text-warning Dieses Freiwilligenprofil wurde von Access importiert.
= hidden_field_tag :reinvite, true, id: 'reinvite_field'
.form-group.col-xs-12.col-md-4
= c.label :primary_email
= c.input_field :primary_email, value: volunteer.email_valid_for_invite? ? volunteer.invite_email : '',
= c.input_field :primary_email, value: volunteer.invite_email_valid? ? volunteer.invite_email : '',
class: 'form-control'
= f.button :submit, value: 'Einladung an angegebene E-Mail verschicken'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment