Completed
Branch ENH-10737-invoice-conf-text-de... (02c334)
by
unknown
77:53 queued 65:15
created
payment_methods/Invoice/EE_PMT_Invoice.pm.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_PMT_Invoice extends EE_PMT_Base{
28
+class EE_PMT_Invoice extends EE_PMT_Base {
29 29
 
30 30
 
31 31
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	public function __construct($pm_instance = NULL) {
38 38
 		$this->_pretty_name = esc_html__("Invoice", 'event_espresso');
39 39
 		$this->_default_description = sprintf(
40
-			esc_html__( 'After clicking "Finalize Registration", you will be given instructions on how to access your invoice and complete your payment.%sPlease note that event spaces will not be reserved until payment is received in full, and any remaining tickets could be sold to others in the meantime.', 'event_espresso' ),
40
+			esc_html__('After clicking "Finalize Registration", you will be given instructions on how to access your invoice and complete your payment.%sPlease note that event spaces will not be reserved until payment is received in full, and any remaining tickets could be sold to others in the meantime.', 'event_espresso'),
41 41
 			'<br />'
42 42
 		);
43 43
 		parent::__construct($pm_instance);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 * @param \EE_Transaction $transaction
52 52
 	 * @return NULL
53 53
 	 */
54
-	public function generate_new_billing_form( EE_Transaction $transaction = NULL ) {
54
+	public function generate_new_billing_form(EE_Transaction $transaction = NULL) {
55 55
 		return NULL;
56 56
 	}
57 57
 
@@ -64,53 +64,53 @@  discard block
 block discarded – undo
64 64
 	public function generate_new_settings_form() {
65 65
 		$pdf_payee_input_name = 'pdf_payee_name';
66 66
 		$confirmation_text_input_name = 'page_confirmation_text';
67
-		$form =  new EE_Payment_Method_Form(array(
67
+		$form = new EE_Payment_Method_Form(array(
68 68
 //				'payment_method_type' => $this,
69 69
 				'extra_meta_inputs'=>array(
70 70
 					$pdf_payee_input_name => new EE_Text_Input(array(
71
-						'html_label_text' => sprintf( esc_html__( 'Payee Name %s', 'event_espresso' ), $this->get_help_tab_link())
71
+						'html_label_text' => sprintf(esc_html__('Payee Name %s', 'event_espresso'), $this->get_help_tab_link())
72 72
 					)),
73 73
 					'pdf_payee_email' => new EE_Email_Input(array(
74
-						'html_label_text' => sprintf( esc_html__( 'Payee Email %s', 'event_espresso' ), $this->get_help_tab_link()),
74
+						'html_label_text' => sprintf(esc_html__('Payee Email %s', 'event_espresso'), $this->get_help_tab_link()),
75 75
 					)),
76 76
 					'pdf_payee_tax_number' => new EE_Text_Input(array(
77
-						'html_label_text' => sprintf( esc_html__( 'Payee Tax Number %s', 'event_espresso' ), $this->get_help_tab_link()),
77
+						'html_label_text' => sprintf(esc_html__('Payee Tax Number %s', 'event_espresso'), $this->get_help_tab_link()),
78 78
 						)),
79
-					'pdf_payee_address' => new EE_Text_Area_Input( array(
80
-						'html_label_text' => sprintf( esc_html__( 'Payee Address %s', 'event_espresso' ), $this->get_help_tab_link() ),
81
-						'validation_strategies' => array( new EE_Full_HTML_Validation_Strategy() ),
79
+					'pdf_payee_address' => new EE_Text_Area_Input(array(
80
+						'html_label_text' => sprintf(esc_html__('Payee Address %s', 'event_espresso'), $this->get_help_tab_link()),
81
+						'validation_strategies' => array(new EE_Full_HTML_Validation_Strategy()),
82 82
 					)),
83 83
 					'pdf_instructions'=>new EE_Text_Area_Input(array(
84
-						'html_label_text'=>  sprintf( esc_html__("Instructions %s", "event_espresso"),  $this->get_help_tab_link()),
84
+						'html_label_text'=>  sprintf(esc_html__("Instructions %s", "event_espresso"), $this->get_help_tab_link()),
85 85
 						'default'=>  esc_html__("Please send this invoice with payment attached to the address above, or use the payment link below. Payment must be received within 48 hours of event date.", 'event_espresso'),
86
-						'validation_strategies' => array( new EE_Full_HTML_Validation_Strategy() ),
86
+						'validation_strategies' => array(new EE_Full_HTML_Validation_Strategy()),
87 87
 					)),
88 88
 					'pdf_logo_image'=>new EE_Admin_File_Uploader_Input(array(
89
-						'html_label_text'=>  sprintf( esc_html__("Logo Image %s", "event_espresso"),  $this->get_help_tab_link()),
89
+						'html_label_text'=>  sprintf(esc_html__("Logo Image %s", "event_espresso"), $this->get_help_tab_link()),
90 90
 						'default'=>  EE_Config::instance()->organization->logo_url,
91 91
 						'html_help_text'=>  esc_html__("(Logo for the top left of the invoice)", 'event_espresso'),
92 92
 					)),
93 93
 					$confirmation_text_input_name =>new EE_Text_Area_Input(array(
94
-						'html_label_text'=>  sprintf( esc_html__("Confirmation Text %s", "event_espresso"),  $this->get_help_tab_link()),
94
+						'html_label_text'=>  sprintf(esc_html__("Confirmation Text %s", "event_espresso"), $this->get_help_tab_link()),
95 95
 						'default'=>  esc_html__("Payment must be received within 48 hours of event date. Details about where to send the payment are included on the invoice.", 'event_espresso'), 
96
-						'validation_strategies' => array( new EE_Full_HTML_Validation_Strategy() ),
96
+						'validation_strategies' => array(new EE_Full_HTML_Validation_Strategy()),
97 97
 					)),
98 98
 					'page_extra_info'=>new EE_Text_Area_Input(array(
99
-						'html_label_text'=>  sprintf( esc_html__("Extra Info %s", "event_espresso"),  $this->get_help_tab_link()),
100
-						'validation_strategies' => array( new EE_Full_HTML_Validation_Strategy() ),
99
+						'html_label_text'=>  sprintf(esc_html__("Extra Info %s", "event_espresso"), $this->get_help_tab_link()),
100
+						'validation_strategies' => array(new EE_Full_HTML_Validation_Strategy()),
101 101
 					)),
102 102
 				),
103 103
 				'include'=>array(
104
-					'PMD_ID', 'PMD_name','PMD_desc','PMD_admin_name','PMD_admin_desc', 'PMD_type','PMD_slug', 'PMD_open_by_default','PMD_button_url','PMD_scope','Currency','PMD_order',
105
-					$pdf_payee_input_name, 'pdf_payee_email', 'pdf_payee_tax_number', 'pdf_payee_address', 'pdf_instructions','pdf_logo_image',
104
+					'PMD_ID', 'PMD_name', 'PMD_desc', 'PMD_admin_name', 'PMD_admin_desc', 'PMD_type', 'PMD_slug', 'PMD_open_by_default', 'PMD_button_url', 'PMD_scope', 'Currency', 'PMD_order',
105
+					$pdf_payee_input_name, 'pdf_payee_email', 'pdf_payee_tax_number', 'pdf_payee_address', 'pdf_instructions', 'pdf_logo_image',
106 106
 					$confirmation_text_input_name, 'page_extra_info'),
107 107
 			));
108 108
 		$form->add_subsections(
109
-			array( 'header1' => new EE_Form_Section_HTML_From_Template( 'payment_methods/Invoice/templates/invoice_settings_header_display.template.php' )),
109
+			array('header1' => new EE_Form_Section_HTML_From_Template('payment_methods/Invoice/templates/invoice_settings_header_display.template.php')),
110 110
 			$pdf_payee_input_name
111 111
 		);
112 112
 		$form->add_subsections(
113
-			array( 'header2'=>new EE_Form_Section_HTML_From_Template( 'payment_methods/Invoice/templates/invoice_settings_header_gateway.template.php' )),
113
+			array('header2'=>new EE_Form_Section_HTML_From_Template('payment_methods/Invoice/templates/invoice_settings_header_gateway.template.php')),
114 114
 			$confirmation_text_input_name
115 115
 		);
116 116
 		return $form;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 * @see EE_PMT_Base::help_tabs_config()
124 124
 	 * @return array
125 125
 	 */
126
-	public function help_tabs_config(){
126
+	public function help_tabs_config() {
127 127
 		return array(
128 128
 			$this->get_help_tab_name() => array(
129 129
 				'title' => esc_html__('Invoice Settings', 'event_espresso'),
@@ -141,16 +141,16 @@  discard block
 block discarded – undo
141 141
 	 * @param \EE_Payment $payment
142 142
 	 * @return string
143 143
 	 */
144
-	public function payment_overview_content( EE_Payment $payment ){
144
+	public function payment_overview_content(EE_Payment $payment) {
145 145
 		return EEH_Template::locate_template(
146
-			'payment_methods' . DS . 'Invoice'. DS . 'templates'.DS.'invoice_payment_details_content.template.php',
146
+			'payment_methods'.DS.'Invoice'.DS.'templates'.DS.'invoice_payment_details_content.template.php',
147 147
 			array_merge(
148 148
 				array(
149 149
 					'payment_method'			=> $this->_pm_instance,
150 150
 					'payment'						=> $payment,
151 151
 					'page_confirmation_text'					=> '',
152 152
 					'page_extra_info'	=> '',
153
-					'invoice_url' 					=> $payment->transaction()->primary_registration()->invoice_url( 'html' )
153
+					'invoice_url' 					=> $payment->transaction()->primary_registration()->invoice_url('html')
154 154
 				),
155 155
 				$this->_pm_instance->all_extra_meta_array()
156 156
 			)
Please login to merge, or discard this patch.