Skip to content

Commit ec88304

Browse files
committed
Fix "notify me of package update failures" checkbox on profile edit form
1 parent 7e4bb58 commit ec88304

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

css/app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ input:focus:invalid:focus, textarea:focus:invalid:focus, select:focus:invalid:fo
16131613
}
16141614

16151615

1616-
.edit_profile .notifications {
1616+
.edit_profile .failure-notifications {
16171617
margin: 10px 0;
16181618
float: left;
16191619
}

src/Form/Type/ProfileFormType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
use App\Entity\User;
1616
use Symfony\Component\Form\AbstractType;
17+
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
1718
use Symfony\Component\Form\Extension\Core\Type\EmailType;
1819
use Symfony\Component\Form\Extension\Core\Type\TextType;
1920
use Symfony\Component\Form\FormBuilderInterface;
@@ -58,7 +59,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
5859
});
5960

6061
$builder
61-
->add('failureNotifications', null, ['required' => false, 'label' => 'Notify me of package update failures']);
62+
->add('failureNotifications', CheckboxType::class, ['required' => false, 'label' => 'Notify me of package update failures']);
6263
}
6364

6465
public function configureOptions(OptionsResolver $resolver): void

templates/user/edit.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</div>
3434
{% endif %}
3535

36-
<div class="notifications form-group">
36+
<div class="failure-notifications form-group">
3737
{{ form_errors(form.failureNotifications) }}
3838
<label>
3939
{{ form_widget(form.failureNotifications) }}

0 commit comments

Comments
 (0)