diff --git a/config-templates/module_accounting.php b/config-templates/module_accounting.php index 8cd7b9339ad94554eaf895fffec11af546828c96..bf4435b5b6e007e70f6336d8baccffc5c6ac82f0 100755 --- a/config-templates/module_accounting.php +++ b/config-templates/module_accounting.php @@ -252,14 +252,16 @@ $config = [ /** * Enable or disable 'action buttons'. Action buttons are displayed on 'Personal data' page, and can be used to - * provide links to relevant endpoints, for example to change a password, send email to support, etc. + * provide, for example, links to relevant endpoint like to change a password, send email to support, etc. * - * Note that you can easily override the action buttons Twig template using standard SimpleSAMLphp - * custom theming features: https://simplesamlphp.org/docs/stable/simplesamlphp-theming + * Note that you should override the action buttons Twig template using standard SimpleSAMLphp custom theming + * features: https://simplesamlphp.org/docs/stable/simplesamlphp-theming * - * The path to the action buttons template file is: - * modules/accounting/templates/user/includes/_action-buttons.twig, so when creating a custom theme file, - * place it in: modules/mymodule/themes/fancytheme/accounting/user/includes/_action-buttons.twig + * The path to the action buttons template file is: modules/accounting/templates/user/includes/_action-buttons.twig. + * You can check the source of that file to see a sample dropdown, and a comment about the available variables. + * + * So, when creating a custom theme action buttons file, place it in: + * modules/{mymodule}/themes/{fancytheme}/accounting/user/includes/_action-buttons.twig */ - ModuleConfiguration::OPTION_ACTION_BUTTONS_ENABLED => true, + ModuleConfiguration::OPTION_ACTION_BUTTONS_ENABLED => false, ]; diff --git a/templates/user/includes/_action-buttons.twig b/templates/user/includes/_action-buttons.twig index 66d5be54c11675d875dd4f966e2df6098b3b84e6..52034ddd1b77c869c3ddadc91f4c235a121aa31f 100644 --- a/templates/user/includes/_action-buttons.twig +++ b/templates/user/includes/_action-buttons.twig @@ -1,8 +1,15 @@ +{# @var normalizedAttributes array User attributes #} + +{# + Example code to dump user attribute array to the screen: + {{ normalizedAttributes|json_encode(constant('JSON_PRETTY_PRINT')) }} +#} + <div class="dropdown"> <button class="dropbtn">{% trans %}TODO Actions{% endtrans %} ▾</button> <div class="dropdown-content"> - <a href="#">{% trans %}Download data{% endtrans %}</a> <a href="#">{% trans %}Custom action{% endtrans %}</a> </div> </div> +