forked from GNUsocial/gnu-social
[UI] Rename all forms to more specific names, to avoid form name collisions
This commit is contained in:
parent
c03c6f1bb5
commit
2c10ce5cfc
@ -68,7 +68,7 @@ class Avatar extends Controller
|
||||
['avatar', FileType::class, ['label' => _m('Avatar'), 'help' => _m('You can upload your personal avatar. The maximum file size is 2MB.'), 'multiple' => false, 'required' => false]],
|
||||
['remove', CheckboxType::class, ['label' => _m('Remove avatar'), 'help' => _m('Remove your avatar and use the default one'), 'required' => false, 'value' => false]],
|
||||
['hidden', HiddenType::class, []],
|
||||
['save', SubmitType::class, ['label' => _m('Submit')]],
|
||||
['save_avatar', SubmitType::class, ['label' => _m('Submit')]],
|
||||
]);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
@ -82,7 +82,7 @@ END;
|
||||
['attachments', FileType::class, ['label' => ' ', 'data' => null, 'multiple' => true, 'required' => false]],
|
||||
['visibility', ChoiceType::class, ['label' => _m('Visibility:'), 'expanded' => true, 'data' => 'public', 'choices' => [_m('Public') => 'public', _m('Instance') => 'instance', _m('Private') => 'private']]],
|
||||
['to', ChoiceType::class, ['label' => _m('To:'), 'multiple' => true, 'expanded' => true, 'choices' => $to_tags]],
|
||||
['post', SubmitType::class, ['label' => _m('Post')]],
|
||||
['post_note', SubmitType::class, ['label' => _m('Post')]],
|
||||
]);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
@ -82,7 +82,7 @@ class Cover
|
||||
'mimeTypesMessage' => 'Please upload a valid image',
|
||||
]), ], ]],
|
||||
['hidden', HiddenType::class, []],
|
||||
['save', SubmitType::class, ['label' => _m('Submit')]],
|
||||
['save_color', SubmitType::class, ['label' => _m('Submit')]],
|
||||
]);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
@ -66,7 +66,7 @@ class ProfileColor
|
||||
$form = Form::create([
|
||||
['color', ColorType::class, ['data' => $color, 'label' => _m('Profile Color'), 'help' => _m('Choose your Profile Color')] ],
|
||||
['hidden', HiddenType::class, []],
|
||||
['save', SubmitType::class, ['label' => _m('Submit')]],
|
||||
['save_profile_color', SubmitType::class, ['label' => _m('Submit')]],
|
||||
]);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
@ -64,7 +64,7 @@ class AdminPanel extends Controller
|
||||
$form = Form::create([
|
||||
['setting', ChoiceType::class, ['label' => _m('Setting'), 'choices' => $options]],
|
||||
['value', TextType::class, ['label' => _m('Value')]],
|
||||
['save', SubmitType::class, ['label' => _m('Set site setting')]],
|
||||
['save_admin', SubmitType::class, ['label' => _m('Set site setting')]],
|
||||
]);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
@ -100,7 +100,7 @@ class UserPanel extends AbstractController
|
||||
['bio', TextareaType::class, ['label' => _m('Bio'), 'required' => false, 'help' => _m('Describe yourself and your interests.')]],
|
||||
['location', TextType::class, ['label' => _m('Location'), 'required' => false, 'help' => _m('Where you are, like "City, State (or Region), Country".')]],
|
||||
['self_tags', TextType::class, ['label' => _m('Self Tags'), 'required' => false, 'help' => _m('Tags for yourself (letters, numbers, -, ., and _), comma- or space-separated.'), 'transformer' => ArrayTransformer::class]],
|
||||
['save', SubmitType::class, ['label' => _m('Save personal info')]],
|
||||
['save_personal_info', SubmitType::class, ['label' => _m('Save personal info')]],
|
||||
];
|
||||
$extra_step = function ($data, $extra_args) use ($user) {
|
||||
$user->setNickname($data['nickname']);
|
||||
@ -124,7 +124,7 @@ class UserPanel extends AbstractController
|
||||
FormFields::repeated_password(['required' => false]),
|
||||
['language', LocaleType::class, ['label' => _m('Language'), 'required' => false, 'help' => _m('Your preferred language')]],
|
||||
['phone_number', PhoneNumberType::class, ['label' => _m('Phone number'), 'required' => false, 'help' => _m('Your phone number'), 'data_class' => null]],
|
||||
['save', SubmitType::class, ['label' => _m('Save account info')]],
|
||||
['save_account_info', SubmitType::class, ['label' => _m('Save account info')]],
|
||||
]);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
@ -28,7 +28,7 @@
|
||||
{{ form_widget(post_form.attachments) }}
|
||||
</label>
|
||||
|
||||
{{ form_row(post_form.post, {'attr': {'class': 'section-form-send'}}) }}
|
||||
{{ form_row(post_form.post_note, {'attr': {'class': 'section-form-send'}}) }}
|
||||
|
||||
{{ form_end(post_form) }}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user