Commit Graph
35 Commits
Author SHA1 Message Date
b772526ae3 Replace outdated Twig features with recommended equivalents (#2780)
* Replace Twig `include` tag with function

* Replace Twig `attribute` function with dot operator

* Fix spelling issues in mod_order_manage.html.twig

---------

Co-authored-by: John P <64874788+j-a-pope@users.noreply.github.com>
Co-authored-by: Yağızhan <yagizhan49@protonmail.com>
2025-06-07 11:40:06 +03:00
Yağızhan 00b3b97f66 Make more messages translatable (#2778)
* Make static messages translatable

* Typo

* Second batch

* Make static messages translatable

* Typo

* Second batch

* Applying suggested fixes

* Applying suggested fixes

* Missed this one

* Make documentation section titles untranslatable

* Use double quotes instead of escaping single quotes
2025-06-07 11:34:24 +03:00
Yağızhan f2bb4179d2 Reworked the Pagination class (#2759)
* Introduce the new Paginator class

* Rename it back to Pagination

* Move #2756 here

* Use HttpFoundation\Request

* Restore Box_Paginator

* Tests

* Replace the deprecated methods wherever used

* No need

* Tests

* Tests again

* tests

* Tests hopefully for the last time

* Use a subquery instead

* Found a faulty query

`m.*` already includes `client_id`. was getting a duplicated column error.

* New pagination logic in Huraga & a couple of improvements

* Type safety

* Accessibility and other improvements

* Fixed tests

* Make aria tags translatable

* Update partial_pagination.html.twig

* Dot operator and little docblock improvement

---------
2025-06-04 15:21:09 +03:00
Yağızhan 8b63625de2 Some visual improvements (#2704)
* Cleaner message for the dangerousFunctions check

* Added hyphens before the messages

* Update mod_index_dashboard.html.twig

* Drop Verdana

* Moved the "Run all checks" button to the header

* Create partial_search_action.html.twig

* Use the new search action

* Update mod_security_index.html.twig

* Update mod_activity_settings.html.twig

* Update dangerousFunctions.php

* Update mod_cron_settings.html.twig

* Update -> Update FOSSBilling

* Update -> Update FOSSBilling

* Update mod_staff_manage.html.twig

Fully rewritten except the "permissions" tab.

* Update mod_servicehosting_index.html.twig

* Also add tooltips

* Update mod_product_index.html.twig

* Update mod_product_promos.html.twig

* Update partial_search_action.html.twig

* Restore Verdana

* Update dangerousFunctions.php

* Update mod_staff_manage.html.twig

* Update mod_security_index.html.twig

* The library already handles this

* +calendar.svg

* Move the datepicker

* Update mod_staff_manage.html.twig

* Update mod_cron_settings.html.twig
2025-05-03 08:00:35 +01:00
Adam Daley bc4dd1d459 Replace FOSSBilling\Request with Symfony\HttpFoundation (#2645)
Replace `FOSSBilling\Request` with `Symfony\HttpFoundation` functionality.
2025-04-17 07:43:38 +01:00
Belle Aerni 368f8cd6ad Bump the year (#2581) 2025-01-23 15:11:53 -08:00
Belle Aerni 3449537c92 Fixed CS / Rector workflow and ran both (#2580) 2025-01-20 16:19:45 -08:00
Belle Aerni b35d902a6a Security dashboard & checks (#2503)
* Started implimenting a security dashboard and checks

* Wrote two functional checks

* Fix typos

* Update webserver.php

* + a new check

* Slight cleanup, made translatable

* Added some general checks

* Update cspell.json

* Typo

* Slight tweaks, add a permission to run checks
2025-01-08 10:52:07 +00:00
Belle Aerni a5d15c2a99 Upgrade GeoIP functionality & replace the databases (#2471)
* Replaced Maxmind's IP database

* Began rebuilding GeoIP reader functionality

The GeoIP2 package does not worth with DB's that aren't built by maxmind themselves, making it rather unhelpful for us.

Since my long-term goal is for someone to be able to bring in their own DB, making a custom implementation seems like the reasonable choice.

(Plus my aim is already to replace the MaxMind DB due to it's licencing)

* Created an IP address lookup page

* + ASN info

* Bump last patch

* Make PHPStan happy

* Very minor refactor + PHPDocs
2024-10-31 19:31:50 +01:00
Belle Aerni 1451d735b7 Made the email log cleanup config seperate from other activity logs (#2297)
Also fixed a bug with the original code since it never referenced the specific config property
2024-06-09 17:52:48 -07:00
FOSSBilling BotandFOSSBilling Bot bf79a2b204 Apply PHP Code Styling & Quality Changes (#2190)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2024-03-19 05:54:06 -07:00
Belle Aerni d771457efc Bump the year (#2167)
* Bump the year

* And fix the spelling
2024-02-25 02:45:38 -08:00
Belle Aerni 969214c040 Added an icon for the activity module (#2157)
* Added an icon for the activity module

* Fix
2024-02-18 16:52:36 -08:00
FOSSBilling BotandFOSSBilling Bot 1424110532 Apply PHP Code Styling & Quality Changes (#2139)
Co-authored-by: FOSSBilling Bot <fossbilling-bot>
2024-02-13 06:43:27 -08:00
Belle Aerni 27ddcacd6e Added a configurable age limit for activity data (#2134) 2024-02-11 16:59:48 +00:00
Belle Aerni 5bd3ff7751 Begin reworking permission management (#1545)
* Begin reworking permission management

* Tests

* This.. tested functionality that didn't exist in the app

* Fixes

* Added permission checks for the system module

* Implemented extension settings permission

The "extension" settings page will now check for permission before allowing a staff member to even visit the settings page for a client.

FOSSBilling will also check for permission before saving a new config so the API can't be used to bypass this limitation.

I also removed a test as it was checking a function which only ever had one possible return value, no point in updating it to work with this PR

* This should fix the test

* I got a little mixed up with that, but this should work

* Fixed the tests

* Implemented give all & revoke all buttons

* Implemented more, enhancements, & bugfix

* Rename function

* Fix tests

* Optimize, address comment

* Now let's make the tests happy again

* Deduplicate code, cleanup a bit

* Bugfix

* Added selectbox support to the front-end

* Quick bugfix

* Fix issue PHPStan detected

* Bug fix

* Improved page layout & styling

* Implemented more checks

* Fix the tests

* Update error.html.twig

* Cleanup

* Fix the tests

* Updated the design to be more space efficient

* Don't list module access when always given

* Updated the exception type

* setMethod -> onlyMethods

* I donno how that got goofed up

* Fix the test, email module should always be accessible

* Removed the broken test

It's.. not really checking anything anyways. Just that the `extension` module is in a hardcoded array.
2023-11-21 16:18:53 -08:00
fefbcd21b0 Apply PHP Code Styling & Quality Changes (#1498)
* Apply PHP Code Styling & Quality Changes

* Delete these

* Update .gitignore

* Fixes for PHPStan

* Ignore spelling in the gitnore

* Allow null for that type

Honestly doing so makes ZERO sense, but it matches the current behavior.

---------

Co-authored-by: FOSSBilling Bot <fossbilling-bot>
Co-authored-by: Belle Aerni <belleaerni@gmail.com>
2023-07-30 08:57:44 -07:00
Yağızhanandfossbilling-bot fd872ac941 Implement PHP-CS-Fixer as an automated workflow (#1240)
* Implement PHP-CS-Fixer as an automated workflow

* Apply PHP-CS-Fixer changes

---------

Co-authored-by: fossbilling-bot <121974958+fossbilling-bot@users.noreply.github.com>
2023-07-30 06:49:11 -07:00
Belle Aerni 5d862a7f18 Make tables sortable in the admin panel (#1406) 2023-07-04 14:35:44 +02:00
Yağızhan d909d77f7e -Unnecessary whitespace in the class headers (#1219) 2023-05-07 13:24:29 -07:00
Yağızhan 412e4a9fbd Standardized the class headers (#1212) 2023-05-06 13:06:17 +01:00
Adam Daley e54569d2cd Introduce namespaces and strict typing for FOSSBilling library classes (#1206) 2023-05-04 01:02:06 +01:00
Yağızhan 950e4dccef Type hinting the DI methods and variables (#1201) 2023-05-01 21:01:35 +03:00
Belle Aerni 628b6f559a Minor admin_default improvements (#1080) 2023-04-07 00:04:27 -07:00
Belle Aerni 9faa981c58 Replace usage of array_get (#989)
* Replace usage of array_get

* Fixes

* And a few more

* Remove remaining references

* Update Service.php

* Few more fixes

* Fix.. I think?

* Fix Client / Invoice updates

* Fix stats

* Fix issues noticed during code review

* More fixes

* And some more fixes :)
2023-03-27 23:44:30 -07:00
Adam Daley 9fb19e02d7 Improve date/datetime format handling and customisability (#948)
* Replace custom Twig bb_date/bb_datetime filters

Replace bb_date and bb_datetime Twig filters with format_date / format_datetime to better support i18n and customisability.

* Update templates to use format_date/format_datetime

Update all templates to use format_date/format_datetime (where appropriate and where not already used).

* Update locale configuration options

Update configuration options to include new locale settings, and ensure new options are used throughout.

* Add reset button to admin theme date picker

Add a reset button to the admin_default theme date picker to allow dates to be cleared, and fix an issue with Order module not allow blank dates. Resolves #938.
2023-03-24 23:16:07 +00:00
Belle Aerni 740f9e1371 Cleanup some more admin_default inconsistencies (#972) 2023-03-19 00:10:48 +00:00
ShamshidandYağızhan cdca4b7e50 Add/replace modules icon and update manifest (#872)
* add/replace modules icon and update manifest entry

* update modules manifest homepage_url

* include svg to set color via css

* +Attribution

---------

Co-authored-by: Yağızhan <yagizhan49@protonmail.com>
2023-03-01 19:46:57 -08:00
Belle Aerni d71d445661 Make module labels translatable 2023-01-21 21:38:08 -08:00
Belle Aerni 774f0d5c95 Use Rector to modernize code for PHP 8.0 2023-01-12 00:40:54 -08:00
Belle Aerni e10c07a9ed Fix a few indentation issues 2022-12-27 15:57:01 -08:00
Belle Aerni 41d498ac86 Start improving API PHPDocs 2022-12-24 21:09:21 -08:00
Belle Aerni 8821d50cff Created a CSRF token system (#526)
* Implement a basic CSRF token system

* Update forms for all modules

* Added to the theme forms

* Create a config option for CSRF prevention

* Slightly rework the filter

* Let's actually use a global var

* Added the token to API hrefs

* Fixup

* Remove old reference

* Added the token to the installer twig globals

* The token isn't actually needed in the installer

* Fix client searching

* Whoops - those need quotes
2022-12-06 18:47:14 +01:00
evrifaessa 8cd8f57003 Typos and wording 2022-12-03 19:28:03 +03:00
Belle Aerni edd6f72634 Drop the "BB" prefix 2022-11-28 17:22:50 +03:00