| @@ -11,19 +11,43 @@ | ||
| 11 | 11 | ) |
| 12 | 12 | ); |
| 13 | 13 | ?> |
| 14 | 14 | <div class="wrap"> |
| 15 | - <?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?> | |
| 15 | + <?php require FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php'; ?> | |
| 16 | 16 | |
| 17 | 17 | <h2 class="frm-h2"><?php esc_html_e( 'Import', 'formidable' ); ?></h2> |
| 18 | - <p class="howto"><?php echo esc_html( apply_filters( 'frm_upload_instructions1', __( 'Upload your Formidable XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' ) ) ); ?></p> | |
| 18 | + <p class="howto"> | |
| 19 | + <?php | |
| 20 | + if ( FrmAppHelper::is_formidable_branding() ) { | |
| 21 | + $page_description = esc_html__( 'Upload your Formidable XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' ); | |
| 22 | + } else { | |
| 23 | + $page_description = sprintf( | |
| 24 | + // Translators: 1: Menu name | |
| 25 | + esc_html__( 'Upload your %1$s XML file to import forms into this site. If your imported form key and creation date match a form on your site, that form will be updated.', 'formidable' ), | |
| 26 | + FrmAppHelper::get_menu_name() | |
| 27 | + ); | |
| 28 | + } | |
| 29 | + echo esc_html( apply_filters( 'frm_upload_instructions1', $page_description ) ); | |
| 30 | + ?> | |
| 31 | + </p> | |
| 19 | 32 | <br/> |
| 20 | 33 | <form enctype="multipart/form-data" method="post" class="frm-fields"> |
| 21 | 34 | <input type="hidden" name="frm_action" value="import_xml" /> |
| 22 | 35 | <?php wp_nonce_field( 'import-xml-nonce', 'import-xml' ); ?> |
| 23 | 36 | <p> |
| 24 | - <label> | |
| 25 | - <?php echo esc_html( apply_filters( 'frm_upload_instructions2', __( 'Choose a Formidable XML file', 'formidable' ) ) ); ?> | |
| 37 | + <label for="frm_import_file"> | |
| 38 | + <?php | |
| 39 | + if ( FrmAppHelper::is_formidable_branding() ) { | |
| 40 | + $file_section_title = esc_html__( 'Choose a Formidable XML file', 'formidable' ); | |
| 41 | + } else { | |
| 42 | + $file_section_title = sprintf( | |
| 43 | + // Translators: 1: Menu name | |
| 44 | + esc_html__( 'Choose a %1$s XML file', 'formidable' ), | |
| 45 | + FrmAppHelper::get_menu_name() | |
| 46 | + ); | |
| 47 | + } | |
| 48 | + echo esc_html( apply_filters( 'frm_upload_instructions2', $file_section_title ) ); | |
| 49 | + ?> | |
| 26 | 50 | (<?php |
| 27 | 51 | /* translators: %s: File size */ |
| 28 | 52 | echo esc_html( sprintf( __( 'Maximum size: %s', 'formidable' ), ini_get( 'upload_max_filesize' ) ) ); |
| 29 | 53 | ?>) |
| @@ -28,9 +52,9 @@ | ||
| 28 | 52 | echo esc_html( sprintf( __( 'Maximum size: %s', 'formidable' ), ini_get( 'upload_max_filesize' ) ) ); |
| 29 | 53 | ?>) |
| 30 | 54 | </label> |
| 31 | 55 | <br/> |
| 32 | - <input type="file" name="frm_import_file" size="25" /> | |
| 56 | + <input id="frm_import_file" type="file" name="frm_import_file" size="25" accept="<?php echo esc_attr( implode( ', ', FrmXMLHelper::get_supported_upload_file_types() ) ); ?>" /> | |
| 33 | 57 | </p> |
| 34 | 58 | |
| 35 | 59 | <?php do_action( 'frm_csv_opts', $forms ); ?> |
| 36 | 60 | |
| @@ -52,9 +76,9 @@ | ||
| 52 | 76 | <?php wp_nonce_field( 'export-xml-nonce', 'export-xml' ); ?> |
| 53 | 77 | |
| 54 | 78 | <p class="frm4 frm_form_field"> |
| 55 | 79 | <label for="format"><?php esc_html_e( 'Export Format', 'formidable' ); ?></label> |
| 56 | - <select name="format"> | |
| 80 | + <select id="format" name="format"> | |
| 57 | 81 | <?php foreach ( $export_format as $t => $type ) { ?> |
| 58 | 82 | <option value="<?php echo esc_attr( $t ); ?>" data-support="<?php echo esc_attr( $type['support'] ); ?>" <?php echo isset( $type['count'] ) ? 'data-count="' . esc_attr( $type['count'] ) . '"' : ''; ?>> |
| 59 | 83 | <?php echo esc_html( isset( $type['name'] ) ? $type['name'] : $t ); ?> |
| 60 | 84 | </option> |
| @@ -62,12 +86,12 @@ | ||
| 62 | 86 | </select> |
| 63 | 87 | </p> |
| 64 | 88 | |
| 65 | 89 | <p class="frm_hidden csv_opts export-filters frm4 frm_form_field"> |
| 66 | - <label for="csv_format" class="frm_help" title="<?php esc_attr_e( 'If your CSV special characters are not working correctly, try a different formatting option.', 'formidable' ); ?>"> | |
| 90 | + <label for="frm_csv_format" class="frm_help" title="<?php esc_attr_e( 'If your CSV special characters are not working correctly, try a different formatting option.', 'formidable' ); ?>"> | |
| 67 | 91 | <?php esc_html_e( 'CSV Encoding Format', 'formidable' ); ?> |
| 68 | 92 | </label> |
| 69 | - <select name="csv_format"> | |
| 93 | + <select id="frm_csv_format" name="csv_format"> | |
| 70 | 94 | <?php foreach ( FrmCSVExportHelper::csv_format_options() as $format ) { ?> |
| 71 | 95 | <option value="<?php echo esc_attr( $format ); ?>"> |
| 72 | 96 | <?php echo esc_html( $format ); ?> |
| 73 | 97 | </option> |
| @@ -75,9 +99,9 @@ | ||
| 75 | 99 | </select> |
| 76 | 100 | </p> |
| 77 | 101 | |
| 78 | 102 | <p class="frm_hidden csv_opts export-filters frm4 frm_form_field"> |
| 79 | - <label for="csv_col_sep"> | |
| 103 | + <label for="frm_csv_col_sep"> | |
| 80 | 104 | <?php esc_html_e( 'Column Separation', 'formidable' ); ?> |
| 81 | 105 | </label> |
| 82 | 106 | <input id="frm_csv_col_sep" name="csv_col_sep" value="," type="text" /> |
| 83 | 107 | </p> |
| @@ -84,9 +108,9 @@ | ||
| 84 | 108 | |
| 85 | 109 | <p id="frm_csv_data_export" class="xml_opts"> |
| 86 | 110 | <label><?php esc_html_e( 'Include the following in the export file', 'formidable' ); ?></label> |
| 87 | 111 | <?php foreach ( $export_types as $t => $type ) { ?> |
| 88 | - <label class="frm_inline_label"> | |
| 112 | + <label class="frm_inline_label frm-export-xml-<?php echo esc_attr( $t ); ?>"> | |
| 89 | 113 | <input type="checkbox" name="type[]" value="<?php echo esc_attr( $t ); ?>"/> |
| 90 | 114 | <?php echo esc_html( $type ); ?> |
| 91 | 115 | </label> |
| 92 | 116 | <?php } ?> |
| @@ -132,9 +156,9 @@ | ||
| 132 | 156 | <input type="checkbox" name="frm_export_forms[]" value="<?php echo esc_attr( $form->id ); ?>" id="export_form_<?php echo esc_attr( $form->id ); ?>" /> |
| 133 | 157 | </td> |
| 134 | 158 | <td> |
| 135 | 159 | <label for="export_form_<?php echo esc_attr( $form->id ); ?>"> |
| 136 | - <?php echo esc_html( '' === $form->name ? __( '(no title)', 'formidable' ) : $form->name ); ?> | |
| 160 | + <?php echo esc_html( '' === $form->name ? FrmFormsHelper::get_no_title_text() : $form->name ); ?> | |
| 137 | 161 | </label> |
| 138 | 162 | </td> |
| 139 | 163 | <td> |
| 140 | 164 | <?php echo esc_html( $form->id ); ?> / <?php echo esc_html( $form->form_key ); ?> |
| @@ -171,9 +195,11 @@ | ||
| 171 | 195 | } |
| 172 | 196 | ?> |
| 173 | 197 | </td> |
| 174 | 198 | </tr> |
| 175 | - <?php } ?> | |
| 199 | + <?php | |
| 200 | + }//end foreach | |
| 201 | + ?> | |
| 176 | 202 | </tbody> |
| 177 | 203 | </table> |
| 178 | 204 | </div> |
| 179 | 205 | </div> |