Forums | Mahara Community

Developers /
Edit Access - different collections/ pages


09 June 2015, 2:27 AM

Hello,

we noticed that it would be much more comfortable if you would see the full title of your single collection/page if you edit the access of collections/pages, especially if you have different collections/pages...

download.php?file=426430&embedded=1&group=1&topic=7255&post=29135

 

Our question is:  Do you have any ideas where to look for modifying this? Maybe it is possible to modify  the length of the displayed title in the front-end? Or maybe you know in which php-file we have to look?

Thanks!

Kind regards,

Katharina

 

 

Aaron Wells's profile picture
Posts: 896

24 June 2015, 12:04 PM

Hi Katharina,

This one's buried pretty deep in the code. Those checkboxes are generated by a Pieforms element called "checkboxes". This element type shortens the label for every checkbox to 17 characters by default. You can override this by adding a "labelwidth" setting to the element, which can be set to 0 to indicate there should be no limit.

The place where these checkboxes get set up, is in the form declaration in htdocs/view/access.php. Here's what you need to change, specifically:

--- a/htdocs/view/access.php
+++ b/htdocs/view/access.php
@@ -95,6 +95,7 @@ if (!empty($collections)) {
         'type'         => 'checkboxes',
         'title'        => get_string('Collections', 'collection'),
         'elements'     => $collections,
+        'labelwidth'   => 0,
     );
 }
 
@@ -110,6 +111,7 @@ if (!empty($views)) {
         'type'         => 'checkboxes',
         'title'        => get_string('views'),
         'elements'     => $views,
+        'labelwidth'   => 0,
     );
 }
 

Cheers,

Aaron

2 results