File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,8 @@ public function admin_add()
159159 }
160160 }
161161 }
162- $ this ->set ('countries ' , $ this ->_arrayToValuesIndexArray ($ this ->Organisation ->getCountries ()));
162+ $ countries = array_merge (['' => __ ('Not specified ' )], $ this ->_arrayToValuesIndexArray ($ this ->Organisation ->getCountries ()));
163+ $ this ->set ('countries ' , $ countries );
163164 }
164165
165166 public function admin_edit ($ id )
@@ -238,7 +239,7 @@ public function admin_edit($id)
238239 $ this ->request ->data = $ this ->Organisation ->data ;
239240 }
240241
241- $ countries = $ this ->_arrayToValuesIndexArray ($ this ->Organisation ->getCountries ());
242+ $ countries = array_merge ([ '' => __ ( ' Not specified ' )], $ this ->_arrayToValuesIndexArray ($ this ->Organisation ->getCountries () ));
242243 if (!empty ($ this ->Organisation ->data ['Organisation ' ]['nationality ' ])) {
243244 $ currentCountry = $ this ->Organisation ->data ['Organisation ' ]['nationality ' ];
244245 if (!isset ($ countries [$ currentCountry ])) {
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ public function beforeValidate($options = array())
104104 }
105105 $ this ->data ['Organisation ' ]['date_modified ' ] = $ date ;
106106 if (!isset ($ this ->data ['Organisation ' ]['nationality ' ]) || empty ($ this ->data ['Organisation ' ]['nationality ' ])) {
107- $ this ->data ['Organisation ' ]['nationality ' ] = 'Not specified ' ;
107+ $ this ->data ['Organisation ' ]['nationality ' ] = '' ;
108108 }
109109 return true ;
110110 }
You can’t perform that action at this time.
0 commit comments