PluginProbe
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce / 1.3.13
ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce v1.3.13
1.17.9 1.17.8 1.17.7 1.17.6 1.17.5 1.17.4 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.3.0 1.3.1 1.3.11 1.3.12 1.3.13 1.3.14 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 All 143 releases
erp / modules / accounting / includes / functions-html.php

functions-html.php in ERP: Complete HR, Accounting & CRM Suite Built for WooCommerce 1.3.13, at modules/accounting/includes/functions-html.php

58 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Showing accounting wp error message
4 *
5 * @since 1.1.7
6 *
7 * @return void
8 */
9 function erp_ac_view_error_message() {
10 $messages = isset( $_REQUEST['message'] ) && isset( $_REQUEST['message']['errors'] ) ? $_REQUEST['message']['errors'] : array();
11
12 foreach( $messages as $key => $error ) { ?>
13 <div id="message" class="error notice notice-success is-dismissible">
14 <p><?php echo reset( $error ); ?></p>
15 <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e( 'Dismiss this notice.', 'erp'); ?></span></button>
16 </div>
17 <?php }
18 }
19
20 /**
21 * Report filter form
22 *
23 * @since 1.1.7
24 *
25 * @return void
26 */
27 function erp_ac_report_filter_form($start = true, $end = true) {
28 $start = $start ? erp_format_date( date( 'Y-m-d', strtotime( erp_financial_start_date() ) ) ) : false;
29 $end = $end ? erp_format_date( date( 'Y-m-d', strtotime( erp_financial_end_date() ) ) ) : false;
30 echo '<form class="erp-ac-report-filter-form" action="" method="post">';
31
32 if ( $start ) {
33 erp_html_form_input( array(
34 'name' => 'start',
35 'type' => 'text',
36 'class' => 'erp-date-picker-from',
37 'placeholder' => __( 'Form', 'erp' ),
38 'value' => isset( $_GET['start'] ) ? $_GET['start'] : $start
39 ) );
40 }
41
42 if ( $end ) {
43 erp_html_form_input( array(
44 'name' => 'end',
45 'type' => 'text',
46 'class' => 'erp-date-picker-to',
47 'placeholder' => __( 'To', 'erp' ),
48 'value' => isset( $_GET['end'] ) ? $_GET['end'] : $end
49 ) );
50 }
51
52 wp_nonce_field('erp_ac_nonce_report');
53
54 submit_button( __( 'Filter', 'erp' ), 'secondary', 'erp_ac_report_filter', false );
55
56 echo '</form>';
57 }
58