backdrop-contrib / font_awesome

Include Font Awesome Icons via CSS classes in your Backdrop CMS website
https://backdropcms.org/project/font_awesome
GNU General Public License v2.0
2 stars 4 forks source link

On settings save it saves entire form array to config #2

Closed herbdool closed 6 years ago

herbdool commented 7 years ago

When saving configuration please be selective of what config to save. Right now it's saving everything in the form array. For example,

{
    "_config_name": "font_awesome.settings",
    "font_awesome_1": 1,
    "submit": "Save configuration",
    "form_build_id": "form-Efk2RAJc-gErBMeffdfdfcTVz-Q5wKzdUKtkJ6DYkL2_Qs",
    "form_token": "DRoHLlNdx6YFLa4uPqi3g8sdfsHra7BvFdYg-QLj2wuzzVY",
    "form_id": "font_awesome_admin_settings",
    "op": "Save configuration"
}

Only the font_awesome variables needs to be saved.

jenlampton commented 6 years ago

This could probably be handled by adding system_settings_form() to the form array, and a $form['#config'] = '...';. I expect it was ported before we added the system_settings_form function back.

ghost commented 6 years ago

@herbdool Can you please test the latest code and confirm that this is fixed now? It seems to be working fine for me...