Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/announcement' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeig committed Sep 20, 2024
2 parents a62aa12 + 97adc68 commit 7dc0567
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Goteo/Library/Forms/Model/AnnouncementForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ public function createForm(): AnnouncementForm
'label' => 'regular-cta',
'required' => false,
'data' => $announcement->cta_url,
'attr' => ['help' => Text::get('admin-announcement-cta-text')]
])
->add('cta_text', TextType::class, [
'label' => 'regular-cta-text',
'required' => false,
'data' => $announcement->cta_text
'data' => $announcement->cta_text,
'attr' => ['help' => Text::get('admin-announcement-cta-text')]
])
->add('active', BooleanType::class, [
'label' => 'regular-active',
Expand Down Expand Up @@ -95,6 +97,7 @@ public function save(FormInterface $form = null, $force_save = false)
$announcement->title = $data['title'];
$announcement->description = $data['description'];
$announcement->active = $data['active'];
$announcement->type = $data['type'];
$announcement->lang = Session::get('lang');

if (isset($data['cta_url']))
Expand Down
1 change: 1 addition & 0 deletions translations/ca/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,4 @@ admin-announcement-edit: "Editar anunci"
admin-announcements-type-general: "General"
admin-announcements-type-donation: "Donacions"
admin-announcements-type-project: "Projectes"
admin-announcement-cta-text: "Aquest CTA només es mostrarà si el tipus d'anunci no és de donació"
1 change: 1 addition & 0 deletions translations/en/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -559,3 +559,4 @@ admin-announcements: "Announcements"
admin-announcements-type-general: "General"
admin-announcements-type-donation: "Donations"
admin-announcements-type-project: "Projects"
admin-announcement-cta-text: "This CTA will only be shown if the type is not Donations"
1 change: 1 addition & 0 deletions translations/es/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -627,3 +627,4 @@ admin-announcement-edit: "Modificar anuncio"
admin-announcements-type-general: "General"
admin-announcements-type-donation: "Donaciones"
admin-announcements-type-project: "Proyectos"
admin-announcement-cta-text: "Este CTA solo se mostrará si el tipo de anuncio no es de donación"

0 comments on commit 7dc0567

Please sign in to comment.