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()
364
364
public function logAction ()
365
365
{
366
366
$ path = Mage::helper ('zendesk/log ' )->getLogPath ();
367
-
367
+
368
368
if (!file_exists ($ path )) {
369
369
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 );
370
371
}
371
372
372
373
if (Mage::helper ('zendesk/log ' )->isLogTooLarge ()) {
Original file line number Diff line number Diff line change 135
135
<label >Remote Authentication Token</label >
136
136
<frontend_type >text</frontend_type >
137
137
<sort_order >2</sort_order >
138
+ <validate >validate-zendesk-sso-token</validate >
138
139
<show_in_default >1</show_in_default >
139
140
<show_in_website >1</show_in_website >
140
141
<show_in_store >1</show_in_store >
164
165
<label >Remote Authentication Token</label >
165
166
<frontend_type >text</frontend_type >
166
167
<sort_order >2</sort_order >
168
+ <validate >validate-zendesk-sso-frontend-token</validate >
167
169
<show_in_default >1</show_in_default >
168
170
<show_in_website >1</show_in_website >
169
171
<show_in_store >1</show_in_store >
Original file line number Diff line number Diff line change 22
22
<action method =" addCss" >
23
23
<stylesheet >zendesk/zendesk.css</stylesheet >
24
24
</action >
25
+ <action method =" addJs" >
26
+ <script >zendesk/validation.js</script >
27
+ </action >
25
28
</reference >
26
29
</adminhtml_system_config_edit >
27
30
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