File tree Expand file tree Collapse file tree 4 files changed +21
-8
lines changed
Expand file tree Collapse file tree 4 files changed +21
-8
lines changed Original file line number Diff line number Diff line change 11# Solspace Freeform Changelog
22
3+ ## 2.0.0-beta.8 - 2018-02-14
4+ ### Fixed
5+ - Fixed a bug where the CP Submissions list page broke after Craft 3 RC 10 update.
6+
37## 2.0.0-beta.7 - 2018-02-13
48### Added
59- Added Dutch translations.
Original file line number Diff line number Diff line change 11{
22 "name" : " solspace/craft3-freeform" ,
33 "description" : " The most intuitive and powerful form builder for Craft." ,
4- "version" : " 2.0.0-beta.7 " ,
4+ "version" : " 2.0.0-beta.8 " ,
55 "type" : " craft-plugin" ,
66 "minimum-stability" : " dev" ,
77 "authors" : [
Original file line number Diff line number Diff line change @@ -123,11 +123,8 @@ protected function beforePrepare(): bool
123123 $ this ->subQuery ->andWhere (Db::parseParam ($ table . '.incrementalId ' , $ this ->incrementalId ));
124124 }
125125
126- if ($ this ->status && \is_string ($ this ->status ) && preg_match ('/ / ' , $ this ->status )) {
127- $ status = explode (' ' , $ this ->status );
128- $ status = reset ($ status );
129-
130- $ this ->subQuery ->andWhere (Db::parseParam ($ statusTable . '.handle ' , $ status ));
126+ if ($ this ->status && \is_string ($ this ->status )) {
127+ $ this ->subQuery ->andWhere (Db::parseParam ($ statusTable . '.handle ' , $ this ->status ));
131128 $ this ->status = '' ;
132129 }
133130
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public static function statuses(): array
106106
107107 $ list = [];
108108 foreach ($ statuses as $ status ) {
109- $ list [$ status ->handle . ' ' . $ status ->color ] = $ status ->name ;
109+ $ list [$ status ->handle ] = [ ' label ' => $ status ->name , ' color ' => $ status ->color ] ;
110110 }
111111
112112 return $ list ;
@@ -245,6 +245,10 @@ protected static function defineActions(string $source = null): array
245245 */
246246 protected function tableAttributeHtml (string $ attribute ): string
247247 {
248+ if ($ attribute === 'status ' ) {
249+ return $ this ->getStatusModel ()->name ;
250+ }
251+
248252 $ value = $ this ->$ attribute ;
249253
250254 if (\is_array ($ value )) {
@@ -284,10 +288,18 @@ protected function tableAttributeHtml(string $attribute): string
284288 return parent ::tableAttributeHtml ($ attribute );
285289 }
286290
291+ /**
292+ * @return string
293+ */
294+ public function getStatus (): string
295+ {
296+ return $ this ->getStatusModel ()->handle ;
297+ }
298+
287299 /**
288300 * @return StatusModel
289301 */
290- public function getStatus (): StatusModel
302+ public function getStatusModel (): StatusModel
291303 {
292304 return Freeform::getInstance ()->statuses ->getStatusById ($ this ->statusId );
293305 }
You can’t perform that action at this time.
0 commit comments