Admin Settings
Apex offers an easy way to quickly generate settings within the administration panel via the opus admin-settings CLI command. Within terminal, run the following command:
apex opus admin-settings disaster admin/settings/disaster
This will go through all config
variables within the package.yml file and generate a new view which consists of two files at:
- /views/html/admin/settings/disaster.html
- /views/php/admin/settings/disaster.php
Although Apex will do its best to determine form fields, some manual modification is necessary. Open the file at /views/html/admin/settings/disaster.html, and starting on line 14 you will see the lines:
<s:ft_boolean name="donate_paypal_address" value="~config.disaster.donate_paypal_address~">
<s:ft_boolean name="donate_bitcoin_address" value="~config.disaster.donate_bitcoin_address~">
Change these two lines to:
<s:ft_textbox name="donate_paypal_address" value="~config.disaster.donate_paypal_address~">
<s:ft_textbox name="donate_bitcoin_address" value="~config.disaster.donate_bitcoin_address~">
All that was changed was converting "ft_boolean" into "ft_textbox". Within your web browser, visit the new Settings->Disaster Relief menu and you will see the new view where you can update settings as desired.