@@ -43,7 +43,6 @@ protected function init()
4343
4444 /**
4545 * Dump all module dashlets which are not selected by the user
46- * from the member variable
4746 *
4847 * @param bool $strict Whether to match populated of the dashlet against a 'y'
4948 *
@@ -59,12 +58,14 @@ protected function dumpArbitaryDashlets(bool $strict = true): void
5958 if ($ this ->getPopulatedValue ($ element ) === 'y ' || (! $ strict && $ this ->getPopulatedValue ($ element ))) {
6059 $ title = $ this ->getPopulatedValue ($ element );
6160 $ url = $ this ->getPopulatedValue ($ element . '_url ' );
61+ $ description = $ this ->getPopulatedValue ($ element . '_description ' );
6262
6363 if (! $ strict && $ title && $ url ) {
6464 $ dashlet
6565 ->setUrl ($ url )
6666 ->setName ($ title . '( ' . $ module . ') ' )
67- ->setTitle ($ title );
67+ ->setTitle ($ title )
68+ ->setDescription ($ description );
6869 }
6970
7071 $ chosenDashlets [$ module ][$ dashlet ->getName ()] = $ dashlet ;
@@ -187,6 +188,12 @@ protected function assembleNexPageDashletPart()
187188 'Enter url to be loaded in the dashlet. You can paste the full URL, including filters '
188189 )
189190 ]);
191+
192+ $ this ->addElement ('textarea ' , $ elementId . '_description ' , [
193+ 'label ' => t ('Description ' ),
194+ 'value ' => $ dashlet ->getDescription (),
195+ 'description ' => t ('Enter description for the dashlet ' )
196+ ]);
190197 }
191198 }
192199 }
@@ -210,6 +217,12 @@ protected function assembleDashletElements()
210217 'Enter url to be loaded in the dashlet. You can paste the full URL, including filters. '
211218 ),
212219 ]);
220+
221+ $ this ->addElement ('textarea ' , 'description ' , [
222+ 'label ' => t ('Description ' ),
223+ 'placeholder ' => t ('Enter dashlet description ' ),
224+ 'description ' => t ('Enter description for the dashlet ' ),
225+ ]);
213226 }
214227
215228 protected function assemble ()
0 commit comments