Skip to content

Commit

Permalink
Styled Bootstrap links for group update/create and unique email valid…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
mpugach committed Dec 24, 2023
1 parent 0f7779f commit 1f69696
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/controllers/academic_groups_controller.rb
Expand Up @@ -184,7 +184,8 @@ def link_or_name
view_context.link_to_if(
policy(@academic_group).show?,
title,
academic_group_path(@academic_group)
academic_group_path(@academic_group),
class: 'alert-link'
) do
title
end
Expand Down
2 changes: 1 addition & 1 deletion config/locales/active_record.ru.yml
Expand Up @@ -116,7 +116,7 @@ ru:
email:
blank: 'должна быть заполнена'
invalid: 'должна иметь формат «primer@example.com»'
taken: 'занята. Возможно Вы уже зарегистрированы, попробуйте <a href="/password/new">восстановить пароль</a>'
taken: 'занята. Возможно Вы уже зарегистрированы, попробуйте <a class="alert-link" href="/password/new">восстановить пароль</a>'
current_password:
blank: 'должен быть заполнен'
invalid: 'не правильный'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/active_record.uk.yml
Expand Up @@ -131,7 +131,7 @@ uk:
email:
blank: 'повинна бути заповнена'
invalid: 'повинна відповідати формату «pryklad@example.com»'
taken: 'зайнята. Можливо Ви вже зареєстровані, спробуйте <a href="/password/new">відновити пароль</a>'
taken: 'зайнята. Можливо Ви вже зареєстровані, спробуйте <a class="alert-link" href="/password/new">відновити пароль</a>'
gender:
inclusion: 'повинна бути обрана'
password:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/responders.ru.yml
Expand Up @@ -20,7 +20,7 @@ ru:
create:
success_html: "%{resource_name} %{link_or_name} была успешно создана."
update:
success: "%{resource_name} была успешно обновлена."
success_html: "%{resource_name} %{link_or_name} была успешно обновлена."
destroy:
success: "%{resource_name} была успешно удалена."
alert: "%{resource_name} не была удалена."
2 changes: 1 addition & 1 deletion config/locales/responders.uk.yml
Expand Up @@ -20,7 +20,7 @@ uk:
create:
success_html: "%{resource_name} %{link_or_name} була успішно створена."
update:
success: "%{resource_name} була успішно оновлена."
success_html: "%{resource_name} %{link_or_name} була успішно оновлена."
destroy:
success: "%{resource_name} була успішно видалена."
alert: "%{resource_name} не була видалена"
6 changes: 5 additions & 1 deletion spec/features/academic_groups/edit_academic_group_spec.rb
Expand Up @@ -9,7 +9,11 @@
expect(find('body')).to(
have_selector(
'.alert-success',
text: I18n.t('flash.academic_groups.update.success', resource_name: model_name_locale)
text: I18n.t(
'flash.academic_groups.update.success_html',
resource_name: model_name_locale,
link_or_name: academic_group.reload.title
)
)
)
end
Expand Down

0 comments on commit 1f69696

Please sign in to comment.