| @@ -35,227 +35,211 @@ | ||
| 35 | 35 | $table = $wpdb->prefix.'wpbot_response'; |
| 36 | 36 | $data = $wpdb->get_row($wpdb->prepare("select * from {$table} where id = %d", $id)); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, PluginCheck.Security.DirectDB.UnescapedDBParameter |
| 37 | 37 | } |
| 38 | 38 | ?> |
| 39 | +<div class="wpbot-str-page"> | |
| 39 | 40 | <div class="qcld-wp-chatbot-wrap-header"> |
| 40 | - | |
| 41 | - <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> | |
| 42 | - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> | |
| 41 | + <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="<?php esc_attr_e( 'WPBot', 'chatbot' ); ?>"> WPBot Control Panel </a> | |
| 42 | + <p><strong><?php esc_html_e( 'Core Version:', 'chatbot' ); ?></strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> | |
| 43 | 43 | </div> |
| 44 | 44 | <ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
| 45 | 45 | <li> |
| 46 | - <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> | |
| 47 | - | |
| 46 | + <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank"><?php esc_html_e( 'Upgrade To Pro', 'chatbot' ); ?></a> | |
| 48 | 47 | </li> |
| 49 | 48 | </ul> |
| 50 | 49 | </div> |
| 51 | -<div class="TextResponsesoutside"> | |
| 52 | - <div class="qcwrap TextResponses"> | |
| 53 | - <div class="wp-chatbot-wrap"> | |
| 54 | - <div class="wpbot_dashboard_header "><h1><?php echo ($hasEdit?'Edit':'Add') ?> Response</h1></div> | |
| 55 | - <form method="post" action=""> | |
| 56 | - <div class="wpbot_addons_section "> | |
| 57 | - <div class="wpbot_single_addon_wrapper2"> | |
| 58 | - <p><b><?php esc_html_e('Please note the following ', 'chatbot'); ?></b></p> | |
| 59 | - <ul> | |
| 60 | - <li> <?php esc_html_e('1. The Query, Response and Keywords fields will be searched. Add Keywords for best matches', 'chatbot'); ?></li> | |
| 61 | - <li> <?php esc_html_e('2. Please clear browser Cache and Cookies both before testing new responses', 'chatbot'); ?></li> | |
| 62 | - </ul> | |
| 63 | - <table class="form-table-str form-table"> | |
| 64 | - <tbody> | |
| 65 | - <tr valign="top"> | |
| 66 | - <th scope="row"><?php esc_html_e('Query', 'chatbot'); ?></th> | |
| 67 | - <td> | |
| 68 | - <input name="str_nonce" type="hidden" value="<?php echo sanitize_key( wp_create_nonce('str-nonce') ); ?>" /> | |
| 69 | - <input type="text" name="qc_bot_str_query" value="<?php echo esc_attr($hasEdit?$data->query:''); ?>" style="width: 100%;" required /> | |
| 70 | - <br><i><?php esc_html_e('*Required. Add the query here. ', 'chatbot'); ?></i> | |
| 71 | - </td> | |
| 72 | - </tr> | |
| 73 | - | |
| 74 | - <tr valign="top"> | |
| 75 | - <th scope="row"> <?php esc_html_e('Response', 'chatbot'); ?></th> | |
| 76 | - <td> | |
| 77 | - <?php | |
| 78 | - | |
| 79 | - $content = ($hasEdit?$data->response:''); | |
| 80 | - $editor_id = 'qc_bot_str_response'; | |
| 81 | - $settings = array( ); | |
| 82 | - | |
| 83 | - wp_editor( $content, $editor_id, $settings ); | |
| 84 | - | |
| 85 | - ?> | |
| 86 | - <br><i><?php esc_html_e('*Required. Add the response here. ', 'chatbot'); ?></i> | |
| 87 | - </td> | |
| 88 | - </tr> | |
| 89 | - <tr valign="top"> | |
| 90 | - <th scope="row">Keyword</th> | |
| 91 | - <td> | |
| 92 | - <input type="text" name="qc_bot_str_keyword" value="<?php echo esc_attr($hasEdit?$data->keyword:''); ?>" style="width: 100%;" /> | |
| 93 | - <br><i> <?php esc_html_e('Optional. Add multiple keyword or phrases as comma(,) seperated value. It will help to find the best match result.', 'chatbot'); ?></i> | |
| 94 | - </td> | |
| 95 | - </tr> | |
| 96 | - | |
| 97 | - | |
| 98 | - <?php if($hasEdit): ?> | |
| 99 | 50 | |
| 100 | - <input type="hidden" name="qc_bot_str_id" value="<?php echo esc_attr($data->id); ?>" /> | |
| 51 | +<div class="wpbot-str-main"> | |
| 52 | + <div class="wpbot-str-hero"> | |
| 53 | + <div class="wpbot-str-hero-copy"> | |
| 54 | + <h1><?php echo $hasEdit ? esc_html__( 'Edit Response', 'chatbot' ) : esc_html__( 'Add Response', 'chatbot' ); ?></h1> | |
| 55 | + <p><?php esc_html_e( 'Query, response, and keywords are all searched. Add keywords so the best match is easier to find.', 'chatbot' ); ?></p> | |
| 56 | + </div> | |
| 57 | + <a class="wpbot-str-btn" href="<?php echo esc_url( admin_url( 'admin.php?page=simple-text-response' ) ); ?>"><?php esc_html_e( 'Back to responses', 'chatbot' ); ?></a> | |
| 58 | + </div> | |
| 101 | 59 | |
| 102 | - <?php endif; ?> | |
| 103 | - </tbody> | |
| 104 | - </table> | |
| 60 | + <div class="wpbot-str-card"> | |
| 61 | + <div class="wpbot-str-callout"> | |
| 62 | + <p><?php esc_html_e( 'Clear browser cache and cookies before testing a new response.', 'chatbot' ); ?></p> | |
| 63 | + </div> | |
| 64 | + <form method="post" action=""> | |
| 65 | + <input name="str_nonce" type="hidden" value="<?php echo esc_attr( sanitize_key( wp_create_nonce( 'str-nonce' ) ) ); ?>" /> | |
| 66 | + <?php if ( $hasEdit ) : ?> | |
| 67 | + <input type="hidden" name="qc_bot_str_id" value="<?php echo esc_attr( $data->id ); ?>" /> | |
| 68 | + <?php endif; ?> | |
| 69 | + | |
| 70 | + <div class="wpbot-str-field"> | |
| 71 | + <span class="wpbot-str-label"><?php esc_html_e( 'Query', 'chatbot' ); ?></span> | |
| 72 | + <div> | |
| 73 | + <input class="wpbot-str-input" type="text" name="qc_bot_str_query" value="<?php echo esc_attr( $hasEdit ? $data->query : '' ); ?>" required /> | |
| 74 | + <p class="wpbot-str-hint"><?php esc_html_e( 'Required. Add the question or phrase a visitor might ask.', 'chatbot' ); ?></p> | |
| 75 | + </div> | |
| 105 | 76 | </div> |
| 106 | - <footer class="wp-chatbot-admin-footer"> | |
| 107 | - <div class="row"> | |
| 108 | - <div class="text-left col-sm-3 col-sm-offset-3"> | |
| 109 | - | |
| 110 | - </div> | |
| 111 | - <div class="text-right col-sm-6"> | |
| 112 | - <input type="submit" class="button button-primary" name="submit" id="submit" value="Save Settings"> | |
| 113 | - </div> | |
| 77 | + | |
| 78 | + <div class="wpbot-str-field wpbot-str-field-editor"> | |
| 79 | + <span class="wpbot-str-label"><?php esc_html_e( 'Response', 'chatbot' ); ?></span> | |
| 80 | + <div> | |
| 81 | + <?php | |
| 82 | + $content = ( $hasEdit ? $data->response : '' ); | |
| 83 | + $editor_id = 'qc_bot_str_response'; | |
| 84 | + wp_editor( $content, $editor_id, array() ); | |
| 85 | + ?> | |
| 86 | + <p class="wpbot-str-hint"><?php esc_html_e( 'Required. Add the reply the chatbot should send.', 'chatbot' ); ?></p> | |
| 114 | 87 | </div> |
| 115 | - <!-- row--> | |
| 116 | - </footer> | |
| 117 | - </div></form> | |
| 118 | 88 | </div> |
| 119 | - </div> | |
| 120 | - </div> | |
| 89 | + | |
| 90 | + <div class="wpbot-str-field"> | |
| 91 | + <span class="wpbot-str-label"><?php esc_html_e( 'Keyword', 'chatbot' ); ?></span> | |
| 92 | + <div> | |
| 93 | + <input class="wpbot-str-input" type="text" name="qc_bot_str_keyword" value="<?php echo esc_attr( $hasEdit ? $data->keyword : '' ); ?>" /> | |
| 94 | + <p class="wpbot-str-hint"><?php esc_html_e( 'Optional. Add multiple keywords or phrases, separated by commas, to improve matching.', 'chatbot' ); ?></p> | |
| 95 | + </div> | |
| 96 | + </div> | |
| 97 | + | |
| 98 | + <div class="wpbot-str-form-actions"> | |
| 99 | + <a class="wpbot-str-btn" href="<?php echo esc_url( admin_url( 'admin.php?page=simple-text-response' ) ); ?>"><?php esc_html_e( 'Cancel', 'chatbot' ); ?></a> | |
| 100 | + <button type="submit" class="wpbot-str-btn wpbot-str-btn-primary" name="submit"><?php esc_html_e( 'Save Response', 'chatbot' ); ?></button> | |
| 101 | + </div> | |
| 102 | + </form> | |
| 103 | + </div> | |
| 104 | +</div> | |
| 105 | +</div> | |
| 121 | 106 | <?php endif; ?> |
| 122 | 107 | |
| 123 | 108 | |
| 124 | 109 | <?php else: ?> |
| 125 | 110 | |
| 111 | +<div class="wpbot-str-page"> | |
| 126 | 112 | <div class="qcld-wp-chatbot-wrap-header"> |
| 127 | - | |
| 128 | - <a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="Dialogflow CX"> WPBot Control Panel </a> | |
| 129 | - <p><strong>Core Version:</strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> | |
| 113 | + <div class="qcld-wp-chatbot-wrap-header-logo"><a href="#" class="qcld-wp-chatbot-wrap-site__logo"><img src="<?php echo esc_url( QCLD_wpCHATBOT_IMG_URL . '/chatbot.png' ); ?>" alt="<?php esc_attr_e( 'WPBot', 'chatbot' ); ?>"> WPBot Control Panel </a> | |
| 114 | + <p><strong><?php esc_html_e( 'Core Version:', 'chatbot' ); ?></strong> v<?php echo esc_html( QCLD_wpCHATBOT_VERSION ); ?></p> | |
| 115 | + </div> | |
| 130 | 116 | <ul class="qcld-wp-chatbot-wrap-version-wrapper"> |
| 131 | 117 | <li> |
| 132 | - <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank">Upgrade To Pro</a> | |
| 133 | - | |
| 118 | + <a class="wpchatbot-Upgrade" href="https://www.wpbot.pro/" target="_blank"><?php esc_html_e( 'Upgrade To Pro', 'chatbot' ); ?></a> | |
| 134 | 119 | </li> |
| 135 | 120 | </ul> |
| 136 | 121 | </div> |
| 137 | 122 | |
| 138 | -<div class="qcld-wp-chatbot-wrap-header_inn"> | |
| 139 | -<div class="qcld-wp-chatbot-wrap-header_inn_heading"> | |
| 140 | - <h1 class="wp-heading-inline"><?php esc_html_e('Simple Text Responses', 'chatbot'); ?></h1> | |
| 141 | - <a style="visibility: hidden;" href="<?php echo esc_url( add_query_arg( 'action', 'edit', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Add New', 'chatbot'); ?></a> | |
| 142 | - </div> | |
| 143 | - <?php if(class_exists('Qcld_str_pro')): ?> | |
| 144 | - | |
| 145 | - <a href="<?php echo esc_url( add_query_arg( 'action', 'manage-categories', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Manage Categories', 'chatbot'); ?></a> | |
| 146 | - <a href="<?php echo esc_url( admin_url( 'admin-post.php?action=qc_str_export' ) ); ?>" class="button page-title-action"><?php esc_html_e('Export', 'chatbot'); ?></a> | |
| 147 | - <a href="<?php echo esc_url( add_query_arg( 'action', 'import', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action"><?php esc_html_e('Import', 'chatbot'); ?></a> | |
| 148 | - </div> | |
| 149 | - <?php endif; ?> | |
| 150 | - <div class="TextResponsesouter"> | |
| 151 | - <div class="wrap TextResponses"> | |
| 123 | +<div class="wpbot-str-main"> | |
| 124 | + <div class="wpbot-str-hero"> | |
| 125 | + <div class="wpbot-str-hero-copy"> | |
| 126 | + <h1><?php esc_html_e( 'Simple Text Responses', 'chatbot' ); ?></h1> | |
| 127 | + <p><?php esc_html_e( 'Create simple text responses and the ChatBot will use an advanced search algorithm to answer user questions. This is a simpler alternative to OpenAI or DialogFlow.', 'chatbot' ); ?></p> | |
| 128 | + <span class="wpbot-str-note"><?php esc_html_e( 'Requires MySQL client version 5.6+', 'chatbot' ); ?></span> | |
| 129 | + </div> | |
| 130 | + <?php if ( class_exists( 'Qcld_str_pro' ) ) : ?> | |
| 131 | + <div class="wpbot-str-hero-actions"> | |
| 132 | + <a href="<?php echo esc_url( add_query_arg( 'action', 'manage-categories', admin_url( 'admin.php?page=simple-text-response' ) ) ); ?>" class="wpbot-str-btn"><?php esc_html_e( 'Manage Categories', 'chatbot' ); ?></a> | |
| 133 | + <a href="<?php echo esc_url( admin_url( 'admin-post.php?action=qc_str_export' ) ); ?>" class="wpbot-str-btn"><?php esc_html_e( 'Export', 'chatbot' ); ?></a> | |
| 134 | + <a href="<?php echo esc_url( add_query_arg( 'action', 'import', admin_url( 'admin.php?page=simple-text-response' ) ) ); ?>" class="wpbot-str-btn"><?php esc_html_e( 'Import', 'chatbot' ); ?></a> | |
| 135 | + </div> | |
| 136 | + <?php endif; ?> | |
| 137 | + </div> | |
| 152 | 138 | |
| 153 | -<div id="qcld-show-more-wrapper-box"> | |
| 154 | -<div class="qcld-show-more-text qcld-show-more-show-more-height"> | |
| 139 | + <div class="wpbot-str-card"> | |
| 140 | + <div class="wpbot-str-card-head"> | |
| 141 | + <div> | |
| 142 | + <h2><?php esc_html_e( 'Search settings', 'chatbot' ); ?></h2> | |
| 143 | + <p><?php esc_html_e( 'Tune how closely a visitor’s phrase must match, and which fields are searched.', 'chatbot' ); ?></p> | |
| 144 | + </div> | |
| 145 | + </div> | |
| 155 | 146 | |
| 156 | - <div class="wrapTexttop"> | |
| 157 | - <p><?php esc_html_e('Create simple text responses and the ChatBot will use advanced search algorithm to answer user questions. This is a simpler alternative to OpenAI or DialogFlow.', 'chatbot'); ?><br> | |
| 158 | - <b><?php esc_html_e('NB: Simple Text Responses require mySQL Client version 5.6+', 'chatbot'); ?></b></p> | |
| 159 | - </div> | |
| 160 | - <form method="post" action=""> | |
| 161 | - <table class="form-table-str form-table"> | |
| 162 | - <tbody> | |
| 163 | - <tr valign="top"> | |
| 164 | - <th scope="row"><?php esc_html_e('Phrase matching accuracy', 'chatbot'); ?></th> | |
| 165 | - <td> | |
| 166 | - <input name="str_nonce" type="hidden" value="<?php echo sanitize_key( wp_create_nonce('str-nonce') ); ?>" /> | |
| 167 | - <input type="text" name="qc_bot_str_weight" value="<?php echo esc_attr( !empty(get_option('qc_bot_str_weight')) ? get_option('qc_bot_str_weight') : '0.4' ); ?>" style="width: 100%;" required /> | |
| 168 | - <br><i><?php esc_html_e('Please enter a value between 0 to 1. Higher value means more exact matching of phrases.', 'chatbot'); ?></i> | |
| 169 | - </td> | |
| 170 | - </tr> | |
| 171 | - <tr valign="top"> | |
| 172 | - <th scope="row"><?php esc_html_e('Search Fields', 'chatbot'); ?></th> | |
| 173 | - <td> | |
| 174 | - <?php | |
| 175 | - $fields = get_option('qc_bot_str_fields'); | |
| 176 | - ?> | |
| 177 | - | |
| 178 | - <label for="qc_bot_str_field_title"><?php esc_html_e('Title', 'chatbot'); ?></label> | |
| 179 | - <input id="qc_bot_str_field_title" type="checkbox" name="qc_bot_str_fields[]" value="query" <?php echo (!$fields?'checked="checked"':''); ?> <?php echo ($fields && in_array('query', $fields)?'checked="checked"':''); ?> /> | |
| 180 | - | |
| 181 | - <label for="qc_bot_str_field_keyword"><?php esc_html_e('Keyword', 'chatbot'); ?></label> | |
| 182 | - <input id="qc_bot_str_field_keyword" type="checkbox" name="qc_bot_str_fields[]" value="keyword" <?php echo (!$fields?'checked="checked"':''); ?> <?php echo ($fields && in_array('keyword', $fields)?'checked="checked"':''); ?> /> | |
| 183 | - | |
| 184 | - <label for="qc_bot_str_field_response"><?php esc_html_e('Response', 'chatbot'); ?></label> | |
| 185 | - <input id="qc_bot_str_field_response" type="checkbox" name="qc_bot_str_fields[]" value="response" <?php echo (!$fields?'checked="checked"':''); ?> <?php echo ($fields && in_array('response', $fields)?'checked="checked"':''); ?> /> | |
| 186 | - <br><i><?php esc_html_e('Please check/uncheck to allow/disallow searching in that fields', 'chatbot'); ?></i> | |
| 187 | - </td> | |
| 188 | - </tr> | |
| 189 | - <?php | |
| 190 | - $current_user = wp_get_current_user(); | |
| 191 | - if ( in_array( 'administrator', $current_user->roles )) { | |
| 192 | - ?> | |
| 193 | - <tr valign="top"> | |
| 194 | - <th scope="row"><?php echo esc_html( 'Allow Author & Editor to edit STR' ); ?></th> | |
| 195 | - <td> | |
| 196 | - <input id="qc_bot_str_allow_author_editor" type="checkbox" name="qc_bot_str_allow_author_editor" value="1" <?php echo ( get_option( 'qc_bot_str_allow_author_editor' ) && get_option( 'qc_bot_str_allow_author_editor' ) == 1 ? 'checked="checked"' : '' ); ?> /> | |
| 197 | - <label for="qc_bot_str_allow_author_editor"><?php echo esc_html( 'Allow Author & Editor to edit STR' ); ?></label> | |
| 198 | - <br><i><?php echo esc_html( 'Please enable to allow Author & Editor to edit STR.' ); ?></i> | |
| 199 | - </td> | |
| 200 | - </tr> | |
| 201 | - <?php } ?> | |
| 202 | - <tr valign="top"> | |
| 203 | - <th scope="row"></th> | |
| 204 | - <td> | |
| 205 | - <input type="submit" class="button button-primary" name="submit" id="submit" value="Save Settings"> | |
| 206 | - </td> | |
| 207 | - </tr> | |
| 208 | - </tbody> | |
| 209 | - </table> | |
| 210 | - </form> | |
| 211 | - <form method="post" action=""> | |
| 212 | - <table class="form-table-str form-table"> | |
| 213 | - <tbody> | |
| 214 | - <tr valign="top"> | |
| 215 | - <th scope="row"><?php esc_html_e('Re-Index STR', 'chatbot'); ?></th> | |
| 216 | - <td> | |
| 217 | - <input name="str_nonce" type="hidden" value="<?php echo sanitize_key( wp_create_nonce('str-nonce') ); ?>" /> | |
| 218 | - <input type="submit" class="button button-primary" name="qc-re-index" id="re-index" value="Re Index"> | |
| 219 | - | |
| 220 | - <i><?php esc_html_e('Re-Index if results are not as expected.', 'chatbot'); ?></i> | |
| 221 | - </td> | |
| 222 | - </tr> | |
| 223 | - </tbody> | |
| 224 | - </table> | |
| 225 | - </form> | |
| 147 | + <form method="post" action=""> | |
| 148 | + <input name="str_nonce" type="hidden" value="<?php echo esc_attr( sanitize_key( wp_create_nonce( 'str-nonce' ) ) ); ?>" /> | |
| 226 | 149 | |
| 150 | + <div class="wpbot-str-field"> | |
| 151 | + <span class="wpbot-str-label"><?php esc_html_e( 'Phrase matching accuracy', 'chatbot' ); ?></span> | |
| 152 | + <div> | |
| 153 | + <input class="wpbot-str-input wpbot-str-input-short" type="text" name="qc_bot_str_weight" value="<?php echo esc_attr( ! empty( get_option( 'qc_bot_str_weight' ) ) ? get_option( 'qc_bot_str_weight' ) : '0.4' ); ?>" required /> | |
| 154 | + <p class="wpbot-str-hint"><?php esc_html_e( 'Enter a value between 0 and 1. A higher value means phrases must match more exactly.', 'chatbot' ); ?></p> | |
| 155 | + </div> | |
| 156 | + </div> | |
| 227 | 157 | |
| 158 | + <div class="wpbot-str-field"> | |
| 159 | + <span class="wpbot-str-label"><?php esc_html_e( 'Search fields', 'chatbot' ); ?></span> | |
| 160 | + <div> | |
| 161 | + <?php $fields = get_option( 'qc_bot_str_fields' ); ?> | |
| 162 | + <div class="wpbot-str-checks"> | |
| 163 | + <label for="qc_bot_str_field_title"> | |
| 164 | + <input id="qc_bot_str_field_title" type="checkbox" name="qc_bot_str_fields[]" value="query" <?php echo ( ! $fields ? 'checked="checked"' : '' ); ?> <?php echo ( $fields && in_array( 'query', $fields, true ) ? 'checked="checked"' : '' ); ?> /> | |
| 165 | + <?php esc_html_e( 'Title', 'chatbot' ); ?> | |
| 166 | + </label> | |
| 167 | + <label for="qc_bot_str_field_keyword"> | |
| 168 | + <input id="qc_bot_str_field_keyword" type="checkbox" name="qc_bot_str_fields[]" value="keyword" <?php echo ( ! $fields ? 'checked="checked"' : '' ); ?> <?php echo ( $fields && in_array( 'keyword', $fields, true ) ? 'checked="checked"' : '' ); ?> /> | |
| 169 | + <?php esc_html_e( 'Keyword', 'chatbot' ); ?> | |
| 170 | + </label> | |
| 171 | + <label for="qc_bot_str_field_response"> | |
| 172 | + <input id="qc_bot_str_field_response" type="checkbox" name="qc_bot_str_fields[]" value="response" <?php echo ( ! $fields ? 'checked="checked"' : '' ); ?> <?php echo ( $fields && in_array( 'response', $fields, true ) ? 'checked="checked"' : '' ); ?> /> | |
| 173 | + <?php esc_html_e( 'Response', 'chatbot' ); ?> | |
| 174 | + </label> | |
| 175 | + </div> | |
| 176 | + <p class="wpbot-str-hint"><?php esc_html_e( 'Check a field to include it in search. Uncheck it to leave it out.', 'chatbot' ); ?></p> | |
| 177 | + </div> | |
| 178 | + </div> | |
| 228 | 179 | |
| 229 | - </div> | |
| 230 | - <div class="qcld-show-more-show-more"><div class="Expandmore">Expand for More Options<span>+</span></div></div> | |
| 231 | - </div> | |
| 180 | + <div class="wpbot-str-extra" hidden> | |
| 181 | + <?php | |
| 182 | + $current_user = wp_get_current_user(); | |
| 183 | + if ( in_array( 'administrator', $current_user->roles, true ) ) : | |
| 184 | + ?> | |
| 185 | + <div class="wpbot-str-field"> | |
| 186 | + <span class="wpbot-str-label"><?php esc_html_e( 'Editor access', 'chatbot' ); ?></span> | |
| 187 | + <div> | |
| 188 | + <div class="wpbot-str-checks"> | |
| 189 | + <label for="qc_bot_str_allow_author_editor"> | |
| 190 | + <input id="qc_bot_str_allow_author_editor" type="checkbox" name="qc_bot_str_allow_author_editor" value="1" <?php echo ( get_option( 'qc_bot_str_allow_author_editor' ) && get_option( 'qc_bot_str_allow_author_editor' ) == 1 ? 'checked="checked"' : '' ); ?> /> | |
| 191 | + <?php esc_html_e( 'Allow Author & Editor to edit STR', 'chatbot' ); ?> | |
| 192 | + </label> | |
| 193 | + </div> | |
| 194 | + <p class="wpbot-str-hint"><?php esc_html_e( 'Enable this so Authors and Editors can edit Simple Text Responses.', 'chatbot' ); ?></p> | |
| 195 | + </div> | |
| 196 | + </div> | |
| 197 | + <?php endif; ?> | |
| 232 | 198 | |
| 233 | - <div id="poststuff"> | |
| 234 | - <div id="post-body" class="metabox-holder"> | |
| 235 | - <div id="post-body-content-edit" class="str-form"> | |
| 236 | - <div class="meta-box-sortables ui-sortable"> | |
| 237 | - <form method="post"> | |
| 238 | - | |
| 239 | - <a href="<?php echo esc_url( add_query_arg( 'action', 'edit', admin_url('admin.php?page=simple-text-response') ) ); ?>" class="button page-title-action str-addnew"><?php esc_html_e('Add New', 'chatbot'); ?></a> | |
| 240 | - <?php | |
| 241 | - $this->response_list->prepare_items(); | |
| 242 | - $this->response_list->display(); ?> | |
| 243 | - </form> | |
| 244 | - </div> | |
| 245 | - </div> | |
| 246 | - </div> | |
| 247 | - | |
| 248 | - </div> | |
| 249 | - </div> | |
| 199 | + <div class="wpbot-str-form-actions"> | |
| 200 | + <button type="submit" class="wpbot-str-btn wpbot-str-btn-primary" name="submit"><?php esc_html_e( 'Save Settings', 'chatbot' ); ?></button> | |
| 201 | + </div> | |
| 202 | + </div> | |
| 203 | + </form> | |
| 204 | + | |
| 205 | + <form class="wpbot-str-reindex wpbot-str-extra" method="post" action="" hidden> | |
| 206 | + <input name="str_nonce" type="hidden" value="<?php echo esc_attr( sanitize_key( wp_create_nonce( 'str-nonce' ) ) ); ?>" /> | |
| 207 | + <div class="wpbot-str-reindex-copy"> | |
| 208 | + <strong><?php esc_html_e( 'Re-index responses', 'chatbot' ); ?></strong> | |
| 209 | + <p class="wpbot-str-hint"><?php esc_html_e( 'Run this if search results are not what you expect.', 'chatbot' ); ?></p> | |
| 210 | + </div> | |
| 211 | + <button type="submit" class="wpbot-str-btn" name="qc-re-index" id="re-index" value="1"><?php esc_html_e( 'Re-index', 'chatbot' ); ?></button> | |
| 212 | + </form> | |
| 213 | + | |
| 214 | + <button type="button" class="wpbot-str-expand" aria-expanded="false"> | |
| 215 | + <span class="wpbot-str-expand-label"><?php esc_html_e( 'Expand for More Options', 'chatbot' ); ?></span> | |
| 216 | + <span class="wpbot-str-expand-icon" aria-hidden="true">+</span> | |
| 217 | + </button> | |
| 250 | 218 | </div> |
| 219 | + | |
| 220 | + <div class="wpbot-str-card wpbot-str-list-card"> | |
| 221 | + <div class="wpbot-str-list-head"> | |
| 222 | + <div> | |
| 223 | + <h2><?php esc_html_e( 'Responses', 'chatbot' ); ?></h2> | |
| 224 | + <p><?php esc_html_e( 'Questions, keywords, and the replies your chatbot can send.', 'chatbot' ); ?></p> | |
| 225 | + </div> | |
| 226 | + <a href="<?php echo esc_url( add_query_arg( 'action', 'edit', admin_url( 'admin.php?page=simple-text-response' ) ) ); ?>" class="wpbot-str-btn wpbot-str-btn-primary"><?php esc_html_e( 'Add New', 'chatbot' ); ?></a> | |
| 227 | + </div> | |
| 228 | + <form method="post"> | |
| 229 | + <?php | |
| 230 | + $this->response_list->prepare_items(); | |
| 231 | + $this->response_list->display(); | |
| 232 | + ?> | |
| 233 | + </form> | |
| 234 | + </div> | |
| 235 | +</div> | |
| 236 | +</div> | |
| 251 | 237 | <?php endif; ?> |
| 252 | 238 | |
| 253 | - | |
| 254 | - | |
| 255 | 239 | <style> |
| 256 | -/* WPBot design tokens — change colors here to theme the whole admin UI */ | |
| 257 | -:root { | |
| 240 | +/* Scoped to Simple Text Responses. Tokens match the WPBot admin UI. */ | |
| 241 | +.wpbot-str-page { | |
| 258 | 242 | --woobot-primary: #5B4E96; |
| 259 | 243 | --woobot-primary-color: #5B4E96; |
| 260 | 244 | --woobot-primary-dark: #463a7a; |
| 261 | 245 | --woobot-primary-soft: #f3f1fa; |
| @@ -266,373 +250,587 @@ | ||
| 266 | 250 | --woobot-muted: #6b6680; |
| 267 | 251 | --woobot-danger: #e25563; |
| 268 | 252 | --woobot-nav-muted: #988FBD; |
| 269 | 253 | --woobot-primary-rgb: 91, 78, 150; |
| 254 | + display: block; | |
| 255 | + width: calc(100% - 20px); | |
| 256 | + max-width: calc(100% - 20px); | |
| 257 | + margin: 20px 20px 36px 0; | |
| 258 | + box-sizing: border-box; | |
| 259 | + font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; | |
| 260 | + color: var(--woobot-text); | |
| 261 | + font-size: 14px; | |
| 270 | 262 | } |
| 271 | 263 | |
| 272 | -body { | |
| 273 | - background-color: var(--woobot-page-bg); | |
| 274 | - font-family: "DM Sans", sans-serif !important; | |
| 275 | - font-optical-sizing: auto; | |
| 276 | - font-size: 16px; | |
| 277 | - font-weight: normal; | |
| 264 | +body.wpbot-panel_page_simple-text-response, | |
| 265 | +body.chatbot-wpbot-lite_page_simple-text-response, | |
| 266 | +body:has(.wpbot-str-page) { | |
| 267 | + background-color: #F5F7FD; | |
| 278 | 268 | } |
| 279 | -.qcld-wp-chatbot-wrap-header { | |
| 269 | + | |
| 270 | +body:has(.wpbot-str-page) .notice.qcbot-feedback, | |
| 271 | +body:has(.wpbot-str-page) .notice.qcbot-str-top-notic { | |
| 272 | + width: calc(100% - 20px) !important; | |
| 273 | + max-width: calc(100% - 20px) !important; | |
| 274 | + margin-left: 0 !important; | |
| 275 | + margin-right: 20px !important; | |
| 276 | + box-sizing: border-box; | |
| 277 | + float: none; | |
| 278 | +} | |
| 279 | + | |
| 280 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header { | |
| 280 | 281 | display: flex; |
| 281 | - column-gap: 15px; | |
| 282 | - row-gap: 10px; | |
| 282 | + align-items: center; | |
| 283 | + justify-content: space-between; | |
| 284 | + align-self: stretch; | |
| 285 | + float: none; | |
| 286 | + gap: 16px; | |
| 287 | + width: 100%; | |
| 288 | + max-width: 100%; | |
| 289 | + margin: 0 0 16px; | |
| 290 | + padding: 12px 18px; | |
| 283 | 291 | background: #fff; |
| 284 | - padding: 15px 15px; | |
| 285 | - margin: 20px 20px 20px 0; | |
| 292 | + border: 1px solid var(--woobot-primary-border); | |
| 286 | 293 | border-radius: 16px; |
| 294 | + box-sizing: border-box; | |
| 295 | +} | |
| 296 | + | |
| 297 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header-logo { | |
| 298 | + display: flex; | |
| 287 | 299 | align-items: center; |
| 288 | - justify-content: space-between; | |
| 289 | - width: 97%; | |
| 300 | + gap: 14px; | |
| 301 | + min-width: 0; | |
| 290 | 302 | } |
| 291 | 303 | |
| 292 | -.qcld-wp-chatbot-wrap-header img{ | |
| 293 | - max-width: 50px; | |
| 304 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header img { | |
| 305 | + width: 50px; | |
| 306 | + height: 50px; | |
| 307 | + max-width: 50px; | |
| 308 | + flex: 0 0 50px; | |
| 309 | + object-fit: contain; | |
| 294 | 310 | } |
| 295 | 311 | |
| 296 | -.qcld-wp-chatbot-wrap-header ul, .qcld-wp-chatbot-wrap-header p, .qcld-wp-chatbot-wrap-header li{ | |
| 297 | - margin: 0; | |
| 312 | +.wpbot-str-page a.qcld-wp-chatbot-wrap-site__logo { | |
| 313 | + display: flex; | |
| 314 | + align-items: center; | |
| 315 | + gap: 12px; | |
| 316 | + margin: 0; | |
| 317 | + padding: 0; | |
| 318 | + color: #000; | |
| 319 | + font-size: 22px; | |
| 320 | + font-weight: 700; | |
| 321 | + line-height: 1.2; | |
| 322 | + text-decoration: none; | |
| 298 | 323 | } |
| 299 | -.qcld-wp-chatbot-wrap-header a.wpchatbot-Upgrade { | |
| 324 | + | |
| 325 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header p, | |
| 326 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header ul, | |
| 327 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header li { | |
| 328 | + margin: 0; | |
| 329 | + padding: 0; | |
| 330 | + list-style: none; | |
| 331 | +} | |
| 332 | + | |
| 333 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header p { | |
| 334 | + color: var(--woobot-text); | |
| 335 | + font-size: 14px; | |
| 336 | + white-space: nowrap; | |
| 337 | +} | |
| 338 | + | |
| 339 | +.wpbot-str-page .qcld-wp-chatbot-wrap-version-wrapper { | |
| 340 | + margin: 0; | |
| 341 | + padding: 0; | |
| 342 | + list-style: none; | |
| 343 | +} | |
| 344 | + | |
| 345 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header a.wpchatbot-Upgrade { | |
| 346 | + display: inline-block; | |
| 300 | 347 | padding: 12px 25px; |
| 301 | - background: #ffffff; | |
| 348 | + background: #fff; | |
| 302 | 349 | color: var(--woobot-primary); |
| 303 | 350 | border: 2px solid var(--woobot-primary); |
| 304 | 351 | border-radius: 6px; |
| 305 | - font-weight: bold; | |
| 352 | + font-size: 14px; | |
| 353 | + font-weight: 700; | |
| 354 | + line-height: 1.2; | |
| 355 | + text-decoration: none; | |
| 356 | + white-space: nowrap; | |
| 306 | 357 | } |
| 307 | 358 | |
| 308 | -.qcld-wp-chatbot-wrap-header a.wpchatbot-Upgrade:hover { | |
| 309 | - padding: 12px 25px; | |
| 359 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header a.wpchatbot-Upgrade:hover, | |
| 360 | +.wpbot-str-page .qcld-wp-chatbot-wrap-header a.wpchatbot-Upgrade:focus { | |
| 310 | 361 | background: var(--woobot-primary); |
| 362 | + border-color: var(--woobot-primary); | |
| 311 | 363 | color: #fff; |
| 312 | - border: 2px solid var(--woobot-primary); | |
| 313 | - border-radius: 6px; | |
| 314 | - font-weight: bold; | |
| 315 | 364 | text-decoration: none; |
| 316 | 365 | } |
| 317 | -a.qcld-wp-chatbot-wrap-site__logo { | |
| 318 | - font-size: 22px; | |
| 319 | - color: #000; | |
| 320 | - font-weight: bold; | |
| 321 | - display: flex; | |
| 322 | - align-items: center; | |
| 323 | - gap: 12px; | |
| 324 | - text-decoration: none; | |
| 366 | + | |
| 367 | +.wpbot-str-main { | |
| 368 | + display: block; | |
| 369 | + width: 100%; | |
| 370 | + max-width: 100%; | |
| 325 | 371 | margin: 0; |
| 326 | - padding: 0; | |
| 372 | + box-sizing: border-box; | |
| 327 | 373 | } |
| 328 | 374 | |
| 329 | -a{ | |
| 330 | - text-decoration: none; | |
| 331 | -} | |
| 332 | -.qcld-wp-chatbot-wrap-header_inn { | |
| 375 | +.wpbot-str-hero, | |
| 376 | +.wpbot-str-card { | |
| 333 | 377 | background: #fff; |
| 378 | + border: 1px solid var(--woobot-primary-border); | |
| 334 | 379 | border-radius: 16px; |
| 335 | - margin: 0 20px 0 0; | |
| 336 | - padding: 20px; | |
| 380 | + padding: 20px 22px; | |
| 381 | + margin: 0 0 16px; | |
| 382 | + box-sizing: border-box; | |
| 337 | 383 | } |
| 338 | -.TextResponsesoutside { | |
| 339 | - background: #fff; | |
| 340 | - border-radius: 16px; | |
| 341 | - margin: 0 20px 0 0; | |
| 342 | - padding: 20px; | |
| 384 | + | |
| 385 | +.wpbot-str-hero, | |
| 386 | +.wpbot-str-list-head, | |
| 387 | +.wpbot-str-card-head, | |
| 388 | +.wpbot-str-hero-actions, | |
| 389 | +.wpbot-str-form-actions, | |
| 390 | +.wpbot-str-reindex { | |
| 391 | + display: flex; | |
| 392 | + align-items: flex-start; | |
| 393 | + justify-content: space-between; | |
| 394 | + gap: 16px; | |
| 343 | 395 | } |
| 344 | 396 | |
| 397 | +.wpbot-str-hero-actions, | |
| 398 | +.wpbot-str-form-actions { | |
| 399 | + flex-wrap: wrap; | |
| 400 | + justify-content: flex-start; | |
| 401 | +} | |
| 345 | 402 | |
| 346 | -.qcld-wp-chatbot-wrap-header_inn h1.wp-heading-inline { | |
| 347 | - border-bottom: 1px solid #eee; | |
| 348 | - padding: 0 0 15px 0; | |
| 349 | - margin: 20px 0 12px 0; | |
| 350 | - font-weight: bold; | |
| 351 | - font-size: 22px !important; | |
| 403 | +.wpbot-str-card-head { | |
| 404 | + margin-bottom: 4px; | |
| 352 | 405 | } |
| 353 | 406 | |
| 354 | -.TextResponsesoutside h1 { | |
| 355 | - border-bottom: 1px solid #eee; | |
| 356 | - padding: 0 0 8px 0; | |
| 357 | - margin: 20px 0 12px 0; | |
| 358 | - font-weight: bold; | |
| 359 | - font-size: 22px !important; | |
| 407 | +.wpbot-str-list-head { | |
| 408 | + align-items: center; | |
| 409 | + margin-bottom: 14px; | |
| 410 | + padding-bottom: 14px; | |
| 411 | + border-bottom: 1px solid var(--woobot-primary-border); | |
| 360 | 412 | } |
| 361 | -.TextResponsesoutside ul li { | |
| 362 | - font-size: 14px; | |
| 413 | + | |
| 414 | +.wpbot-str-hero h1, | |
| 415 | +.wpbot-str-card h2 { | |
| 416 | + margin: 0 0 6px; | |
| 417 | + padding: 0; | |
| 418 | + border: 0; | |
| 419 | + color: var(--woobot-primary); | |
| 420 | + font-weight: 700; | |
| 421 | + line-height: 1.3; | |
| 363 | 422 | } |
| 364 | -.wpbot_single_addon_wrapper2 p { | |
| 365 | - font-size: 16px; | |
| 423 | + | |
| 424 | +.wpbot-str-hero h1 { | |
| 425 | + font-size: 24px; | |
| 366 | 426 | } |
| 367 | -.TextResponsesouter i { | |
| 368 | - font-weight: normal; | |
| 369 | - font-size: 12px; | |
| 370 | - color: red; | |
| 427 | + | |
| 428 | +.wpbot-str-card h2 { | |
| 429 | + font-size: 18px; | |
| 371 | 430 | } |
| 372 | -.TextResponsesoutside i { | |
| 373 | - font-weight: normal; | |
| 431 | + | |
| 432 | +.wpbot-str-hero p, | |
| 433 | +.wpbot-str-card-head p, | |
| 434 | +.wpbot-str-list-head p { | |
| 435 | + margin: 0; | |
| 436 | + max-width: 720px; | |
| 437 | + color: var(--woobot-muted); | |
| 438 | + font-size: 14px; | |
| 439 | + line-height: 1.55; | |
| 440 | +} | |
| 441 | + | |
| 442 | +.wpbot-str-note { | |
| 443 | + display: inline-flex; | |
| 444 | + margin-top: 12px; | |
| 445 | + padding: 6px 12px; | |
| 446 | + border-radius: 999px; | |
| 447 | + background: var(--woobot-primary-soft); | |
| 448 | + border: 1px solid var(--woobot-primary-border); | |
| 449 | + color: var(--woobot-primary); | |
| 374 | 450 | font-size: 12px; |
| 375 | - color: red; | |
| 451 | + font-weight: 600; | |
| 376 | 452 | } |
| 377 | 453 | |
| 378 | -table.form-table-str.form-table tr { | |
| 379 | - background: #fff; | |
| 380 | - padding: 2px 10px !important; | |
| 381 | - border-radius: 6px; | |
| 382 | - margin: 0 0 8px 0; | |
| 383 | - border: 5px solid #fff; | |
| 384 | - vertical-align: middle; | |
| 385 | - border: 1px solid #eee; | |
| 454 | +.wpbot-str-callout { | |
| 455 | + margin: 0 0 4px; | |
| 456 | + padding: 12px 14px; | |
| 457 | + background: var(--woobot-primary-soft); | |
| 458 | + border: 1px solid var(--woobot-primary-border); | |
| 459 | + border-radius: 10px; | |
| 386 | 460 | } |
| 387 | -table.form-table-str.form-table { | |
| 388 | - border: 1px solid #eee; | |
| 461 | + | |
| 462 | +.wpbot-str-callout p { | |
| 463 | + margin: 0; | |
| 464 | + color: var(--woobot-text); | |
| 465 | + font-size: 13px; | |
| 389 | 466 | } |
| 390 | -table.form-table-str.form-table tr { | |
| 391 | - border: none; | |
| 467 | + | |
| 468 | +.wpbot-str-field { | |
| 469 | + display: grid; | |
| 470 | + grid-template-columns: 220px minmax(0, 1fr); | |
| 471 | + gap: 8px 24px; | |
| 472 | + align-items: start; | |
| 473 | + padding: 16px 0; | |
| 474 | + border-bottom: 1px solid #eef0f6; | |
| 392 | 475 | } |
| 393 | -table.form-table-str.form-table th { | |
| 394 | - vertical-align: top; | |
| 395 | - text-align: center; | |
| 396 | - padding: 20px 10px 20px 0; | |
| 397 | - width: 200px; | |
| 398 | - line-height: 1.3; | |
| 476 | + | |
| 477 | +.wpbot-str-label { | |
| 478 | + padding-top: 10px; | |
| 479 | + color: var(--woobot-text); | |
| 480 | + font-size: 14px; | |
| 399 | 481 | font-weight: 600; |
| 400 | - vertical-align: middle; | |
| 401 | 482 | } |
| 402 | 483 | |
| 403 | -.TextResponsesoutside footer.wp-chatbot-admin-footer input#submit { | |
| 404 | - padding: 12px 20px; | |
| 484 | +.wpbot-str-hint { | |
| 485 | + margin: 6px 0 0; | |
| 486 | + color: var(--woobot-muted); | |
| 487 | + font-size: 12px; | |
| 488 | + font-style: italic; | |
| 489 | + font-weight: 400; | |
| 490 | +} | |
| 491 | + | |
| 492 | +.wpbot-str-page .wpbot-str-input { | |
| 405 | 493 | width: 100%; |
| 406 | - font-size: 16px; | |
| 407 | - font-weight: 500; | |
| 408 | - color: var(--woobot-nav-muted); | |
| 494 | + max-width: 100%; | |
| 495 | + min-height: 40px; | |
| 496 | + margin: 0; | |
| 497 | + padding: 8px 12px; | |
| 498 | + border: 1px solid var(--woobot-primary-border); | |
| 409 | 499 | border-radius: 8px; |
| 410 | - position: relative; | |
| 411 | - display: flex; | |
| 412 | - align-items: center; | |
| 413 | - gap: 15px; | |
| 414 | - background: var(--woobot-primary); | |
| 415 | - color: #ffffff; | |
| 416 | - text-decoration: none; | |
| 417 | - border: none; | |
| 418 | - max-width: 220px; | |
| 419 | - margin: 12px 0 0 0; | |
| 420 | - line-height: 24px; | |
| 500 | + background: #fff; | |
| 501 | + color: var(--woobot-text); | |
| 502 | + box-shadow: none; | |
| 421 | 503 | } |
| 422 | -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action { | |
| 423 | - padding: 3px 25px; | |
| 424 | - background: #ffffff; | |
| 425 | - color: var(--woobot-primary); | |
| 426 | - border: 2px solid var(--woobot-primary); | |
| 427 | - border-radius: 6px; | |
| 428 | - font-weight: bold; | |
| 504 | + | |
| 505 | +.wpbot-str-page .wpbot-str-input-short { | |
| 506 | + max-width: 160px; | |
| 429 | 507 | } |
| 430 | 508 | |
| 431 | -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action:hover { | |
| 432 | - padding: 0px 15px; | |
| 433 | - background: var(--woobot-primary); | |
| 434 | - color: #fff; | |
| 435 | - border: 2px solid var(--woobot-primary); | |
| 436 | - border-radius: 6px; | |
| 437 | - font-weight: bold; | |
| 438 | - position: absolute; | |
| 439 | - top: 36px; | |
| 440 | - left: 280px; | |
| 509 | +.wpbot-str-page .wpbot-str-input:focus { | |
| 510 | + border-color: var(--woobot-primary); | |
| 511 | + box-shadow: 0 0 0 3px rgba(var(--woobot-primary-rgb), 0.15); | |
| 512 | + outline: none; | |
| 441 | 513 | } |
| 442 | -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action { | |
| 443 | - padding: 0px 15px; | |
| 444 | - background: #ffffff; | |
| 445 | - color: var(--woobot-primary); | |
| 446 | - border: 2px solid var(--woobot-primary); | |
| 447 | - border-radius: 6px; | |
| 448 | - font-weight: bold; | |
| 449 | - position: absolute; | |
| 450 | - top: 36px; | |
| 451 | - left: 280px; | |
| 514 | + | |
| 515 | +.wpbot-str-checks { | |
| 516 | + display: flex; | |
| 517 | + flex-wrap: wrap; | |
| 518 | + gap: 8px; | |
| 452 | 519 | } |
| 453 | 520 | |
| 454 | -.qcld-wp-chatbot-wrap-header_inn { | |
| 455 | - position: relative; | |
| 521 | +.wpbot-str-checks label { | |
| 522 | + display: inline-flex; | |
| 523 | + align-items: center; | |
| 524 | + gap: 8px; | |
| 525 | + margin: 0; | |
| 526 | + padding: 8px 12px; | |
| 527 | + border: 1px solid var(--woobot-primary-border); | |
| 528 | + border-radius: 10px; | |
| 529 | + background: var(--woobot-primary-soft); | |
| 530 | + color: var(--woobot-text); | |
| 531 | + font-size: 13px; | |
| 532 | + font-weight: 500; | |
| 456 | 533 | } |
| 457 | -.notice.is-dismissible.qcbot-str-top-notic { | |
| 458 | - width: 95%; | |
| 534 | + | |
| 535 | +.wpbot-str-page input[type="checkbox"] { | |
| 536 | + accent-color: var(--woobot-primary); | |
| 459 | 537 | } |
| 460 | 538 | |
| 461 | -.TextResponsesouter i { | |
| 462 | - position: relative; | |
| 463 | - top: 6px; | |
| 539 | +.wpbot-str-form-actions { | |
| 540 | + padding-top: 16px; | |
| 464 | 541 | } |
| 465 | 542 | |
| 466 | -table.form-table-str.form-table th { | |
| 467 | - text-align: left !important; | |
| 468 | - padding: 20px 10px 20px 20px !important; | |
| 543 | +.wpbot-str-reindex { | |
| 544 | + align-items: center; | |
| 545 | + margin-top: 8px; | |
| 546 | + padding-top: 16px; | |
| 547 | + border-top: 1px solid var(--woobot-primary-border); | |
| 469 | 548 | } |
| 470 | 549 | |
| 471 | -.qc-review-text img { | |
| 472 | - width: 100%; | |
| 550 | +.wpbot-str-reindex-copy strong { | |
| 551 | + display: block; | |
| 552 | + color: var(--woobot-text); | |
| 553 | + font-size: 14px; | |
| 473 | 554 | } |
| 474 | 555 | |
| 475 | -.TextResponsesouter input#submit { | |
| 476 | - padding: 0px 15px; | |
| 477 | - background: #ffffff; | |
| 556 | +.wpbot-str-page .wpbot-str-btn { | |
| 557 | + display: inline-flex; | |
| 558 | + align-items: center; | |
| 559 | + justify-content: center; | |
| 560 | + gap: 6px; | |
| 561 | + margin: 0; | |
| 562 | + padding: 0 16px; | |
| 563 | + height: auto; | |
| 564 | + min-height: 36px; | |
| 565 | + border: 2px solid var(--woobot-primary); | |
| 566 | + border-radius: 8px; | |
| 567 | + background: #fff; | |
| 478 | 568 | color: var(--woobot-primary); |
| 479 | - border: 2px solid var(--woobot-primary); | |
| 480 | - border-radius: 6px; | |
| 481 | - font-weight: bold; | |
| 569 | + font-family: inherit; | |
| 570 | + font-size: 13px; | |
| 571 | + font-weight: 600; | |
| 572 | + line-height: 1.2; | |
| 573 | + text-decoration: none; | |
| 574 | + cursor: pointer; | |
| 575 | + box-shadow: none; | |
| 482 | 576 | } |
| 483 | -.TextResponsesouter input#re-index { | |
| 484 | - padding: 0px 15px; | |
| 485 | - background: #ffffff; | |
| 486 | - color: var(--woobot-primary); | |
| 487 | - border: 2px solid var(--woobot-primary); | |
| 488 | - border-radius: 6px; | |
| 489 | - font-weight: bold; | |
| 577 | + | |
| 578 | +.wpbot-str-page .wpbot-str-btn:hover, | |
| 579 | +.wpbot-str-page .wpbot-str-btn:focus { | |
| 580 | + background: var(--woobot-primary); | |
| 581 | + border-color: var(--woobot-primary); | |
| 582 | + color: #fff; | |
| 583 | + box-shadow: none; | |
| 584 | + outline: none; | |
| 490 | 585 | } |
| 491 | 586 | |
| 587 | +.wpbot-str-page .wpbot-str-btn-primary { | |
| 588 | + background: var(--woobot-primary); | |
| 589 | + color: #fff; | |
| 590 | +} | |
| 492 | 591 | |
| 493 | -#qcld-show-more-wrapper-box { | |
| 494 | - margin-top: 0; | |
| 495 | - position:relative; | |
| 592 | +.wpbot-str-page .wpbot-str-btn-primary:hover, | |
| 593 | +.wpbot-str-page .wpbot-str-btn-primary:focus { | |
| 594 | + background: var(--woobot-primary-dark); | |
| 595 | + border-color: var(--woobot-primary-dark); | |
| 596 | + color: #fff; | |
| 496 | 597 | } |
| 497 | -#qcld-show-more-wrapper-box .qcld-show-more-text { | |
| 498 | -/* width: 660px; */ | |
| 499 | - margin-bottom: 5px; | |
| 500 | - padding: 0 0; | |
| 501 | - position:relative; | |
| 502 | - display: block; | |
| 598 | + | |
| 599 | +.wpbot-str-page .wpbot-str-extra[hidden] { | |
| 600 | + display: none !important; | |
| 503 | 601 | } |
| 504 | -#qcld-show-more-wrapper-box .qcld-show-more-show-more { | |
| 602 | + | |
| 603 | +.wpbot-str-page .wpbot-str-expand { | |
| 604 | + display: flex; | |
| 605 | + align-items: center; | |
| 606 | + justify-content: center; | |
| 607 | + gap: 8px; | |
| 608 | + width: 100%; | |
| 609 | + margin-top: 16px; | |
| 610 | + padding: 10px 14px; | |
| 611 | + border: 2px solid var(--woobot-primary); | |
| 612 | + border-radius: 8px; | |
| 613 | + background: #fff; | |
| 614 | + color: var(--woobot-primary); | |
| 615 | + font-family: inherit; | |
| 616 | + font-size: 13px; | |
| 617 | + font-weight: 600; | |
| 618 | + line-height: 1.2; | |
| 619 | + cursor: pointer; | |
| 620 | + box-shadow: none; | |
| 621 | + box-sizing: border-box; | |
| 622 | + /* max-width: 220px; */ | |
| 623 | + margin: 20px auto 0 auto; | |
| 505 | 624 | color: #ffffff; |
| 506 | 625 | position: relative; |
| 507 | 626 | padding: 40px 0 0 0; |
| 508 | - height: 40px; | |
| 627 | + height: 80px; | |
| 509 | 628 | text-align: center; |
| 510 | 629 | background: #f1f1f1; |
| 511 | 630 | cursor: pointer; |
| 512 | - background: linear-gradient(to bottom, rgb(255 255 255 / 53%) 0%, rgb(188 174 255) 100%); | |
| 513 | - margin: -18px 0 0 0; | |
| 631 | + background: linear-gradient(to bottom, rgb(255 255 255 / 53%) 0%, rgb(84 68 157) 100%); | |
| 632 | + margin: -77px 0 0 0; | |
| 514 | 633 | border-radius: 0 0 15px 15px; |
| 515 | 634 | z-index: 99999; |
| 516 | 635 | font-weight: bold; |
| 636 | + border: none; | |
| 637 | +} | |
| 517 | 638 | |
| 639 | +.wpbot-str-page .wpbot-str-expand:hover, | |
| 640 | +.wpbot-str-page .wpbot-str-expand:focus { | |
| 641 | + background: linear-gradient(to bottom, rgb(255 255 255 / 53%) 0%, rgb(84 68 157) 100%); | |
| 642 | + color: #fff; | |
| 643 | + outline: none; | |
| 518 | 644 | } |
| 519 | 645 | |
| 520 | -#qcld-show-more-wrapper-box .qcld-show-more-show-more-height { | |
| 521 | - height: 112px; | |
| 522 | - overflow:hidden; | |
| 646 | +.wpbot-str-page .wpbot-str-expand[aria-expanded="true"] { | |
| 647 | + margin: 0 0 0 0; | |
| 523 | 648 | } |
| 524 | 649 | |
| 525 | -#qcld-show-more-wrapper-box .qcld-show-more-show-more i { | |
| 526 | - display: block; | |
| 527 | - padding: 0 0 0 0; | |
| 650 | + | |
| 651 | +.wpbot-str-page .wpbot-str-expand-icon { | |
| 652 | + font-size: 16px; | |
| 653 | + line-height: 1; | |
| 654 | +} | |
| 655 | + | |
| 656 | +.wpbot-str-page .wp-editor-wrap { | |
| 657 | + border: 1px solid var(--woobot-primary-border); | |
| 658 | + border-radius: 10px; | |
| 659 | +} | |
| 660 | + | |
| 661 | +.wpbot-str-page .tablenav { | |
| 662 | + height: auto; | |
| 663 | + margin: 0 0 12px; | |
| 664 | + padding: 0; | |
| 665 | + background: transparent; | |
| 666 | +} | |
| 667 | + | |
| 668 | +.wpbot-str-page .tablenav.bottom { | |
| 669 | + margin: 12px 0 0; | |
| 670 | +} | |
| 671 | + | |
| 672 | +.wpbot-str-page .tablenav .actions select, | |
| 673 | +.wpbot-str-page .tablenav .tablenav-pages .current-page { | |
| 674 | + min-height: 36px; | |
| 675 | + border: 1px solid var(--woobot-primary-border); | |
| 676 | + border-radius: 8px; | |
| 677 | + box-shadow: none; | |
| 678 | +} | |
| 679 | + | |
| 680 | +.wpbot-str-page .tablenav .button, | |
| 681 | +.wpbot-str-page .tablenav .tablenav-pages a, | |
| 682 | +.wpbot-str-page .tablenav .tablenav-pages span.button { | |
| 683 | + min-height: 32px; | |
| 684 | + border: 1px solid var(--woobot-primary-border); | |
| 685 | + border-radius: 8px; | |
| 686 | + background: #fff; | |
| 687 | + color: var(--woobot-primary); | |
| 688 | + font-weight: 600; | |
| 689 | + box-shadow: none; | |
| 690 | +} | |
| 691 | + | |
| 692 | +.wpbot-str-page .tablenav .button:hover, | |
| 693 | +.wpbot-str-page .tablenav .tablenav-pages a:hover { | |
| 694 | + border-color: var(--woobot-primary); | |
| 528 | 695 | background: var(--woobot-primary); |
| 529 | - width: 30px; | |
| 530 | - height: 30px; | |
| 531 | - line-height: 30px; | |
| 532 | - border-radius: 50%; | |
| 533 | - margin: -15px auto 0 auto; | |
| 534 | - font-size: 18px !important; | |
| 535 | 696 | color: #fff; |
| 536 | 697 | } |
| 537 | -.TextResponsesouter input#submit:hover { | |
| 698 | + | |
| 699 | +.wpbot-str-page .displaying-num { | |
| 700 | + color: var(--woobot-muted); | |
| 701 | + font-size: 13px; | |
| 702 | +} | |
| 703 | + | |
| 704 | +.wpbot-str-page .wp-list-table { | |
| 705 | + border: 1px solid var(--woobot-primary-border); | |
| 706 | + border-radius: 12px; | |
| 707 | + border-collapse: separate; | |
| 708 | + border-spacing: 0; | |
| 709 | + background: #fff; | |
| 710 | + overflow: hidden; | |
| 711 | +} | |
| 712 | + | |
| 713 | +.wpbot-str-page .wp-list-table thead th, | |
| 714 | +.wpbot-str-page .wp-list-table thead td, | |
| 715 | +.wpbot-str-page .wp-list-table tfoot th, | |
| 716 | +.wpbot-str-page .wp-list-table tfoot td { | |
| 717 | + padding: 12px 10px; | |
| 718 | + border: none; | |
| 538 | 719 | background: var(--woobot-primary); |
| 539 | 720 | color: #fff; |
| 540 | - border: 2px solid var(--woobot-primary); | |
| 721 | + font-weight: 600; | |
| 541 | 722 | } |
| 542 | 723 | |
| 543 | -.TextResponsesouter input#re-index:hover { | |
| 544 | - background: var(--woobot-primary); | |
| 724 | +.wpbot-str-page .wp-list-table thead a, | |
| 725 | +.wpbot-str-page .wp-list-table tfoot a { | |
| 545 | 726 | color: #fff; |
| 546 | - border: 2px solid var(--woobot-primary); | |
| 547 | 727 | } |
| 548 | -.TextResponsesouter table.widefat { | |
| 549 | - border: 1px solid #ebebeb; | |
| 728 | + | |
| 729 | +.wpbot-str-page .wp-list-table thead .sorting-indicator:before, | |
| 730 | +.wpbot-str-page .wp-list-table thead th.sorted.asc .sorting-indicator.asc:before, | |
| 731 | +.wpbot-str-page .wp-list-table thead th.sorted.desc .sorting-indicator.desc:before, | |
| 732 | +.wpbot-str-page .wp-list-table thead th.sorted:hover .sorting-indicator:before, | |
| 733 | +.wpbot-str-page .wp-list-table thead th.sorted a:hover .sorting-indicator:before { | |
| 734 | + color: #fff; | |
| 550 | 735 | } |
| 551 | -.TextResponsesouter .tablenav { | |
| 552 | - padding: 8px; | |
| 553 | - background: var(--woobot-primary); | |
| 736 | + | |
| 737 | +.wpbot-str-page .wp-list-table tfoot { | |
| 738 | + display: none; | |
| 554 | 739 | } |
| 555 | -.TextResponsesouter span.displaying-num { | |
| 556 | - color: #fff; | |
| 740 | + | |
| 741 | +.wpbot-str-page .wp-list-table.striped > tbody > tr, | |
| 742 | +.wpbot-str-page .wp-list-table.striped > tbody > :nth-child(odd), | |
| 743 | +.wpbot-str-page .wp-list-table.striped > tbody > :nth-child(even) { | |
| 744 | + background: #fff; | |
| 557 | 745 | } |
| 558 | 746 | |
| 559 | -.TextResponsesouter .tablenav #doaction, .TextResponsesouter .tablenav #doaction2 { | |
| 560 | - border: 1px solid #ffffff !important; | |
| 561 | - color: #ffffff !important; | |
| 747 | +.wpbot-str-page .wp-list-table tbody tr:hover { | |
| 748 | + background: var(--woobot-primary-soft); | |
| 562 | 749 | } |
| 563 | 750 | |
| 751 | +.wpbot-str-page .wp-list-table td { | |
| 752 | + padding: 12px 10px; | |
| 753 | + border-bottom: 1px solid #eef0f6; | |
| 754 | + color: var(--woobot-text); | |
| 755 | + vertical-align: middle; | |
| 756 | +} | |
| 564 | 757 | |
| 758 | +.wpbot-str-page .wp-list-table tr:last-child td { | |
| 759 | + border-bottom: none; | |
| 760 | +} | |
| 565 | 761 | |
| 566 | -.qcld-wp-chatbot-wrap-header-logo { | |
| 567 | - display: flex; | |
| 568 | - align-items: center; | |
| 569 | - gap: 10px; | |
| 570 | -} | |
| 762 | +.wpbot-str-page .wp-list-table .row-actions { | |
| 763 | + position: static; | |
| 764 | + left: auto; | |
| 765 | + padding-top: 4px; | |
| 766 | + visibility: visible; | |
| 767 | +} | |
| 571 | 768 | |
| 572 | -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action { | |
| 573 | - padding: 8px 15px; | |
| 574 | - background: #ffffff; | |
| 769 | +.wpbot-str-page .wp-list-table .row-actions a { | |
| 575 | 770 | color: var(--woobot-primary); |
| 576 | - border: 2px solid var(--woobot-primary); | |
| 577 | - border-radius: 6px; | |
| 578 | - font-weight: bold; | |
| 579 | - position: absolute; | |
| 580 | - top: 30px; | |
| 581 | - left: 280px; | |
| 582 | - line-height: normal; | |
| 583 | - min-height: unset; | |
| 771 | + font-weight: 600; | |
| 584 | 772 | } |
| 585 | -.qcld-wp-chatbot-wrap-header_inn a.button.page-title-action:hover { | |
| 586 | - padding: 8px 15px; | |
| 587 | - background: var(--woobot-primary); | |
| 588 | - color: #fff; | |
| 589 | - border: 2px solid var(--woobot-primary); | |
| 590 | - border-radius: 6px; | |
| 591 | - font-weight: bold; | |
| 592 | - position: absolute; | |
| 593 | - top: 30px; | |
| 594 | - left: 280px; | |
| 773 | + | |
| 774 | +.wpbot-str-page .wp-list-table .row-actions .delete a { | |
| 775 | + color: var(--woobot-danger); | |
| 595 | 776 | } |
| 596 | 777 | |
| 597 | -.Expandmore { | |
| 598 | - background: #23ab10; | |
| 599 | - display: inline-block; | |
| 600 | - padding: 4px 10px; | |
| 601 | - font-size: 14px; | |
| 602 | - border-radius: 6px; | |
| 603 | - position: relative; | |
| 604 | - top: 0; | |
| 778 | +.wpbot-str-page .no-items td { | |
| 779 | + padding: 28px 16px; | |
| 780 | + color: var(--woobot-muted); | |
| 781 | + text-align: center; | |
| 605 | 782 | } |
| 606 | 783 | |
| 607 | -.Collapsemore { | |
| 608 | - background: #ff0000; | |
| 609 | - display: inline-block; | |
| 610 | - padding: 4px 10px; | |
| 611 | - font-size: 14px; | |
| 612 | - border-radius: 6px; | |
| 613 | - position: relative; | |
| 614 | - top: 0; | |
| 784 | +form.wpbot-str-reindex.wpbot-str-extra { | |
| 785 | + display: flex; | |
| 786 | + flex-direction: column; | |
| 787 | + align-content: flex-start; | |
| 788 | + align-items: flex-start; | |
| 789 | +} | |
| 615 | 790 | |
| 616 | -} | |
| 791 | +@media (max-width: 782px) { | |
| 792 | + .wpbot-str-page .qcld-wp-chatbot-wrap-header, | |
| 793 | + .wpbot-str-page .qcld-wp-chatbot-wrap-header-logo, | |
| 794 | + .wpbot-str-hero, | |
| 795 | + .wpbot-str-list-head, | |
| 796 | + .wpbot-str-reindex, | |
| 797 | + .wpbot-str-form-actions { | |
| 798 | + flex-direction: column; | |
| 799 | + align-items: flex-start; | |
| 800 | + } | |
| 617 | 801 | |
| 618 | -.Expandmore span { | |
| 619 | - color: #fff; | |
| 620 | - margin: 0 0 0 8px; | |
| 621 | - padding: 0 5px; | |
| 622 | - font-size: 18px; | |
| 802 | + .wpbot-str-field { | |
| 803 | + grid-template-columns: 1fr; | |
| 804 | + gap: 6px; | |
| 805 | + } | |
| 806 | + | |
| 807 | + .wpbot-str-label { | |
| 808 | + padding-top: 0; | |
| 809 | + } | |
| 810 | + | |
| 811 | + .wpbot-str-page .wpbot-str-input-short { | |
| 812 | + max-width: 100%; | |
| 813 | + } | |
| 623 | 814 | } |
| 624 | 815 | </style> |
| 816 | +<script> | |
| 817 | +jQuery(function ($) { | |
| 818 | + $(document).on('click', '.wpbot-str-page .wpbot-str-expand', function () { | |
| 819 | + var $button = $(this); | |
| 820 | + var $card = $button.closest('.wpbot-str-card'); | |
| 821 | + var isOpen = $button.attr('aria-expanded') === 'true'; | |
| 625 | 822 | |
| 626 | -<script type="text/javascript"> | |
| 627 | -jQuery(".qcld-show-more-show-more").click(function () { | |
| 628 | - if(jQuery(".qcld-show-more-text").hasClass("qcld-show-more-show-more-height")) { | |
| 629 | - jQuery(this).html('<div class="Collapsemore">Collapse Options</div>'); | |
| 630 | - } else { | |
| 631 | - jQuery(this).html('<div class="Expandmore">Expand for More Options<span>+</span></div>'); | |
| 632 | - } | |
| 633 | - | |
| 634 | - jQuery(".qcld-show-more-text").toggleClass("qcld-show-more-show-more-height"); | |
| 635 | - }); | |
| 636 | - | |
| 637 | - | |
| 638 | -</script> | |
| 823 | + if (isOpen) { | |
| 824 | + $card.find('.wpbot-str-extra').attr('hidden', 'hidden'); | |
| 825 | + $button.attr('aria-expanded', 'false'); | |
| 826 | + $button.find('.wpbot-str-expand-label').text('<?php echo esc_js( __( 'Expand for More Options', 'chatbot' ) ); ?>'); | |
| 827 | + $button.find('.wpbot-str-expand-icon').text('+'); | |
| 828 | + } else { | |
| 829 | + $card.find('.wpbot-str-extra').removeAttr('hidden'); | |
| 830 | + $button.attr('aria-expanded', 'true'); | |
| 831 | + $button.find('.wpbot-str-expand-label').text('<?php echo esc_js( __( 'Collapse Options', 'chatbot' ) ); ?>'); | |
| 832 | + $button.find('.wpbot-str-expand-icon').text('\u2212'); | |
| 833 | + } | |
| 834 | + }); | |
| 835 | +}); | |
| 836 | +</script> | |