File tree Expand file tree Collapse file tree 4 files changed +25
-1
lines changed
design/adminhtml/default/default/layout Expand file tree Collapse file tree 4 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -364,9 +364,10 @@ public function autocompleteAction()
364364 public function logAction ()
365365 {
366366 $ path = Mage::helper ('zendesk/log ' )->getLogPath ();
367-
367+
368368 if (!file_exists ($ path )) {
369369 Mage::getSingleton ('adminhtml/session ' )->addError (Mage::helper ('zendesk ' )->__ ('The Zendesk log file has not been created. Check to see if logging has been enabled. ' ));
370+ file_put_contents (" " ,$ path );
370371 }
371372
372373 if (Mage::helper ('zendesk/log ' )->isLogTooLarge ()) {
Original file line number Diff line number Diff line change 135135 <label >Remote Authentication Token</label >
136136 <frontend_type >text</frontend_type >
137137 <sort_order >2</sort_order >
138+ <validate >validate-zendesk-sso-token</validate >
138139 <show_in_default >1</show_in_default >
139140 <show_in_website >1</show_in_website >
140141 <show_in_store >1</show_in_store >
164165 <label >Remote Authentication Token</label >
165166 <frontend_type >text</frontend_type >
166167 <sort_order >2</sort_order >
168+ <validate >validate-zendesk-sso-frontend-token</validate >
167169 <show_in_default >1</show_in_default >
168170 <show_in_website >1</show_in_website >
169171 <show_in_store >1</show_in_store >
Original file line number Diff line number Diff line change 2222 <action method =" addCss" >
2323 <stylesheet >zendesk/zendesk.css</stylesheet >
2424 </action >
25+ <action method =" addJs" >
26+ <script >zendesk/validation.js</script >
27+ </action >
2528 </reference >
2629 </adminhtml_system_config_edit >
2730
Original file line number Diff line number Diff line change 1+ Validation . addAllThese ( [
2+ [ 'validate-zendesk-sso-token' , 'Token cannot be empty' , function ( v ) {
3+ if ( $ ( 'zendesk_sso_enabled' ) . getValue ( ) === '1' ) {
4+ return ! Validation . get ( 'IsEmpty' ) . test ( v ) ;
5+ } else {
6+ return true ;
7+ }
8+
9+ } ] ,
10+ [ 'validate-zendesk-sso-frontend-token' , 'Token cannot be empty' , function ( v ) {
11+ if ( $ ( 'zendesk_sso_frontend_enabled' ) . getValue ( ) === '1' ) {
12+ return ! Validation . get ( 'IsEmpty' ) . test ( v ) ;
13+ } else {
14+ return true ;
15+ }
16+
17+ } ]
18+ ] ) ;
You can’t perform that action at this time.
0 commit comments