@@ -26,10 +26,10 @@ class ColorManagerController extends \Kanboard\Controller\ConfigController
26
26
public function show ()
27
27
{
28
28
$ this ->response ->html ($ this ->helper ->layout ->config ('colorManager:config/colors ' , array (
29
- 'title ' => t ('Settings ' ) .' ⥂ ' . t ('Color Manager ' ),
29
+ 'title ' => t ('Settings ' ) . ' ⥂ ' . t ('Color Manager ' ),
30
30
)));
31
31
}
32
-
32
+
33
33
public function add ()
34
34
{
35
35
$ errors = [];
@@ -38,10 +38,10 @@ public function add()
38
38
$ this ->response ->html ($ this ->helper ->layout ->config ('colorManager:config/add_custom_color ' , [
39
39
'errors ' => $ errors ,
40
40
'values ' => $ values ,
41
- 'title ' => t ('Custom Colors ' ). ' > ' . t ('Add Color ' ),
41
+ 'title ' => t ('Custom Colors ' ) . ' > ' . t ('Add Color ' ),
42
42
]));
43
43
}
44
-
44
+
45
45
public function remove ()
46
46
{
47
47
$ key = $ this ->request ->getStringParam ('key ' );
@@ -61,13 +61,12 @@ public function remove()
61
61
$ this ->configModel ->save (['kbcolour_ids ' => $ custom_colors_string ]);
62
62
63
63
$ this ->configModel ->remove ('kbcolour_name_ ' .$ key );
64
- $ this ->configModel ->remove ('kbcolour_backgroundcolor_ ' . $ key );
65
- $ this ->configModel ->remove ('kbcolour_bordercolor_ ' . $ key );
64
+ $ this ->configModel ->remove ('kbcolour_backgroundcolor_ ' . $ key );
65
+ $ this ->configModel ->remove ('kbcolour_bordercolor_ ' . $ key );
66
66
67
67
$ this ->response ->redirect ($ this ->helper ->url ->to ('ColorManagerController ' , 'show ' , ['plugin ' => 'ColorManager ' , 'url ' => t ('color-manager ' )]));
68
-
69
68
}
70
-
69
+
71
70
public function save ()
72
71
{
73
72
$ errors = [];
@@ -88,12 +87,11 @@ public function save()
88
87
if (is_array ($ custom_colors_array )) { $ custom_colors_string = implode (', ' , $ custom_colors_array ); } else { $ custom_colors_string = $ color_id ; }
89
88
$ this ->configModel ->save (['kbcolour_ids ' => $ custom_colors_string ]);
90
89
$ this ->configModel ->save (['kbcolour_name_ ' .$ color_id => $ values ['color_name ' ]]);
91
- $ this ->configModel ->save (['kbcolour_backgroundcolor_ ' . $ color_id => $ values ['background_color ' ]]);
92
- $ this ->configModel ->save (['kbcolour_bordercolor_ ' . $ color_id => $ values ['border_color ' ]]);
90
+ $ this ->configModel ->save (['kbcolour_backgroundcolor_ ' . $ color_id => $ values ['background_color ' ]]);
91
+ $ this ->configModel ->save (['kbcolour_bordercolor_ ' . $ color_id => $ values ['border_color ' ]]);
93
92
}
94
93
}
95
-
94
+
96
95
$ this ->response ->redirect ($ this ->helper ->url ->to ('ColorManagerController ' , 'show ' , ['plugin ' => 'ColorManager ' , 'url ' => t ('color-manager ' )]));
97
-
98
96
}
99
97
}
0 commit comments