File tree Expand file tree Collapse file tree 8 files changed +81
-2
lines changed
design/adminhtml/default/default Expand file tree Collapse file tree 8 files changed +81
-2
lines changed Original file line number Diff line number Diff line change @@ -364,9 +364,14 @@ 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
- Mage::getSingleton ('adminhtml/session ' )->addError (Mage::helper ('zendesk ' )->__ ('The Zendesk log file has not been created. Check to see if logging has been enabled. ' ));
369
+ if (is_writable ($ path )) {
370
+ Mage::getSingleton ('adminhtml/session ' )->addError (Mage::helper ('zendesk ' )->__ ('Creating a Zendesk log file. ' ));
371
+ file_put_contents (" " ,$ path );
372
+ } else {
373
+ Mage::getSingleton ('adminhtml/session ' )->addError (Mage::helper ('zendesk ' )->__ ('Magento logging has been disabled or Magento log folder has incorrect permissions. ' ));
374
+ }
370
375
}
371
376
372
377
if (Mage::helper ('zendesk/log ' )->isLogTooLarge ()) {
Original file line number Diff line number Diff line change 115
115
<zendesk >
116
116
<file >zendesk.xml</file >
117
117
</zendesk >
118
+ <jstranslate >
119
+ <file >jstranslate.xml</file >
120
+ </jstranslate >
118
121
</updates >
119
122
</layout >
120
123
<translate >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!--
3
+ /**
4
+ * Copyright 2015 Zendesk
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ -->
19
+ <jstranslator >
20
+ <validate-zendesk-sso-token translate =" message" module =" zendesk" >
21
+ <message >Token cannot be empty</message >
22
+ </validate-zendesk-sso-token >
23
+ <validate-zendesk-sso-frontend-token translate =" message" module =" zendesk" >
24
+ <message >Token cannot be empty</message >
25
+ </validate-zendesk-sso-frontend-token >
26
+ </jstranslator >
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 >
28
+ </reference >
29
+ <reference name =" content" >
30
+ <block type =" core/template" template =" zendesk/translations.phtml" ></block >
25
31
</reference >
26
32
</adminhtml_system_config_edit >
27
33
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright 2015 Zendesk
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ ?>
18
+ <script>
19
+ Translator.add('Token cannot be empty', '<?php echo $ this ->__ ('Token cannot be empty ' ); ?> ');
20
+ </script>
Original file line number Diff line number Diff line change 109
109
"Decide which features you would like turned on in your admin panel.","Decide which features you would like turned on in your admin panel."
110
110
"Show "All" tab on dashboard","Show "All" tab on dashboard"
111
111
"Generate New Token","Generate New Token"
112
+ "Token cannot be empty","Token cannot be empty"
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
+ [ 'validate-zendesk-sso-frontend-token' , 'Token cannot be empty' , function ( v ) {
10
+ if ( $ ( 'zendesk_sso_frontend_enabled' ) . getValue ( ) === '1' ) {
11
+ return ! Validation . get ( 'IsEmpty' ) . test ( v ) ;
12
+ } else {
13
+ return true ;
14
+ }
15
+ } ]
16
+ ] ) ;
You can’t perform that action at this time.
0 commit comments