Plugin Directory

Changeset 2664049


Ignore:
Timestamp:
01/25/2022 12:35:06 AM (4 years ago)
Author:
simpleform
Message:

feat: forms page.
fix: code optimization and corrections

Location:
simpleform/trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • simpleform/trunk/README.txt

    r2618058 r2664049  
    55Tags: contact form, form builder, form, custom form, smtp, email, message, contact, ajax, information, support, block
    66Requires at least: 5.2
    7 Tested up to: 5.8
     7Tested up to: 5.9
    88Requires PHP: 5.6
    9 Stable tag: 2.0.9
     9Stable tag: 2.1
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    159159
    160160== Changelog ==
     161
     162= 2.1 (25 January 2022) =
     163* Changed: code cleaning and optimization
     164* Added: forms page
    161165
    162166= 2.0.9 (22 October 2021) =
  • simpleform/trunk/admin/block/block.json

    r2618058 r2664049  
    5050        "bgColor": {
    5151            "type": "string",
    52             "default": "#FFFFFF"
     52            "default": "transparent"
    5353        },
    5454        "borderRadius": {
  • simpleform/trunk/admin/block/class-block.php

    r2618058 r2664049  
    4242     
    4343    public function register_block() {
     44       
     45      // Cleaning of duplicate widgets blocks
     46      do_action( 'sform_widgets_cleaning' );
    4447       
    4548      $asset_file = include( plugin_dir_path( __FILE__ ) . 'build/index.asset.php');
     
    5457
    5558      global $wpdb;
    56       $forms = $wpdb->get_results( "SELECT id, name FROM {$wpdb->prefix}sform_shortcodes WHERE widget = '0'", 'ARRAY_A' );
     59      $forms = $wpdb->get_results( "SELECT id, name FROM {$wpdb->prefix}sform_shortcodes WHERE widget = '0' AND status != 'trash'", 'ARRAY_A' );
    5760      $empty_value = array( 'id' => '', 'name' => __( 'Select an existing form', 'simpleform' ) );
    5861      array_unshift($forms , $empty_value);
     
    156159      $css_settings .= ! empty($hoverbuttonbordercolor) ? '#submission-'.$form_id.':hover {border-color: '.$hoverbuttonbordercolor.';}' : '';
    157160      $css_settings .= ! empty($hoverbuttontextcolor) ? '#submission-'.$form_id.':hover {color: '.$hoverbuttontextcolor.';}' : '';
    158      if ( $css_settings ) { wp_add_inline_style( 'sform-public-style', $css_settings ); }
     161     
     162      // With WP 5.9 in a block theme, blocks get parsed before the <head> so this code needs to fixed!
     163      if ( $css_settings ) {
     164       
     165        wp_add_inline_style( 'sform-public-style', $css_settings );
     166         
     167        if ( version_compare(get_bloginfo('version'),'5.9', '>=') ) {
     168          // Get the default styling file
     169          $current_block_style = file_get_contents(SIMPLEFORM_URL . 'public/css/block-style.css');
     170          $search_form_style_start = '/*'.$form_id.'*/';
     171          $split_style = explode($search_form_style_start, $current_block_style);
     172          if ( isset($split_style[1]) ) {
     173            $search_form_style_end = '/* END '.$form_id.'*/';
     174            $split_form_style = explode($search_form_style_end, $split_style[1]);
     175            $previous_style = isset($split_form_style[1]) ? $split_style[0] . $split_form_style[1] : $split_style[0];
     176          }
     177          else {
     178            $previous_style = $current_block_style;
     179          }
     180          $block_style = '/*'.$form_id.'*/' . $css_settings . '/* END '.$form_id.'*/';
     181          $blocks_style = $previous_style.$block_style;
     182          // Write styling settings to default styling file
     183          file_put_contents(SIMPLEFORM_PATH . 'public/css/block-style.css',$blocks_style);
     184        }
     185         
     186      }
     187     
    159188      $anchor = ! empty( $attributes['formAnchor'] ) ? 'id="' . $attributes['formAnchor'] . '"' : '';
    160189      $topmargin = ! empty( $attributes['topMargin'] ) && absint( $attributes['topMargin'] ) ? 'margin-top:'. $attributes['topMargin'] .'px;' : '';
     
    233262
    234263        else {
     264           
    235265            $above_form = isset( $_GET['sending'] ) && $_GET['sending'] == 'success' && isset( $_GET['form'] ) && $_GET['form'] == $form_id ? '' : $form_description;
    236266            $below_form = isset( $_GET['sending'] ) && $_GET['sending'] == 'success' && isset( $_GET['form'] ) && $_GET['form'] == $form_id ? '' : $bottom_text;
     
    238268        }
    239269       
    240         return $return_html;     
     270        return $return_html;   
    241271   
    242272    }
     
    300330
    301331    /**
    302      * Update pages list containing a block form when a page is edited.
    303      *
    304      * @since    2.0
    305      */
    306    
    307     public function sform_block_pages( $post_id, $post ) {
    308  
    309       // Return if this is just a revision
    310       if ( wp_is_post_revision( $post_id ) ) {
    311         return;
    312       }
    313      
    314       // List of all forms IDs that have been created
    315       $util = new SimpleForm_Util();     
    316       $form_ids = $util->sform_ids();
    317       // Retrieve all forms used in the post content
    318       $used_forms = $util->used_forms($post->post_content,$type = 'all');
    319       global $wpdb;
    320       $table_name = "{$wpdb->prefix}sform_shortcodes";
    321       $id = array($post_id);
    322      
    323       // If the post content contains a block   
    324       if ( has_blocks( $post->post_content ) ) {
    325         $blocks = parse_blocks( $post->post_content );
    326         $used_forms = array();
    327         foreach ( $blocks as $block ) {
    328           $sform_block = $this->get_simpleform_block($block);
    329           // If the post content contains the simpleform block create a list of used forms
    330           if ( $sform_block && isset($sform_block['attrs']['formId']) && ! empty($sform_block['attrs']['formId']) ) {
    331              $used_forms[] = $sform_block['attrs']['formId'];
    332           }
    333         }
    334         foreach ($form_ids as $form_id) {
    335           // Check if the form is used and include the post ID in the list if not yet inserted
    336           if ( ! empty($used_forms) && in_array($form_id,$used_forms) ) {   
    337              $form_pages = $wpdb->get_var( "SELECT block_pages FROM $table_name WHERE id = {$form_id}" );
    338              $pages = ! empty($form_pages) ? explode(',',$form_pages) : array();
    339              if ( ! in_array($post_id,$pages) ) {
    340                 $new_pages = implode(",", array_unique(array_merge($id,$pages)));
    341                 $wpdb->update($table_name, array('block_pages' => $new_pages), array('id' => $form_id ));
    342              }
    343           }
    344           // Update the lists for the unused forms
    345           else {       
    346              $form_pages = $wpdb->get_var( "SELECT block_pages FROM $table_name WHERE id = {$form_id}" );
    347              $pages = ! empty($form_pages) ? explode(",", $form_pages) : array();
    348              if ( in_array($post_id,$pages) ) {
    349                 $new_pages = implode(",", array_diff($pages,$id));
    350                 $wpdb->update($table_name, array('block_pages' => $new_pages), array('id' => $form_id ));
    351              }
    352           }
    353         }
    354       }
    355      
    356       // If the post content does not contain any block   
    357       else {
    358        foreach ($form_ids as $form_id) {           
    359          $form_pages = $wpdb->get_var( "SELECT block_pages FROM $table_name WHERE id = {$form_id}" );
    360          $pages = ! empty($form_pages) ? explode(",", $form_pages) : array();
    361          if ( in_array($post_id,$pages) ) {
    362             $new_pages = implode(",", array_diff($pages,$id));
    363             $wpdb->update($table_name, array('block_pages' => $new_pages), array('id' => $form_id ));
    364          }
    365        } 
    366       }
    367                
    368     }
    369    
    370     /**
    371      * Clean up the widget areas of any non-existent or already used form when the widgets page is loaded.
     332     * Cleaning of duplicate widgets
    372333     *
    373334     * @since    2.0.4
    374335     */
    375336   
    376      public function clean_up_widget_areas(){
    377          
     337    public function set_up_widgets_check(){
     338       
     339       // Whenever the admin widgets page is loaded set a checking option
    378340       global $pagenow;
    379        if ( $pagenow == 'widgets.php' ) {
    380         $widget_block = get_option("widget_block") != false ? get_option("widget_block") : array();
    381         $used_ids = array();
    382         global $wpdb;
    383         $table_name = "{$wpdb->prefix}sform_shortcodes";
    384         $widget_forms = $wpdb->get_col( "SELECT id FROM $table_name WHERE widget_id != ''" );
    385         $util = new SimpleForm_Util();     
    386         $form_ids = $util->sform_ids();
    387         if ( !empty($widget_block) ) {
     341       if ( $pagenow == 'widgets.php' ) { add_option( 'sform_widgets_check', true ); }
     342       else { delete_option( 'sform_widgets_check' ); }
     343     
     344    }   
     345
     346
     347    public function widgets_cleaning(){
     348       
     349        if( get_option('sform_widgets_check' ) ) {
     350
     351         $widget_block = get_option("widget_block") != false ? get_option("widget_block") : array();
     352         $used_ids = array();
     353         global $wpdb;
     354         $table_name = "{$wpdb->prefix}sform_shortcodes";
     355         $widget_forms = $wpdb->get_col( "SELECT id FROM $table_name WHERE widget_id != ''" );
     356         $util = new SimpleForm_Util();     
     357         $form_ids = $util->sform_ids();
     358       
     359         // Look for the presence of widget blocks
     360         if ( !empty($widget_block) ) {
     361           
    388362          foreach ($widget_block as $key => $value ) {
     363             
    389364            $widget_id = 'block-'.$key;
    390365            $array_widget_id = array($widget_id);
     366           
    391367            if ( is_array($value) ) {   
    392368               $string = implode('',$value);
     369               
     370               // Check if the widget is a simpleform block
    393371               if ( strpos($string, 'wp:simpleform/form-selector') !== false ) {
    394372                 $split_display = ! empty($string) ? explode('formDisplay":', $string) : '';
     
    396374                 $split_id = ! empty($string) ? explode('formId":"', $string) : '';
    397375                 $id = isset($split_id[1]) ? explode('"', $split_id[1])[0] : '';
     376                 
     377                 // Remove blocks where the form id has already been used
    398378                 if ( $formDisplay == 'false' || in_array($id, $used_ids) ) {
    399379                  unset($widget_block[$key]);
     
    404384                    $updated_used_ids = array_diff($widget_ids,$array_widget_id);
    405385                    $new_used_in = implode(",", $updated_used_ids);
    406                     $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '$new_used_in' WHERE id = %d", $id) );
     386                    // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '$new_used_in' WHERE id = %d", $id) );
     387                    $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '$new_used_in', status = 'published' WHERE id = %d", $id) );
    407388                  }
    408389                 }
     390                 
    409391                 else {
    410392                  if ( !empty($id)) {                             
     
    412394                  $widget_ids = $wpdb->get_var( "SELECT widget_id FROM $table_name WHERE id = {$id}" );
    413395                  $ids = ! empty($widget_ids) ? explode(',',$widget_ids) : array();
     396                  // Add the widget id in the list
    414397                  if ( ! in_array($widget_id,$ids) ) {
    415398                  $new_ids = implode(",", array_unique(array_merge($array_widget_id,$ids)));
    416                   $wpdb->update($table_name, array('widget_id' => $new_ids), array('id' => $id ));
    417                   }
    418                   // Remove widget id from lists where not used
    419                   $widget_ids_list = $wpdb->get_results( "SELECT id, widget_id FROM $table_name WHERE id != {$id}", 'ARRAY_A' );
     399                  // $wpdb->update($table_name, array('widget_id' => $new_ids), array('id' => $id ));
     400                  $wpdb->update($table_name, array('widget_id' => $new_ids, 'status' => 'published'), array('id' => $id ));
     401                  }               
     402                  // Exclude the widget id from other lists
     403                  $widget_ids_list = $wpdb->get_results( "SELECT id, shortcode_pages, block_pages, widget_id FROM $table_name WHERE id != {$id}", 'ARRAY_A' );
    420404                  foreach($widget_ids_list as $list) {
    421                       $form_id = $list['id'];
    422                       $form_widget_ids = ! empty($list['widget_id']) ? explode(',',$list['widget_id']) : array();
     405                     $form_id = $list['id'];
     406                     $form_widget_ids = ! empty($list['widget_id']) ? explode(',',$list['widget_id']) : array();
    423407                     if ( in_array($widget_id,$form_widget_ids) ) {
    424                      $new_ids = implode(",", array_diff($form_widget_ids,$array_widget_id));
    425                      $wpdb->update($table_name, array('widget_id' => $new_ids), array('id' => $form_id ));
     408                       $new_ids = implode(",", array_diff($form_widget_ids,$array_widget_id));
     409                       $form_status = !empty($list['shortcode_pages']) || !empty($list['block_pages']) ? 'published' : 'draft';
     410                       $wpdb->update($table_name, array('widget_id' => $new_ids, 'status' => $form_status), array('id' => $form_id ));
    426411                     }
    427412                  }
    428413                  }
    429414                  else {
    430                     // Remove blocks where form id has not been selected
     415                    // Remove empty blocks where form id has not been selected
    431416                    unset($widget_block[$key]);
    432417                    update_option('widget_block', $widget_block);
    433418                 }
    434419                 }
     420                 
     421                 // Remove blocks where form id has already been used               
    435422                 if ( !empty($id) && ($key = array_search($id, $widget_forms)) !== false ) {
    436423                   unset($widget_forms[$key]);
    437424                 }
     425                 
    438426               }
     427               
     428               // Check if widget is a simpleform shortcode
    439429               if ( strpos($string,'[simpleform') !== false ) {
    440430                 $split_shortcode = ! empty($string) ? explode('[simpleform', $string) : '';
     
    449439                    $updated_used_ids = array_diff($widget_ids,$array_widget_id);
    450440                    $new_used_in = implode(",", $updated_used_ids);
    451                     $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '$new_used_in' WHERE id = %d", $id) );
     441                    $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '$new_used_in', status = 'published' WHERE id = %d", $id) );
    452442                  }
    453443                 }
     
    461451                  if ( ! in_array($widget_id,$ids) ) {
    462452                  $new_ids = implode(",", array_unique(array_merge($array_widget_id,$ids)));
    463                   $wpdb->update($table_name, array('widget_id' => $new_ids), array('id' => $id ));
     453                  // $wpdb->update($table_name, array('widget_id' => $new_ids), array('id' => $id ));
     454                  $wpdb->update($table_name, array('widget_id' => $new_ids, 'status' => 'published'), array('id' => $id ));
     455                 
     456                 
    464457                  }
    465                   $widget_ids_list = $wpdb->get_results( "SELECT id, widget_id FROM $table_name WHERE id != {$id}", 'ARRAY_A' );
     458                  $widget_ids_list = $wpdb->get_results( "SELECT id, shortcode_pages, block_pages, widget_id FROM $table_name WHERE id != {$id}", 'ARRAY_A' );
    466459                  foreach($widget_ids_list as $list) {
    467460                      $form_id = $list['id'];
     
    469462                     if ( in_array($widget_id,$form_widget_ids) ) {
    470463                     $new_ids = implode(",", array_diff($form_widget_ids,$array_widget_id));
    471                      $wpdb->update($table_name, array('widget_id' => $new_ids), array('id' => $form_id ));
     464                     $form_status = !empty($list['shortcode_pages']) || !empty($list['block_pages']) ? 'published' : 'draft';
     465                     // $wpdb->update($table_name, array('widget_id' => $new_ids), array('id' => $form_id ));
     466                     $wpdb->update($table_name, array('widget_id' => $new_ids, 'status' => $form_status), array('id' => $form_id ));
    472467                     }
    473468                  }
     
    478473                 }
    479474               }
     475               
     476               // Is it necessary to search for "Paragraph", "Custom HTML" and "Preformatted" blocks ?
     477           
    480478            }
    481           }
     479           
     480          }
     481         
    482482          if ( !empty($widget_forms) ) {
    483483            foreach ($form_ids as $form_id) {
    484               if ( in_array($form_id,$widget_forms) ) { 
    485                 $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '' WHERE id = %d", $form_id) );
     484              if ( in_array($form_id,$widget_forms) ) {                 
     485                $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '' WHERE id = %d", $form_id) );               
    486486              }
    487487            }
    488488          }
    489         }
    490         else {                 
    491           foreach ($form_ids as $form_id) {       
    492             $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '' WHERE id = %d", $form_id) );
    493           }
     489         
    494490        }
    495                          
    496        }
    497        
     491       
     492         else {
     493         
     494            foreach ($form_ids as $form_id) {         
     495              // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '' WHERE id = %d", $form_id) );           
     496              $shortcode_pages = $wpdb->get_var( "SELECT shortcode_pages FROM $table_name WHERE id = {$form_id}" );
     497              $block_pages = $wpdb->get_var( "SELECT block_pages FROM $table_name WHERE id = {$form_id}" );
     498              $form_status = empty($shortcode_pages) && empty($block_pages) ? 'draft' : 'published';
     499              $wpdb->query( $wpdb->prepare("UPDATE $table_name SET widget_id = '', status = '$form_status' WHERE id = %d", $form_id) );
     500            }
     501         
     502        }
     503                 
     504      }
     505       
    498506     }     
    499507         
     
    504512     */
    505513   
    506     public function hide_widgets( $sidebars_widgets ) {
    507      
     514    public function hide_widgets( $sidebars_widgets ) {     
     515                
    508516       if ( is_admin() )
    509517       return $sidebars_widgets;
     
    650658     
    651659    }
     660   
     661   
     662    /**
     663     * Attach extra styles to multiple blocks.
     664     */
     665   
     666    public function enqueue_block_styles() {
     667       
     668      // Same args used for wp_enqueue_style().
     669      $args = array(
     670        'handle' => 'sform-block-style',
     671        'src'    => SIMPLEFORM_URL . 'public/css/block-style.css',
     672      );
     673 
     674      wp_enqueue_block_style( 'simpleform/form-selector', $args );
     675
     676    }
    652677   
    653678}
  • simpleform/trunk/admin/class-admin.php

    r2618058 r2664049  
    4848      $contacts = __('Contacts', 'simpleform');           
    4949      $contacts_bubble = apply_filters( 'sform_notification_bubble', $contacts );
    50       $hook = add_menu_page($contacts, $contacts_bubble,'manage_options','sform-submissions', array($this,'display_submissions'),'dashicons-email-alt', 24 );     
     50      $hook = add_menu_page($contacts, $contacts_bubble,'manage_options','sform-entries', array($this,'display_submissions'),'dashicons-email-alt', 24 );     
    5151   
    52       global $sform_submissions;
    53       $submissions = __('Submissions','simpleform');
    54       $sform_submissions = add_submenu_page('sform-submissions', $submissions, $submissions, 'manage_options', 'sform-submissions', array($this,'display_submissions'));
    55 
    56       // global $sform_forms;
     52      global $sform_entries;
     53      $submissions = __('Entries','simpleform');
     54      $sform_entries = add_submenu_page('sform-entries', $submissions, $submissions, 'manage_options', 'sform-entries', array($this,'display_submissions'));
     55
     56      global $sform_forms;
    5757      $forms = __('Forms', 'simpleform');
    58       // $sform_forms = add_submenu_page('sform-submissions', $forms, $forms, 'manage_options', 'sform-forms', array($this,'display_forms'));
     58      $sform_forms = add_submenu_page('sform-entries', $forms, $forms, 'manage_options', 'sform-forms', array($this,'display_forms'));
    5959      // Add screen option tab
    60       // add_action("load-$sform_forms", array ($this, 'forms_list_options') );
    61 
    62       // global $sform_form_page;
    63       $form = __('Form Management', 'simpleform');
    64       // $sform_form_page = add_submenu_page(null, $form, $form, 'manage_options', 'sform-form', array($this,'form_page'));
     60      add_action("load-$sform_forms", array ($this, 'forms_list_options') );
     61
     62      global $sform_form_page;
     63      $form = __('Form', 'simpleform');
     64      $sform_form_page = add_submenu_page(null, $form, $form, 'manage_options', 'sform-form', array($this,'form_page'));
    6565
    6666      global $sform_new;
    6767      $new = __('Add New', 'simpleform');
    68       $sform_new = add_submenu_page('sform-submissions', $new, $new, 'manage_options', 'sform-new', array($this,'display_new'));
     68      $sform_new = add_submenu_page(null, $new, $new, 'manage_options', 'sform-new', array($this,'display_new'));
    6969     
    7070      global $sform_editor;
    7171      /* translators: Used to indicate the form editor not user role */
    7272      $editor = __('Editor', 'simpleform');
    73       $sform_editor = add_submenu_page('sform-submissions', $editor, $editor, 'manage_options', 'sform-editor', array($this,'display_editor'));
     73      $sform_editor = add_submenu_page('sform-entries', $editor, $editor, 'manage_options', 'sform-editor', array($this,'display_editor'));
    7474
    7575      global $sform_settings;
    7676      $settings = __('Settings', 'simpleform');
    77       $sform_settings = add_submenu_page('sform-submissions', $settings, $settings, 'manage_options', 'sform-settings', array($this,'display_settings'));
     77      $sform_settings = add_submenu_page('sform-entries', $settings, $settings, 'manage_options', 'sform-settings', array($this,'display_settings'));
    7878
    7979      global $sform_support;
    8080      $support = __('Support','simpleform-contact-form-submissions');
    81       $sform_support = add_submenu_page('sform-submissions', $support, $support, 'manage_options', 'sform-support', array ($this, 'support_page') );
     81      $sform_support = add_submenu_page('sform-entries', $support, $support, 'manage_options', 'sform-support', array ($this, 'support_page') );
    8282
    8383      do_action('load_submissions_table_options');
     
    9494    public function display_submissions() {
    9595     
    96       include_once('partials/submissions.php');
     96      include_once('partials/entries.php');
    9797   
    9898    }
     
    126126     *
    127127     * @since    2.1
    128      * /
     128     */
    129129     
    130130    public function display_forms() {
     
    138138     *
    139139     * @since    2.1
    140      * /
     140     */
    141141     
    142142    public function form_page() {
     
    178178     wp_register_style('sform-style', plugins_url( 'css/admin-min.css', __FILE__ ),[], filemtime( plugin_dir_path( __FILE__ ) . 'css/admin-min.css' ) );
    179179     
    180      global $sform_submissions;
    181      // global $sform_forms;
    182      // global $sform_form_page;
     180     global $sform_entries;
     181     global $sform_forms;
     182     global $sform_form_page;
    183183     global $sform_editor;
    184184     global $sform_new;
     
    187187     global $pagenow;
    188188       
    189      if( $hook != $sform_submissions /* && $hook != $sform_forms && $hook != $sform_form_page */ && $hook != $sform_editor && $hook != $sform_settings && $hook != $sform_new && $hook != $sform_support && $pagenow != 'widgets.php' )
     189     if( $hook != $sform_entries && $hook != $sform_forms && $hook != $sform_form_page && $hook != $sform_editor && $hook != $sform_settings && $hook != $sform_new && $hook != $sform_support && $pagenow != 'widgets.php' )
    190190     return;
    191191
     
    202202    public function enqueue_scripts($hook){
    203203               
    204      global $sform_submissions;
    205      // global $sform_forms;
    206      // global $sform_form_page;
     204     global $sform_entries;
     205     global $sform_forms;
     206     global $sform_form_page;
    207207     global $sform_editor;
    208208     global $sform_settings;
     
    210210     global $pagenow;
    211211
    212      if( $hook != $sform_submissions /* && $hook != $sform_forms && $hook != $sform_form_page */ && $hook != $sform_editor && $hook != $sform_settings && $hook != $sform_new && $pagenow != 'widgets.php' )
     212     if( $hook != $sform_entries && $hook != $sform_forms && $hook != $sform_form_page && $hook != $sform_editor && $hook != $sform_settings && $hook != $sform_new && $pagenow != 'widgets.php' )
    213213     return;     
    214214     
     
    238238     $page_links = sprintf( __('%1$s or %2$s the page content', 'simpleform'), $edit, $view);
    239239     $smtp_notes = __('Uncheck if you want to use a dedicated plugin to take care of outgoing email', 'simpleform' );
     240     $storing_notice = '<span style="margin-top: -7px; margin-bottom: -7px; color: #32373c; padding: 7px 20px 7px 10px; border-width: 0 0 0 5px; border-style: solid; background: #e5f5fa; border-color: #00a0d2;">' . __('The list of entries refers only to forms for which data storage has been enabled','simpleform') .'</span>';
    240241         
    241242     wp_enqueue_script('sform_saving_options', plugins_url( 'js/admin-min.js', __FILE__ ), array( 'jquery' ), filemtime( plugin_dir_path( __FILE__ ) . 'js/admin-min.js' ) );
    242      wp_localize_script( 'sform_saving_options', 'ajax_sform_settings_options_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ),   'copy' => __( 'Copy shortcode', 'simpleform' ), 'copied' => __( 'Shortcode copied', 'simpleform' ), 'saving' => __( 'Saving data in progress', 'simpleform' ), 'loading' => __( 'Saving settings in progress', 'simpleform' ), 'notes' => __( 'Create a directory inside your active theme\'s directory, name it "simpleform", copy one of the template files, and name it "custom-template.php"', 'simpleform' ), 'bottomnotes' => __( 'Display an error message on bottom of the form in case of one or more errors in the fields','simpleform'), 'topnotes' => __( 'Display an error message above the form in case of one or more errors in the fields','simpleform'), 'nofocus' => __( 'Do not move focus','simpleform'), 'focusout' => __( 'Set focus to error message outside','simpleform'), 'builder' => __( 'Change easily the way your contact form is displayed. Choose which fields to use and who should see them:', 'simpleform' ), 'appearance' => __( 'Tweak the appearance of your contact form to match it better to your site.', 'simpleform' ), 'adminurl' => admin_url(), 'pageurl' => site_url(), 'status' => __( 'Page in draft status not yet published','simpleform'), 'publish' =>  __( 'Publish now','simpleform'), 'edit' => $edit, 'view' => $view, 'pagelinks' => $page_links, 'show' => __( 'Show Configuration Warnings', 'simpleform' ), 'hide' => esc_html__( 'Hide Configuration Warnings', 'simpleform' ), 'cssenabled' => __( 'Create a directory inside your active theme\'s directory, name it "simpleform", add your CSS stylesheet file, and name it "custom-style.css"', 'simpleform' ), 'cssdisabled' => __( 'Keep unchecked if you want to use your personal CSS code and include it somewhere in your theme\'s code without using an additional file', 'simpleform' ), 'jsenabled' => __( 'Create a directory inside your active theme\'s directory, name it "simpleform", add your JavaScript file, and name it "custom-script.js"', 'simpleform' ), 'jsdisabled' => __( 'Keep unchecked if you want to use your personal JavaScript code and include it somewhere in your theme\'s code without using an additional file', 'simpleform' ), 'showcharacters' => __('Keep unchecked if you want to use a generic error message without showing the minimum number of required characters', 'simpleform' ), 'hidecharacters' => __('Keep checked if you want to show the minimum number of required characters and you want to make sure that\'s exactly the number you set for that specific field', 'simpleform' ), 'numnamer' => $name_numeric_error, 'gennamer' => $name_generic_error, 'numlster' => $lastname_numeric_error, 'genlster' => $lastname_generic_error, 'numsuber' => $subject_numeric_error, 'gensuber' => $subject_generic_error, 'nummsger' => $message_numeric_error, 'genmsger' => $message_generic_error, 'privacy' => $privacy_string, 'top' => $top_position, 'bottom' => $bottom_position, 'smtpnotes' => $smtp_notes, 'required' =>  __( '(required)','simpleform'), 'optional' =>  __( '(optional)','simpleform') ));
     243
     244     wp_localize_script( 'sform_saving_options', 'ajax_sform_settings_options_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ),   'copy' => __( 'Copy shortcode', 'simpleform' ), 'copied' => __( 'Shortcode copied', 'simpleform' ), 'saving' => __( 'Saving data in progress', 'simpleform' ), 'loading' => __( 'Saving settings in progress', 'simpleform' ), 'notes' => __( 'Create a directory inside your active theme\'s directory, name it "simpleform", copy one of the template files, and name it "custom-template.php"', 'simpleform' ), 'bottomnotes' => __( 'Display an error message on bottom of the form in case of one or more errors in the fields','simpleform'), 'topnotes' => __( 'Display an error message above the form in case of one or more errors in the fields','simpleform'), 'nofocus' => __( 'Do not move focus','simpleform'), 'focusout' => __( 'Set focus to error message outside','simpleform'), 'builder' => __( 'Change easily the way your contact form is displayed. Choose which fields to use and who should see them:', 'simpleform' ), 'appearance' => __( 'Tweak the appearance of your contact form to match it better to your site.', 'simpleform' ), 'adminurl' => admin_url(), 'pageurl' => site_url(), 'status' => __( 'Page in draft status not yet published','simpleform'), 'publish' =>  __( 'Publish now','simpleform'), 'edit' => $edit, 'view' => $view, 'pagelinks' => $page_links, 'show' => __( 'Show Configuration Warnings', 'simpleform' ), 'hide' => esc_html__( 'Hide Configuration Warnings', 'simpleform' ), 'cssenabled' => __( 'Create a directory inside your active theme\'s directory, name it "simpleform", add your CSS stylesheet file, and name it "custom-style.css"', 'simpleform' ), 'cssdisabled' => __( 'Keep unchecked if you want to use your personal CSS code and include it somewhere in your theme\'s code without using an additional file', 'simpleform' ), 'jsenabled' => __( 'Create a directory inside your active theme\'s directory, name it "simpleform", add your JavaScript file, and name it "custom-script.js"', 'simpleform' ), 'jsdisabled' => __( 'Keep unchecked if you want to use your personal JavaScript code and include it somewhere in your theme\'s code without using an additional file', 'simpleform' ), 'showcharacters' => __('Keep unchecked if you want to use a generic error message without showing the minimum number of required characters', 'simpleform' ), 'hidecharacters' => __('Keep checked if you want to show the minimum number of required characters and you want to make sure that\'s exactly the number you set for that specific field', 'simpleform' ), 'numnamer' => $name_numeric_error, 'gennamer' => $name_generic_error, 'numlster' => $lastname_numeric_error, 'genlster' => $lastname_generic_error, 'numsuber' => $subject_numeric_error, 'gensuber' => $subject_generic_error, 'nummsger' => $message_numeric_error, 'genmsger' => $message_generic_error, 'privacy' => $privacy_string, 'top' => $top_position, 'bottom' => $bottom_position, 'smtpnotes' => $smtp_notes, 'required' =>  __( '(required)','simpleform'), 'optional' =>  __( '(optional)','simpleform'), 'storing_notice' => $storing_notice ));
    243245         
    244246    }
     
    439441         $rows = $wpdb->get_row(" SHOW TABLE STATUS LIKE '$table_shortcodes' ");
    440442         $shortcode_id = $rows->Auto_increment;       
    441          $update_shortcode = $wpdb->insert($table_shortcodes, array('name' => $form_name_value, 'shortcode' => 'simpleform id="'.$shortcode_id.'"', 'target' => $show_for ));
     443         $update_shortcode = $wpdb->insert($table_shortcodes, array('name' => $form_name_value, 'shortcode' => 'simpleform id="'.$shortcode_id.'"', 'target' => $show_for, 'status' => 'draft' ));         
    442444         $update_result = $update_shortcode ? 'done' : '';
    443          
    444       }
     445       }
    445446
    446447       if ( $privacy_link == 'false' ) {
     
    11231124        }
    11241125         
    1125       $new_actions['sform_settings'] = '<a href="' . menu_page_url( 'sform-submissions', false ) . '">' . __('Dashboard', 'simpleform') . '</a> | <a href="' . menu_page_url( 'sform-editor', false ) . '">' . __('Editor', 'simpleform') . '</a> | <a href="' . menu_page_url( 'sform-settings', false ) . '">' . __('Settings', 'simpleform') . '</a> | <a href="'.$url.'" target="_blank">' . __('Addons', 'simpleform') . '</a>';
     1126      $new_actions['sform_settings'] = '<a href="' . menu_page_url( 'sform-entries', false ) . '">' . __('Dashboard', 'simpleform') . '</a> | <a href="' . menu_page_url( 'sform-editor', false ) . '">' . __('Editor', 'simpleform') . '</a> | <a href="' . menu_page_url( 'sform-settings', false ) . '">' . __('Settings', 'simpleform') . '</a> | <a href="'.$url.'" target="_blank">' . __('Addons', 'simpleform') . '</a>';
    11261127      }
    11271128     
     
    11421143   
    11431144        if ( $installed_version != $current_db_version ) {
    1144          
    11451145          require_once SIMPLEFORM_PATH . 'includes/class-activator.php';
    11461146          SimpleForm_Activator::create_db();
    1147          
     1147          SimpleForm_Activator::default_data_entry();         
    11481148        }
    11491149               
     
    12001200                 // Turn it as string and update the value
    12011201                 $new_used_in = implode(',', array_unique(array_merge($id,$shortcode_ids)));
    1202                  $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1202                 // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1203                 $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in', status = 'published' WHERE id = %d", $form_id) );
    12031204               }
    12041205               // Exclude the post ID from the blocks list if inserted
     
    12061207                 $updated_used_in = array_diff($block_ids,$id);
    12071208                 $new_used_in = implode(",", $updated_used_in);
    1208                  $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1209                 // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1210                 $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in', status = 'published' WHERE id = %d", $form_id) );
    12091211               }
    12101212             }
     
    12141216               if ( ! in_array($post_id,$block_ids) ) {
    12151217                  $new_used_in = implode(',', array_unique(array_merge($id,$block_ids)));
    1216                   $wpdb->update($table_name, array('block_pages' => $new_used_in), array('id' => $form_id ));
     1218                  // $wpdb->update($table_name, array('block_pages' => $new_used_in), array('id' => $form_id ));
     1219                  $wpdb->update($table_name, array('block_pages' => $new_used_in, 'status' => 'published'), array('id' => $form_id ));
    12171220               }
    12181221               // Exclude the post ID from the shortcodes list if inserted
     
    12201223                 $updated_used_in = array_diff($shortcode_ids,$id);
    12211224                 $new_used_in = implode(",", $updated_used_in);
    1222                  $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1225                 // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1226                 $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in', status = 'published' WHERE id = %d", $form_id) );
    12231227               }
    12241228             }
     
    12321236               $updated_used_in = array_diff($shortcode_ids,$id);
    12331237               $new_used_in = implode(",", $updated_used_in);
    1234                $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1238               // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1239               $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in', status = 'draft' WHERE id = %d", $form_id) );
    12351240             }
    12361241             if ( in_array($post_id,$block_ids) ) {
    12371242               $updated_used_in = array_diff($block_ids,$id);
    12381243               $new_used_in = implode(",", $updated_used_in);
    1239                $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1244               // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1245               $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in', status = 'draft' WHERE id = %d", $form_id) );
    12401246             }
    12411247               
     
    12471253     
    12481254      // If the post content does not contains simpleform
    1249       else {
     1255      else {
     1256       
     1257        // Check if the post ID is included in the pages list
     1258        if ( in_array($post_id,$sform_pages) ) {
     1259           
     1260          foreach ($form_ids as $form_id) {
     1261            $shortcode_used_in = $wpdb->get_var( "SELECT shortcode_pages FROM $table_name WHERE id = {$form_id}" );
     1262            $shortcode_ids = ! empty($shortcode_used_in) ? explode(',', $shortcode_used_in) : array();           
     1263            $block_used_in = $wpdb->get_var( "SELECT block_pages FROM $table_name WHERE id = {$form_id}" );
     1264            $block_ids = ! empty($block_used_in) ? explode(',',$block_used_in) : array();           
     1265            if ( in_array($post_id,$shortcode_ids) ) {
     1266              $updated_used_in = array_diff($shortcode_ids,$id);
     1267              $new_used_in = implode(",", $updated_used_in);
     1268              // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1269              $form_status = !empty($updated_used_in) || !empty($block_used_in) ? 'published' : 'draft';
     1270              $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in', status = '$form_status'  WHERE id = %d", $form_id) );
     1271            }
     1272            if ( in_array($post_id,$block_ids) ) {
     1273              $updated_used_in = array_diff($block_ids,$id);
     1274              $new_used_in = implode(",", $updated_used_in);
     1275              // $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in' WHERE id = %d", $form_id) );
     1276              $form_status = !empty($updated_used_in) || !empty($shortcode_used_in) ? 'published' : 'draft';
     1277              $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in', status = '$form_status' WHERE id = %d", $form_id) );
     1278            }           
     1279          }
     1280         
     1281          $updated_sform_pages = array_diff($sform_pages,$id);
     1282          update_option('sform_pages',$updated_sform_pages);
    12501283         
    1251         if ( in_array($post_id,$sform_pages) ) {
    1252            $updated_sform_pages = array_diff($sform_pages,$id);
    1253            update_option('sform_pages',$updated_sform_pages);
    12541284        }
    12551285       
    1256         foreach ($form_ids as $form_id) {
    1257           $shortcode_used_in = $wpdb->get_var( "SELECT shortcode_pages FROM $table_name WHERE id = {$form_id}" );
    1258           $shortcode_ids = ! empty($shortcode_used_in) ? explode(',', $shortcode_used_in) : array();           
    1259           $block_used_in = $wpdb->get_var( "SELECT block_pages FROM $table_name WHERE id = {$form_id}" );
    1260           $block_ids = ! empty($block_used_in) ? explode(',',$block_used_in) : array();
    1261           if ( in_array($post_id,$shortcode_ids) ) {
    1262             $updated_used_in = array_diff($shortcode_ids,$id);
    1263             $new_used_in = implode(",", $updated_used_in);
    1264             $wpdb->query( $wpdb->prepare("UPDATE $table_name SET shortcode_pages = '$new_used_in' WHERE id = %d", $form_id) );
    1265           }
    1266           if ( in_array($post_id,$block_ids) ) {
    1267             $updated_used_in = array_diff($block_ids,$id);
    1268             $new_used_in = implode(",", $updated_used_in);
    1269             $wpdb->query( $wpdb->prepare("UPDATE $table_name SET block_pages = '$new_used_in' WHERE id = %d", $form_id) );
    1270           }
    1271         } 
     1286        else {
     1287          // DO NOTHING !!!   
     1288        }
    12721289
    12731290      }
     
    12751292    }
    12761293           
    1277     /**
    1278      * Clean up the post content of any non-existent and redundant form prior to saving it in the database
    1279      *
    1280      * @since    2.0.2
    1281      */
    1282     /*
    1283     public function clean_up_post_content($content) {
    1284          
    1285        $util = new SimpleForm_Util();
    1286        $form_ids = $util->sform_ids();
    1287        
    1288        $used_forms = $util->used_forms($content, $type = 'all');
    1289        // when saved id has slash, ex: "\2\"
    1290        //  update_option('sform_used_forms',$used_forms);
    1291        // Return the duplicate shortcodes
    1292        $duplicates = array_unique(array_diff_key($used_forms,array_unique($used_forms)));
    1293        // Search all simpleform blocks and place all matches in an array
    1294        $search_block = '/<!-- wp:simpleform(.*)\/-->/';
    1295        preg_match_all($search_block, $content, $matches_block);     
    1296        // Search all shortcode blocks and place all matches in an array
    1297        $search_shortcode = '/<!-- wp:shortcode([^>]*)-->(.*?)<!-- \/wp:shortcode -->/s';
    1298        preg_match_all($search_shortcode, $content, $matches_shortcode);
    1299 
    1300        if ( !empty($matches_block) ) {
    1301          foreach ( $matches_block[0] as $block ) {
    1302            // Remove blocks that cannot be displayed
    1303            if ( strpos($block, '\"formDisplay\":false') !== false ) {
    1304               $content = str_replace($block, '', $content);
    1305            }
    1306          }
    1307        }
    1308        if ( !empty($duplicates) ) {
    1309          foreach ($duplicates as $duplicate ) {
    1310            $find = stripslashes($duplicate) != '1' ? '[simpleform id=\"'.stripslashes($duplicate).'\"]' : '[simpleform]';
    1311              // If at least one shortcode block exists
    1312              if ( !empty($matches_shortcode) ) {
    1313                foreach ( $matches_shortcode[0] as $shortcode ) {
    1314                  // Check if the shortcode block is simpleform and it's using one of duplicate IDs
    1315                  if ( strpos($shortcode,$find) !== false ) {
    1316                    $splitted_content = explode($shortcode, $content, 2);
    1317                    // Verify if there is also a classic shortcode and if it has been used before
    1318                    if ( strpos($splitted_content[0],$find) !== false ) {
    1319                       $new_splitted_content = explode($find, $content, 2);
    1320                       // Remove all subsequent blocks
    1321                       $content = $new_splitted_content[0] . $find . str_replace($find, '', str_replace($shortcode, '', $new_splitted_content[1]));
    1322                    }
    1323                    else {
    1324                    // Keep the first block and remove all subsequent blocks and all classic shortcodes where these exist
    1325                    $content = $splitted_content[0] . $shortcode . str_replace($find, '', str_replace($shortcode, '', $splitted_content[1]));
    1326                    }
    1327                   // break;
    1328                  }
    1329                }
    1330              }
    1331              // Verify if at least one classic shortcode exists
    1332                if ( strpos($content,$find) !== false ) {
    1333                   $splitted_content = explode($find, $content, 2);
    1334                   // Keep the first and remove all subsequent
    1335                   $content = $splitted_content[0] . $find . str_replace($find, '', $splitted_content[1]);
    1336                   // break;
    1337                }
    1338          }
    1339        }
    1340        // In the absence of duplicates remove shortcode that is using the same form id inserted after the block
    1341        else {
    1342          if ( !empty($matches_block) ) {             
    1343            foreach ( $matches_block[0] as $block ) {
    1344              if ( strpos($block, '\"formDisplay\":true') !== false ) {
    1345                $split_block = isset(explode('\"formId\":\"', $block)[1]) ? explode('\"formId\":\"', $block)[1] : '';
    1346                $form_id = ! empty($split_block) ? explode('\"', $split_block)[0] : '';
    1347                $find = $form_id != '1' ? '[simpleform id=\"'.$form_id.'\"]' : '[simpleform]';               
    1348                // Remove any shortcode block that is using the same form id
    1349                if ( !empty($matches_shortcode) ) {
    1350                  foreach ( $matches_shortcode[0] as $shortcode ) {
    1351                    if ( strpos($shortcode,$find) !== false ) {
    1352                       $content = str_replace($shortcode, '', $content);
    1353                       break;
    1354                    }
    1355                  }
    1356                }
    1357                // Remove any classic shortcode that is using the same form id
    1358                $content = str_replace($find, '', $content);
    1359              }
    1360            }
    1361          }
    1362        }
    1363        
    1364        // Remove any shortcode using an inesistent form id
    1365        if ( !empty($used_forms) ) {
    1366        foreach ($used_forms as $shortcode_id) {       
    1367           if ( ! in_array(stripslashes($shortcode_id),$form_ids) ) {   
    1368             $find = '[simpleform id=\"'.stripslashes($shortcode_id).'\"]';
    1369             // Search all shortcode blocks and place all matches in an array
    1370             $search_shortcode = '/<!-- wp:shortcode([^>]*)-->(.*?)<!-- \/wp:shortcode -->/s';
    1371             preg_match_all($search_shortcode, $content, $matches_shortcode);
    1372             // If at least one shortcode block exists
    1373             if ( !empty($matches_shortcode) ) {
    1374               foreach ( $matches_shortcode[0] as $shortcode ) {
    1375                 // Check if the shortcode block is simpleform and it's using an inesistent form id
    1376                 if ( strpos($shortcode,$find) !== false ) {
    1377                   // Remove all inesistent blocks
    1378                   $content = str_replace($shortcode, '', $content);
    1379                   break;
    1380                 }
    1381               }
    1382             }
    1383             // Remove all classic shortcodes using an inesistent form id
    1384             $content = str_replace( $find,'', $content );
    1385           }
    1386        }
    1387        }
    1388        
    1389        // Remove empty shortcodes
    1390        $empty_shortcode_blocks = '<!-- wp:shortcode /-->';
    1391        $content = str_replace($empty_shortcode_blocks,'',$content);
    1392        
    1393        return $content;
    1394  
    1395     }
    1396     */
    13971294    /**
    13981295     * Change Admin Color Scheme.
     
    14911388      else {
    14921389        $form_id = isset( $_POST['form-id'] ) ? absint($_POST['form-id']) : '1';
     1390        $form_name = isset($_POST['form-name']) ? sanitize_text_field($_POST['form-name']) : '';
    14931391        global $wpdb;
    14941392        $table = "{$wpdb->prefix}sform_shortcodes";
    1495         $submission_table = "{$wpdb->prefix}sform_submissions";
     1393        $submission_table = "{$wpdb->prefix}sform_submissions";   
     1394       
     1395        $where_submissions = defined('SIMPLEFORM_SUBMISSIONS_NAME') ? "AND object != '' AND object != 'not stored'" : '';
     1396
     1397        $entries = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions");
     1398        $confirmation = isset($_POST['confirmation']) ? sanitize_text_field($_POST['confirmation']) : '';
     1399        $hidden_input = '<input type="hidden" id="confirmation" name="confirmation" value="true">
     1400';
     1401        $entries_message = sprintf( _n( 'The form contains %s message.', 'The form contains %s messages.', $entries ), $entries ) . '&nbsp;' .
     1402       
     1403       //  __( 'Proceeding with the deletion all messages will also be deleted, and can no longer be restored.', 'simpleform' )
     1404         __( 'By Proceeding, all messages will be moved to trash, and hidden from list tables.', 'simpleform' ) . '&nbsp;' . __( 'If it is permanently deleted, all messages will also be permanently deleted.', 'simpleform' ) . '&nbsp;' . __( 'Are you sure you don’t want to move them to another form first?', 'simpleform' );       
     1405       
     1406        if ( $entries && $confirmation == '' ) {
     1407            echo json_encode(array('error' => true, 'message' => $entries_message, 'confirm' => $hidden_input ));
     1408            exit;
     1409         }
     1410       
     1411        if ( !$entries || ( $entries && $confirmation == 'true' ) ) {
     1412       
    14961413        $table_post = $wpdb->prefix . 'posts';
    1497         $pages_list = $wpdb->get_var( "SELECT pages FROM {$table} WHERE id = {$form_id}" );
     1414        // $pages_list = $wpdb->get_var( "SELECT pages FROM {$table} WHERE id = {$form_id}" );
    14981415        $shortcode_pages_list = $wpdb->get_var( "SELECT shortcode_pages FROM {$table} WHERE id = {$form_id}" );
    14991416        $block_pages_list = $wpdb->get_var( "SELECT block_pages FROM {$table} WHERE id = {$form_id}" );
    15001417        $widget = $wpdb->get_var( "SELECT widget FROM {$table} WHERE id = {$form_id} AND widget != 0" );
    15011418        $widget_id = $wpdb->get_var( "SELECT widget_id FROM {$table} WHERE id = {$form_id}" );
    1502         $pages = $pages_list ? explode(',',$pages_list) : array();
     1419        // $pages = $pages_list ? explode(',',$pages_list) : array();
    15031420        $shortcode_pages = $shortcode_pages_list ? explode(',',$shortcode_pages_list) : array();
    15041421        $block_pages = $block_pages_list ? explode(',',$block_pages_list) : array();
    1505         $form_pages = array_unique(array_merge($shortcode_pages,$block_pages,$pages));
    1506         $deletion = $wpdb->query($wpdb->prepare("DELETE FROM {$table} WHERE id = '%d'", $form_id));
     1422        // $form_pages = array_unique(array_merge($shortcode_pages,$block_pages,$pages));
     1423        $form_pages = array_unique(array_merge($shortcode_pages,$block_pages));
     1424        // $deletion = $wpdb->query($wpdb->prepare("DELETE FROM {$table} WHERE id = '%d'", $form_id));
     1425        $deletion = $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->prefix}sform_shortcodes SET relocation = '0', moveto = '0', to_be_moved = '', onetime_moving = '1', previous_status = status, status = 'trash', deletion = '1' WHERE id = '%d'", $form_id) ); 
     1426           
     1427        $img = '<span class="dashicons dashicons-saved"></span>';
    15071428       
    15081429        if ( $deletion ) {
    1509           $post_cleaning = '';
    1510           $wpdb->delete( $submission_table, array( 'form' => $form_id ) );
    1511           $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name = 'sform_{$form_id}_settings' OR option_name = 'sform_{$form_id}_attributes' OR option_name = '_transient_sform_last_{$form_id}_message'" );
     1430
     1431          $post_cleaning = '';
     1432          $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->prefix}sform_submissions SET previous_status = status, status = 'trash', hidden = '1' WHERE form = %d", $form_id) );
     1433         
    15121434          if ( $form_pages ) {
    15131435            foreach ($form_pages as $postID) {
     
    15551477                  if ( $widget_id == 'sform_widget-'.$widget ) {
    15561478                    unset($sidebars_widgets[$sidebar][$index]);
    1557                     update_option('sidebars_widgets', $sidebars_widgets);
     1479                    $cleaning = update_option('sidebars_widgets', $sidebars_widgets);
     1480                    if ( $cleaning ) { $post_cleaning .= 'done'; }
    15581481                  }
    15591482                }
     
    15941517                  if ( $id == $widget_id ) {
    15951518                    unset($sidebars_widgets[$sidebar][$index]);
    1596                     update_option('sidebars_widgets', $sidebars_widgets);
     1519                    $cleaning = update_option('sidebars_widgets', $sidebars_widgets);
     1520                    if ( $cleaning ) { $post_cleaning .= 'done'; }
    15971521                  }
    15981522                }
     
    16021526           
    16031527          if ( ! empty($post_cleaning) ) {
    1604             $message = sprintf( __( 'Form with ID: %s permanently deleted', 'simpleform' ), $form_id ) . '.&nbsp;' . __( 'All the pages containing the form have been cleaned up', 'simpleform' );
    1605             echo json_encode(array('error' => false, 'message' => $message, 'redirect_url' => admin_url('admin.php?page=sform-submissions') ));
     1528             
     1529            $wpdb->update($table, array('shortcode_pages' => '', 'block_pages' => '', 'widget' => '0', 'widget_id' => ''), array('id' => $form_id ));
     1530
     1531            $message = sprintf( __( 'Form "%s" moved to trash. All pages containing the form have been cleaned up.', 'simpleform' ), $form_name );
     1532            echo json_encode(array('error' => false, 'message' => $message, 'img' => $img, 'redirect_url' => admin_url('admin.php?page=sform-forms') ));
    16061533            exit;
    16071534          }
    16081535          else {
    1609             echo json_encode(array('error' => false, 'message' => sprintf( __( 'Form with ID: %s permanently deleted', 'simpleform' ), $form_id ), 'redirect_url' => admin_url('admin.php?page=sform-submissions') ));
     1536            echo json_encode(array('error' => false, 'message' => sprintf( __( 'Form "%s" moved to trash', 'simpleform' ), $form_name ), 'img' => $img, 'redirect_url' => admin_url('admin.php?page=sform-forms') ));
    16101537            exit;
    16111538          }
     
    16131540        }
    16141541        else {
    1615             echo json_encode(array('error' => true, 'message' => __( 'Error occurred deleting the form. Try again!', 'simpleform' ) ));
     1542            echo json_encode(array('error' => true, 'message' => __( 'Oops!', 'simpleform' ) .'<br>'. __( 'Error occurred deleting the form. Try again!', 'simpleform' ) ));
    16161543            exit;
     1544        }
    16171545        }
    16181546        die();
     
    16251553     *
    16261554     * @since    1.0
    1627      * /
     1555     */
    16281556
    16291557    public function forms_list_options() {
     
    16461574     *
    16471575     * @since    2.1
    1648      * /
     1576     */
    16491577
    16501578    public function forms_screen_option($status, $option, $value) {
     
    16591587     *
    16601588     * @since    2.1
    1661      * /
     1589     */
    16621590
    16631591    public function form_post_type() {
     
    16721600     *
    16731601     * @since    2.1
    1674      * /
     1602     */
    16751603   
    16761604    public function contacts_menu_open($parent_file) {
     
    16781606      global $plugin_page;
    16791607
    1680       if ( $plugin_page === 'sform-form' ) {
     1608      if ( $plugin_page === 'sform-form' || $plugin_page === 'sform-new' ) {
    16811609        $plugin_page = 'sform-forms';
    16821610      }
     
    16851613     
    16861614    }
    1687     */ 
     1615   
     1616    /**
     1617     * Edit the form card
     1618     *
     1619     * @since    2.1
     1620     */
     1621   
     1622    public function form_update() {
     1623       
     1624      if( 'POST' !== $_SERVER['REQUEST_METHOD'] ) { die ( 'Security checked!'); }
     1625      if ( ! wp_verify_nonce( $_POST['verification_nonce'], "ajax-verification-nonce")) { exit("Security checked!"); }     
     1626      if ( ! current_user_can('manage_options')) { exit("Security checked!"); }   
     1627   
     1628      else {
     1629       
     1630       $form_id = isset( $_POST['form-id'] ) ? absint($_POST['form-id']) : '1';
     1631       $util = new SimpleForm_Util();     
     1632       $form_ids = $util->sform_ids();
     1633
     1634       if ( ! in_array($form_id, $form_ids) )  {
     1635         
     1636          echo json_encode(array('error' => true, 'redirect' => true,  'url' => admin_url('admin.php?page=sform-forms'), 'message' => __('The form has been permanently deleted', 'simpleform' ) ));
     1637          exit;
     1638         
     1639       }
     1640       
     1641       else  {
     1642
     1643         global $wpdb;
     1644         $table_submissions = $wpdb->prefix . 'sform_submissions';
     1645         $table_shortcodes = $wpdb->prefix . 'sform_shortcodes';
     1646         $relocation = isset($_POST['relocation']) ? true : false;
     1647         $moveto = isset($_POST['moveto']) ? intval($_POST['moveto']) : '0';       
     1648         $to_be_moved = isset($_POST['starting']) ? sanitize_text_field($_POST['starting']) : '';       
     1649         $onetime = isset($_POST['onetime']) ? true : false;
     1650         $restoration = isset($_POST['restore']) ? true : false;
     1651         $deletion = isset($_POST['deletion-form']) ? true : false;
     1652         $form_to_name = isset($_POST['form-to']) ? sanitize_text_field($_POST['form-to']) : '';
     1653         $submissions = isset($_POST['submissions']) ? intval($_POST['submissions']) : '0';       
     1654         $moved_submissions = isset($_POST['moved-submissions']) ? intval($_POST['moved-submissions']) : '0';
     1655         $form_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table_shortcodes WHERE id = '%d'", $form_id) );
     1656         $where_day = 'AND date >= UTC_TIMESTAMP() - INTERVAL 24 HOUR';
     1657         $where_week = 'AND date >= UTC_TIMESTAMP() - INTERVAL 7 DAY';
     1658         $where_month = 'AND date >= UTC_TIMESTAMP() - INTERVAL 30 DAY';
     1659         $where_year = 'AND date >= UTC_TIMESTAMP() - INTERVAL 1 YEAR';
     1660         $where_submissions = defined('SIMPLEFORM_SUBMISSIONS_NAME') ? "AND object != '' AND object != 'not stored'" : '';
     1661         
     1662         if ( esc_attr($form_data->status) == 'trash' ) {
     1663            echo json_encode(array('error' => true, 'message' => __( 'It is not allowed to make changes on a trashed form', 'simpleform' ) ));
     1664            exit;
     1665         }
     1666
     1667         if ( $relocation == true && $moveto != '0' && $to_be_moved == '' ) {
     1668            echo json_encode(array('error' => true, 'message' => __( 'Select messages to be moved', 'simpleform' )  ));
     1669            exit;
     1670         }
     1671         
     1672         if ( $relocation == true && $moveto != '0' && $to_be_moved != '' && $to_be_moved != 'next' && $restoration == true ) {
     1673            echo json_encode(array('error' => true, 'message' => __( 'It is not allowed to move and restore messages at the same time', 'simpleform' ) ));
     1674            exit;
     1675         }
     1676         
     1677         // Check if a moving is running
     1678         if ( $relocation == true && $moveto != '0' && $to_be_moved != '' && $restoration == false ) {           
     1679       
     1680           $update = '';
     1681           
     1682           if ( $to_be_moved != 'next' ) {
     1683               
     1684             switch ($to_be_moved) {
     1685               case $to_be_moved == 'lastyear':
     1686               $where = $where_year;
     1687               // $timestamp_year = time() - (60 * 60 * 24);
     1688               $timestamp_msg = strtotime("-1 year");
     1689               break;
     1690               case $to_be_moved == 'lastmonth':
     1691               $where = $where_month;
     1692               // $timestamp_month = time() - (60 * 60 * 24);
     1693               $timestamp_msg = strtotime("-1 month");
     1694               break;
     1695               case $to_be_moved == 'lastweek':
     1696               $where = $where_week;
     1697               // $timestamp_week = time() - (60 * 60 * 24);
     1698               $timestamp_msg = strtotime("-1 week");
     1699               break;
     1700               case $to_be_moved == 'lastday':
     1701               $where = $where_day;
     1702               // $timestamp_day = time() - (60 * 60 * 24);
     1703               $timestamp_msg = strtotime("-1 day");
     1704               break;
     1705               default: // All messages moved
     1706               $where = '';
     1707               $timestamp_msg = '';
     1708             }
     1709             
     1710             $moving = $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->prefix}sform_submissions SET form = '%d', moved_from = '%d' WHERE form = '%d' $where", $moveto, $form_id, $form_id ) );         
     1711             $update .= $moving ? 'done' : '';
     1712             $message = sprintf( __( 'Messages successfully moved to %s', 'simpleform' ), $form_to_name );
     1713                       
     1714           }
     1715           
     1716
     1717           else {
     1718             $schedule = $wpdb->update($table_shortcodes, array('relocation' => '1', 'moveto' => $moveto, 'to_be_moved' => 'next', 'onetime_moving' => '0', 'deletion' => $deletion ), array('id' => $form_id ));
     1719             
     1720             $update .= $schedule ? 'done' : '';
     1721             $message = sprintf( __( 'Moving to %s successfully scheduled', 'simpleform' ), $form_to_name );
     1722
     1723           }
     1724   
     1725           if ( $update ) {
     1726             
     1727             if ( $to_be_moved != 'next' ) {
     1728               
     1729               $count_all = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions");
     1730               $count_last_day = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_day");
     1731               $count_last_week = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_week");
     1732               $count_last_month = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_month");
     1733               $count_last_year = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_year");
     1734               $option_all = $count_all != $count_last_year /* || ($year + $month + $week + $day) > 1 */ ? '<option value="all">'.__( 'All', 'simpleform' ).'</option>' : '';
     1735               $option_year = $count_last_year > 0 && $count_last_year != $count_last_month ? '<option value="lastyear">'.__( 'Last year', 'simpleform' ).'</option>' : '';
     1736               $option_month = $count_last_month > 0 && $count_last_month != $count_last_week ? '<option value="lastmonth">'.__( 'Last month', 'simpleform' ).'</option>' : '';
     1737               $option_week = $count_last_week > 0 && $count_last_week != $count_last_day ? '<option value="lastweek">'.__( 'Last week', 'simpleform' ).'</option>' : '';
     1738               $option_day = $count_last_day > 0 ? '<option value="lastday">'.__( 'Last day', 'simpleform' ).'</option>' : '';
     1739               $select = '<option value="" selected="selected">'.__( 'Select messages', 'simpleform' ).'</option>'.$option_all.$option_year.$option_month.$option_week.$option_day.'<option value="next">'. __( 'Not received yet', 'simpleform' ).'</option>';
     1740               $count_updated_from = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions");   
     1741               $updated_moved_entries = ($submissions - $count_updated_from) + $moved_submissions;
     1742               // Check if messages had already been moved before for updating data
     1743               $forms = $wpdb->get_results( "SELECT id, entries, moveto, moved_entries FROM {$wpdb->prefix}sform_shortcodes WHERE id != '$form_id'", 'ARRAY_A' );
     1744               
     1745               if ( $forms )  {
     1746                 
     1747                 foreach($forms as $form) {
     1748                 
     1749                   $id = $form['id'];
     1750                   $entries = $form['entries'];
     1751                   $moved = $form['moved_entries'];
     1752                   // $form_status = $form['status'];
     1753                   $form_to = $form['moveto'];
     1754                   // $form_to = !empty($form['moveto']) ? $form['moveto'] : array();
     1755                   $count_moved = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE moved_from = '$id' $where_submissions");
     1756                   $count_entries = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$id' $where_submissions");
     1757                   $update_to = $count_moved == '0' ? '0' : $form_to;
     1758                   // $update_to = $count_moved == '0' ? '' : $form_to;
     1759                   $update_moved = $count_moved == '0' ? '0' : $count_moved;
     1760                   
     1761                   $wpdb->update($table_shortcodes, array('entries' => $count_entries, 'moveto' => $update_to, 'moved_entries' => $update_moved ), array('id' => $id ) );
     1762               
     1763                 }
     1764                 
     1765               }
     1766               
     1767               $be_moved = $onetime == false ? 'next' : '';
     1768               $onetime = $to_be_moved == 'next' || $onetime == false ? false : true;
     1769               $moving_value = $to_be_moved == 'next' || $onetime == false ? '1' : '0';
     1770               $wpdb->update($table_shortcodes, array('relocation' => $moving_value, 'moveto' => $moveto, 'to_be_moved' => $be_moved, 'onetime_moving' => $onetime, 'entries' => $count_updated_from, 'moved_entries' => $updated_moved_entries, 'deletion' => $deletion ), array('id' => $form_id ) );
     1771             
     1772               // Move the last message data to the new form
     1773               $last_form_message = get_option("sform_last_{$form_id}_message");
     1774               
     1775               if ( $last_form_message != false ) {
     1776                 update_option("sform_last_in_{$moveto}_message_{$form_id}", $last_form_message);
     1777               }
     1778               
     1779               // Search all last messages imported from other forms
     1780               $search_last_in = 'sform_last_in_'.$id.'_message_';
     1781               $sql_in = "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '%{$search_last_in}%'";
     1782               $results_in = $wpdb->get_results( $sql_in );
     1783               if ( $results_in ) {
     1784                 $options_to_be_moved = array();
     1785                 foreach ( $results_in as $result_in ) {
     1786                   $from = explode('_message_', $result_in->option_name)[2];
     1787                   $timestamp_in = explode('#', $result_in->option_value)[0];
     1788                   if ( $timestamp_in > $timestamp_msg ) {
     1789                      $options_to_be_moved[] = $result_in;
     1790                   }
     1791                 }
     1792                 if ( !empty($options_to_be_moved) ) { 
     1793                    foreach ( $options_to_be_moved as $option ) {
     1794                      update_option("sform_last_in_{$moveto}_message_{$form_id}_from_{$from}", $option);
     1795
     1796                    }
     1797                 }
     1798               }
     1799               
     1800               $message = $onetime == false ? sprintf( __( 'Messages moved to %s and successfully scheduled', 'simpleform' ), $form_to_name ) : sprintf( __( 'Messages successfully moved to %s', 'simpleform' ), $form_to_name );
     1801
     1802               echo json_encode(array('error' => false, 'update' => true, 'moving' => true, 'onetime' => $onetime, 'messages' => $count_updated_from, 'moved' => $updated_moved_entries, 'select' => $select, 'message' => $message ));
     1803               exit;
     1804                 
     1805             }
     1806             
     1807             else {
     1808                 
     1809               echo json_encode(array('error' => false, 'update' => true, 'moving' => false, 'onetime' => false, 'message' => $message ));
     1810               exit;
     1811             
     1812             }
     1813             
     1814           }
     1815           else {
     1816             
     1817             if ( $to_be_moved != 'next' ) {
     1818               
     1819               $entries = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where");
     1820             
     1821               if ( $entries == '0' ) {   
     1822                 echo json_encode(array('error' => false, 'update' => false, 'message' => __('Messages have already been moved', 'simpleform' ) ));
     1823                 exit;
     1824               }
     1825             
     1826               else {
     1827                 echo json_encode(array('error' => true, 'message' => __('Error occurred moving the messages. Try again!', 'simpleform' ) ));
     1828                 exit;
     1829               }
     1830                 
     1831             }
     1832             
     1833             else {
     1834
     1835               $to_be_moved = esc_attr($form_data->to_be_moved);
     1836               $onetime_moving = esc_attr($form_data->onetime_moving);
     1837
     1838               if ( $to_be_moved == 'next' && $onetime_moving == '0' ) {   
     1839                 echo json_encode(array('error' => false, 'update' => false, 'message' => __('Moving has already been scheduled', 'simpleform' ) ));
     1840                 exit;
     1841               }
     1842             
     1843               else {
     1844                 echo json_encode(array('error' => true, 'message' => __('Error occurred scheduling the moving. Try again!', 'simpleform' ) ));
     1845                 exit;
     1846               }
     1847
     1848             }
     1849             
     1850           }
     1851             
     1852         }
     1853         
     1854         // Check if a restoration is running
     1855         elseif ( $restoration == true ) {
     1856             
     1857           $all_forms_to = $wpdb->get_col( "SELECT DISTINCT form FROM {$wpdb->prefix}sform_submissions WHERE moved_from = '$form_id'" );
     1858           
     1859           $updated_messages = $wpdb->update($table_submissions, array('form' => $form_id, 'moved_from' => '0' ), array('moved_from' => $form_id ) );
     1860
     1861           $last_restored_date = $wpdb->get_var("SELECT date FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' AND moved_from = '0' ORDER BY date DESC LIMIT 1");
     1862           
     1863           if ( $updated_messages ) {
     1864               
     1865             $timestamps = array();
     1866             $last_message = '';
     1867             
     1868             foreach( $all_forms_to as $restored_from ) {
     1869                $count_moved = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$restored_from' $where_submissions");
     1870                $wpdb->update($table_shortcodes, array( 'entries' => $count_moved ), array('id' => $restored_from ) );
     1871               // Delete the last message data moved from the form in which the the messages are restored
     1872               $search_last_message_in = 'sform_last_in_'.$restored_from.'_message_'.$form_id;
     1873               $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '%{$search_last_message_in}%'");
     1874                 
     1875             }
     1876
     1877             $count_restored = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions");
     1878             $count_all = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id'");
     1879             $count_last_day = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_day");
     1880             $count_last_week = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_week");
     1881             $count_last_month = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_month");
     1882             $count_last_year = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = '$form_id' $where_submissions $where_year");
     1883             $option_all = $count_all != $count_last_year /* || ($year + $month + $week + $day) > 1 */ ? '<option value="all">'.__( 'All', 'simpleform' ).'</option>' : '';
     1884             $option_year = $count_last_year > 0 && $count_last_year != $count_last_month ? '<option value="lastyear">'.__( 'Last year', 'simpleform' ).'</option>' : '';
     1885             $option_month = $count_last_month > 0 && $count_last_month != $count_last_week ? '<option value="lastmonth">'.__( 'Last month', 'simpleform' ).'</option>' : '';
     1886             $option_week = $count_last_week > 0 && $count_last_week != $count_last_day ? '<option value="lastweek">'.__( 'Last week', 'simpleform' ).'</option>' : '';
     1887             $option_day = $count_last_day > 0 ? '<option value="lastday">'.__( 'Last day', 'simpleform' ).'</option>' : '';
     1888             $selected = $relocation == true && $moveto != '0' && $to_be_moved == 'next' ? 'selected="selected"' : '';
     1889             $select = '<option value="">'.__( 'Select messages', 'simpleform' ).'</option>'.$option_all.$option_year.$option_month.$option_week.$option_day.'<option value="next" '.$selected.'>'. __( 'Not received yet', 'simpleform' ).'</option>';
     1890             
     1891             // Check if a restoration with sheduling is running
     1892             if ( $relocation == true && $moveto != '0' && $to_be_moved == 'next' ) {
     1893
     1894               $wpdb->update($table_shortcodes, array('relocation' => '1', 'moveto' => $moveto, 'to_be_moved' => 'next', 'entries' => $count_restored, 'moved_entries' => '0', 'onetime_moving' => '0', 'deletion' => $deletion ), array('id' => $form_id ));
     1895
     1896               $message = esc_attr($form_data->onetime_moving) == '0' ? __( 'Messages successfully restored', 'simpleform' ) : sprintf( __( 'Messages restored and moving to %s successfully scheduled', 'simpleform' ), $form_to_name );
     1897   
     1898               echo json_encode(array('error' => false, 'update' => true, 'moving' => false, 'restore' => true, 'onetime' => false, 'messages' => $count_restored, 'moved' => '0', 'select' => $select, 'message' => $message ));
     1899               exit;
     1900             
     1901             }
     1902             
     1903             else {
     1904
     1905               $wpdb->update($table_shortcodes, array( 'relocation' => $relocation, 'moveto' => '0', 'to_be_moved' => '', 'entries' => $count_restored, 'moved_entries' => '0', 'deletion' => $deletion ), array('id' => $form_id ) );
     1906
     1907               echo json_encode(array('error' => false, 'update' => true, 'moving' => false, 'restore' => true, 'messages' => $count_restored, 'moved' => '0', 'select' => $select, 'message' =>  __( 'Messages successfully restored', 'simpleform' ) ));
     1908               exit;
     1909
     1910             }
     1911                 
     1912           }
     1913           
     1914           else {
     1915               
     1916             $check_moved = $wpdb->get_var( $wpdb->prepare( "SELECT moveto FROM {$wpdb->prefix}sform_shortcodes WHERE id = %d", $form_id) );
     1917             $to_be_moved = $wpdb->get_var( $wpdb->prepare( "SELECT to_be_moved FROM {$wpdb->prefix}sform_shortcodes WHERE id = %d", $form_id) );
     1918             $onetime_moving = $wpdb->get_var( $wpdb->prepare( "SELECT onetime_moving FROM {$wpdb->prefix}sform_shortcodes WHERE id = %d", $form_id) );
     1919             
     1920             if ( $check_moved == '0' || ( $check_moved != '0' && isset($to_be_moved) && $to_be_moved == 'next' && $onetime_moving == '0' ) ) {
     1921                echo json_encode(array('error' => false, 'update' => false, 'message' => __('Messages have already been restored', 'simpleform' ) ));
     1922                exit;
     1923             }
     1924             
     1925             else {
     1926                echo json_encode(array('error' => true, 'message' => __('Error occurred restoring the messages. Try again!', 'simpleform' ) ));
     1927                exit;
     1928             }
     1929             
     1930           }
     1931           
     1932         }
     1933
     1934         // It is not running any moving or any restoration 
     1935         else {
     1936           
     1937           $update_form_data = $wpdb->update($table_shortcodes, array('relocation' => $relocation, /* 'moveto' => '0', 'to_be_moved' => '', 'onetime_moving' => '1', */ 'deletion' => $deletion ), array('id' => $form_id ));
     1938       
     1939           if ( $update_form_data ) {
     1940             echo json_encode(array('error' => false, 'update' => true, 'message' => __( 'Settings were successfully saved', 'simpleform' ) ));
     1941             exit;
     1942           }
     1943           else {
     1944             echo json_encode(array('error' => false, 'update' => false, 'message' => __( 'Settings have already been saved', 'simpleform' ) ));
     1945             exit;
     1946           }
     1947           
     1948         }
     1949       
     1950       }
     1951     
     1952       die();
     1953       
     1954      }
     1955
     1956    }
     1957       
     1958    /**
     1959     * Remove all unnecessary parameters leaving the original URL used before performing an action
     1960     *
     1961     * @since   
     1962     */
     1963   
     1964    public function url_cleanup() {
     1965       
     1966      global $sform_forms;
     1967      $screen = get_current_screen();     
     1968      if(!is_object($screen) || $screen->id != $sform_forms)
     1969      return;
     1970     
     1971      $sform_list_table = new SimpleForm_Forms_List();
     1972      $doaction = $sform_list_table->current_action();
     1973     
     1974      if ( $doaction ) {
     1975
     1976          $referer_url = wp_get_referer();
     1977          if ( ! $referer_url ) {
     1978          $referer_url = admin_url( 'admin.php?page=sform-forms' );
     1979          }
     1980         
     1981          $view_arg = explode('&view=', $referer_url)[1];
     1982          $view = isset($view_arg) ? explode('&', $view_arg)[0] : 'all';
     1983          $sform_list_table->prepare_items();
     1984          if ( $view == 'all' ) { $filter_by_view = "status != 'trash'"; }
     1985          if ( $view == 'published' ) { $filter_by_view = "status = 'published'"; }
     1986          if ( $view == 'draft' ) { $filter_by_view = "status = 'draft'"; }
     1987          if ( $view == 'trash' ) { $filter_by_view = "status = 'trash'"; }
     1988          global $wpdb;
     1989          $count = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_shortcodes WHERE $filter_by_view");
     1990          $paged = isset( $_REQUEST['paged'] ) ? absint($_REQUEST['paged']) : '1';       
     1991          $per_page = $sform_list_table->get_items_per_page('edit_form_per_page', 10);
     1992          $total_pages = ceil( $count / $per_page );
     1993          if ( $paged > $total_pages ) { $pagenum = $total_pages; }
     1994          else { $pagenum = $paged; }
     1995
     1996          $url = remove_query_arg( array('view', 'paged', 'action', 'action2', 'id', '_wpnonce', '_wp_http_referer'), $referer_url );
     1997
     1998          if ( $count > 0 ) {
     1999            $url = add_query_arg( 'view', $view, $url );
     2000          }
     2001
     2002          if ( $pagenum > 1 ) {
     2003            $url = add_query_arg( 'paged', $pagenum, $url );
     2004          }
     2005
     2006          wp_redirect($url);
     2007          exit();
     2008     
     2009      }
     2010     
     2011    }
    16882012       
    16892013}
  • simpleform/trunk/admin/class-utilities.php

    r2611270 r2664049  
    4040       $used_forms = array();
    4141       
     42       // Search for any use of SimpleForm as shortcode
    4243       if ($type == 'shortcode') {
    4344         
    44          // Search for any type of simpleform shortcode
    4545         $lastPos = 0;
    4646         $positions = array();
     
    6363       }
    6464
     65       // Search for any use of SimpleForm
    6566       if ($type == 'all') {
    6667               
    67          // Search for any type of simpleform shortcode
     68         // Search for shortcodes
    6869         $lastPos = 0;
    6970         $positions = array();
     
    8485         }
    8586       
    86          // Search for the simpleform blocks
     87         // Search for blocks
    8788         if ( class_exists('SimpleForm_Block') ) {
    8889         if ( has_blocks( $content ) ) {
     
    169170    }
    170171   
     172    /**
     173     * Update forms status
     174     *
     175     * @since    2.1
     176     */
     177
     178    public static function form_status() {
     179
     180       global $wpdb;
     181       $form_ids = $wpdb->get_col( "SELECT id FROM {$wpdb->prefix}sform_shortcodes" );
     182       foreach ($form_ids as $form_id) {           
     183         $shortcode_pages = $wpdb->get_var( "SELECT shortcode_pages FROM {$wpdb->prefix}sform_shortcodes WHERE id = {$form_id}" );
     184         $block_pages = $wpdb->get_var( "SELECT block_pages FROM {$wpdb->prefix}sform_shortcodes WHERE id = {$form_id}" );
     185         $widget_id = $wpdb->get_var( "SELECT widget_id FROM {$wpdb->prefix}sform_shortcodes WHERE id = {$form_id}" );
     186         $form_status = empty($shortcode_pages) && empty($block_pages) && empty($widget_id)? 'draft' : 'published';
     187         $wpdb->query( $wpdb->prepare("UPDATE {$wpdb->prefix}sform_shortcodes SET status = '$form_status' WHERE id = %d", $form_id) );
     188       }
     189 
     190    }
     191       
    171192}
    172193
  • simpleform/trunk/admin/css/admin-min.css

    r2618058 r2664049  
    1 .invisible{visibility:hidden}.removed,.secret,.unseen{display:none!important}#new-release{font-size:13px!important;line-height:1;color:#bbb;padding:14px 0!important;float:left}#new-release a{color:#bbb;text-decoration:none}#new-release .update a{color:#f6866f}.wrap div.error,.wrap div.notice-success{margin:15px 0 10px}.full-width-bar{margin:0 -9999rem;padding:0 9999rem;clear:both}body,html{overflow-x:hidden}.full-width-bar>h1{margin:0}.sform.wrap>h1>div{float:right}h1.title{color:#fff;line-height:36px;font-size:22px;font-weight:500}h1.title>span{display:inline-block;padding:0 20px 0 0;position:relative;vertical-align:sub;font-size:28px;top:1px}.full-width-bar.default,h1.title.default{background-color:#2271b1!important}.full-width-bar.light,h1.title.light{background-color:#04a4cc!important}.full-width-bar.modern,h1.title.modern{background-color:#4664eb!important}.full-width-bar.blue,h1.title.blue{background-color:#e3af55!important}.full-width-bar.coffee,h1.title.coffee{background-color:#c7a589!important}.full-width-bar.ectoplasm,h1.title.ectoplasm{background-color:#a9bd4f!important}.full-width-bar.midnight,h1.title.midnight{background-color:#e35950!important}.full-width-bar.ocean,h1.title.ocean{background-color:#9ebaa0!important}.full-width-bar.sunrise,h1.title.sunrise{background-color:#dd823b!important}.full-width-bar.foggy,h1.title.foggy{background-color:#8993ab!important}.full-width-bar.polar,h1.title.polar{background-color:#fff!important;color:inherit}div.selector{display:inline-block;float:right}#wrap-selector{font-size:.6em;padding-right:10px;float:left}.form-selector{float:right;padding:0;top:0}select#form{line-height:34px;vertical-align:top}select#form.default{border-color:rgb(34 113 177 / 25%)}select#form.light{border-color:rgb(4 164 204 / 25%)}select#form.modern{border-color:rgb(56 88 233 / 25%)}select#form.blue{border-color:rgb(9 100 132 / 25%)}select#form.coffee{border-color:rgb(199 165 137 / 25%)}select#form.ectoplasm{border-color:rgb(163 183 69 / 25%)}select#form.midnight{border-color:rgb(225 77 67 / 25%)}select#form.ocean{border-color:rgb(158 186 160 / 25%)}select#form.sunrise{border-color:rgb(221 130 59 / 25%)}select#form.foggy{border-color:rgb(34 113 177 / 25%)}select#form.polar{border-color:#8993ab}select.default:focus,select.default:hover{color:#2271b1;border-color:#2271b1;box-shadow:none}select.light:focus,select.light:hover{color:#04a4cc;border-color:#04a4cc;box-shadow:none}select.modern:focus,select.modern:hover{color:#3858e9;border-color:#3858e9;box-shadow:none}select.blue:focus,select.blue:hover{color:#2271b1;border-color:#2271b1;box-shadow:none}select.coffee:focus,select.coffee:hover{color:#2271b1;border-color:#c7a589;box-shadow:none}select.ectoplasm:focus,select.ectoplasm:hover{color:#2271b1;border-color:#a3b745;box-shadow:none}select.midnight:focus,select.midnight:hover{color:#2271b1;border-color:#e14d43;box-shadow:none}select.ocean:focus,select.ocean:hover{color:#2271b1;border-color:#9ebaa0;box-shadow:none}select.sunrise:focus,select.sunrise:hover{color:#dd823b;border-color:#dcdfe6;box-shadow:none}select.foggy:focus,select.foggy:hover{color:#2271b1;border-color:#2271b1;box-shadow:none}select.polar:focus,select.polar:hover{color:#53a0de;border-color:#53a0de;box-shadow:none}#page-description{padding:10px 0}.notice.trwidget{margin-top:30px}#editor-tabs,#settings-tabs{margin-left:15px;position:relative;right:0;left:0;min-height:35px;font-size:0;z-index:1;border-bottom:0}.nav-tab{padding:5px 25px;margin-left:5px;border-bottom:none!important;color:#8993ab!important;background:#dcdfe6}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:hover,.nav-tab.nav-tab-active:hover{background:#fff!important;color:#8993ab!important;border-bottom:1px solid #fff!important;margin-bottom:-1px}.nav-tab:focus,.nav-tab:hover{background-color:#8993ab;color:#fff!important;cursor:pointer}a .dashicons{line-height:26px;transition:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;text-decoration:none}#editor-tabs a,#settings-tabs a{position:relative;display:inline-block;margin:0;border-bottom:0;margin-bottom:-1px;text-decoration:none;transition:none;-webkit-transition:none;-moz-transition:none;-o-transition:none}#editor-tabs a.form-button,#settings-tabs a.form-button{margin-right:0;float:right}#editor-tabs a.last,#settings-tabs a.last{margin-right:0!important}.form-button{background:#dcdfe6;color:#8993ab;border-bottom:none!important;border:1px solid #dcdfe6;line-height:25px}.form-button:focus{box-shadow:none;outline:0}.form-button>span{white-space:nowrap}.form-button>span>span.text{margin-left:5px}.form-button.default:hover{background:#f0f0f1;color:#2271b1}.form-button.light:hover{background:#f0f0f1;color:#04a4cc}.form-button.modern:hover{background:#f0f0f1;color:#3858e9}.form-button.blue:hover{background:#f0f0f1;color:#096484}.form-button.coffee:hover{background:#59524c;color:#fff}.form-button.ectoplasm:hover{background:#f0f0f1;color:#829237}.form-button.midnight:hover{background:#f0f0f1;color:#d02c21}.form-button.ocean:hover{background:#738e96;color:#fff}.form-button.sunrise:hover{background:#f0f0f1;color:#dd823b}.form-button.foggy:hover{background:#2271b1;color:#fff}.form-button.polar:hover{background:#53a0de;color:#fff}#attributes,#settings{background:#fff;padding-top:25px}.options-heading span{cursor:pointer}.options-heading span span{padding-left:10px}.toggle.dashicons{color:#dcdfe6}.dashicons-arrow-up-alt2:hover{color:#f6866f}.dashicons-arrow-down-alt2:hover{color:#9bcc79}.options-heading.closed{margin-bottom:1.85em}.icon-button{color:#dcdfe6;font-size:26px;margin:-3px 0;float:right}.icon-button.default:hover{color:#2271b1}.icon-button.light:hover{color:#04a4cc}.icon-button.modern:hover{color:#3858e9}.icon-button.blue:hover{color:#096484}.icon-button.coffee:hover{color:#59524c}.icon-button.ectoplasm:hover{color:#a3b745}.icon-button.midnight:hover{color:#e14d43}.icon-button.ocean:hover{color:#738e96}.icon-button.sunrise:hover{color:#dd823b}.icon-button.foggy:hover{color:#72aee6}.icon-button.polar:hover{color:#53a0de}.settings-page.button,.widgets-page.button{text-align:center;float:right;margin-top:15px!important;padding:0 10px;border-radius:3px;font-size:13px;font-weight:600;cursor:pointer}.section.admin.collapsed,.section.akismet.collapsed,.section.auto.collapsed,.section.custom.collapsed,.section.fields.collapsed,.section.formdescription.collapsed,.section.formfields.collapsed,.section.layout.collapsed,.section.notification.collapsed,.section.recaptcha.collapsed,.section.rules.collapsed,.section.sending.collapsed,.section.smtp.collapsed,.section.spam.collapsed,.section.specifics.collapsed,.section.storage.collapsed,.section.style.collapsed,.section.submission.collapsed,.section.success.collapsed,.section.uninstall.collapsed{font-size:0;margin:0;opacity:0;padding:0;max-height:0;overflow:hidden;transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s;-webkit-transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s;-moz-transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s;-o-transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s}.section.admin,.section.akismet,.section.custom,.section.formdescription,.section.layout,.section.rules,.section.sending,.section.spam,.section.style,.section.submission,.section.success,.section.uninstall{max-height:800px;transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s;-webkit-transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s;-moz-transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s;-o-transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s}.section.auto,.section.notification,.section.recaptcha,.section.smtp,.section.specifics,.section.storage{max-height:1500px;transition:max-height 1.25s linear,opacity 1.5s,font-size 1.5s,margin 1.5s,padding 1.5s}.section.fields{max-height:3500px;transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s;-webkit-transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s;-moz-transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s;-o-transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s}.section.formfields{max-height:5500px;transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s;-webkit-transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s;-moz-transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s;-o-transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s}th>span{cursor:default}.switch-box{display:inline-table;width:100%;position:relative;height:20px;line-height:20px}.switch-input{position:relative;display:inline-block;float:left;margin-right:10px;width:40px;height:20px}.switch-input input{top:2px;left:4px;margin:0;position:absolute;opacity:0!important;width:20px;height:20px}.switch-input input:active+span{outline:0;box-shadow:none}.switch-label{display:inline-block;vertical-align:middle;width:calc(100% - 50px)}.switch-input input+span{position:absolute;z-index:1;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#dcdfe6;-webkit-transition:.4s;transition:.4s;-moz-transition:.4s;-o-transition:.4s;border-radius:20px;border:2px solid #dcdfe6}.switch-input input+span:before{position:absolute;content:"";height:16px;width:16px;background-color:#fff;-webkit-transition:.4s;transition:.4s;-moz-transition:.4s;-o-transition:.4s;border-radius:50%}.switch-input input:checked+span:before{-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}label.multiselect{position:relative;cursor:pointer;display:inline-block;padding-left:34px;line-height:24px;margin-right:10px;margin-bottom:10px}label.multiselect.last{margin-right:0}input[type=checkbox].multiselect{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark{position:absolute;cursor:pointer;top:0;left:0;height:20px;width:20px;border-radius:4px;background-color:#dcdfe6;border:2px solid #dcdfe6}.checkmark:after{left:7px;top:2px;width:4px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);content:"";position:absolute;display:none}input[type=checkbox]:checked+.checkmark{background-color:#0d6efd;border:2px solid #0d6efd}input[type=checkbox]:checked+.checkmark:after{display:block}#columns-description.description{margin-top:-3px}form.default .switch-input input:checked+span,form.default input[type=checkbox]:checked+.checkmark{background:#2271b1;border:2px solid #2271b1}form.default .switch-input input:active+span{outline:0;box-shadow:none}form.light .switch-input input:checked+span,form.light input[type=checkbox]:checked+.checkmark{background:#04a4cc;border:2px solid #04a4cc}form.light .switch-input input:active+span{outline:0;box-shadow:none}form.modern .switch-input input:checked+span,form.modern input[type=checkbox]:checked+.checkmark{background:#3858e9;border:2px solid #3858e9}form.modern .switch-input input:active+span{outline:0;box-shadow:none}form.blue .switch-input input:checked+span,form.blue input[type=checkbox]:checked+.checkmark{background:#096484;border:2px solid #096484}form.blue .switch-input input:active+span{outline:0;box-shadow:none}form.coffee .switch-input input:checked+span,form.coffee input[type=checkbox]:checked+.checkmark{background:#c7a589;border:2px solid #c7a589}form.coffee .switch-input input:active+span{outline:0;box-shadow:none}form.ectoplasm .switch-input input:checked+span,form.ectoplasm input[type=checkbox]:checked+.checkmark{background:#a3b745;border:2px solid #a3b745}form.ectoplasm .switch-input input:active+span{outline:0;box-shadow:none}form.midnight .switch-input input:checked+span,form.midnight input[type=checkbox]:checked+.checkmark{background:#e14d43;border:2px solid #e14d43}form.midnight .switch-input input:active+span{outline:0;box-shadow:none}form.ocean .switch-input input:checked+span,form.ocean input[type=checkbox]:checked+.checkmark{background:#9ebaa0;border:2px solid #9ebaa0}form.ocean .switch-input input:active+span{outline:0;box-shadow:none}form.sunrise .switch-input input:checked+span,form.sunrise input[type=checkbox]:checked+.checkmark{background:#dd823b;border:2px solid #dd823b}form.sunrise .switch-input input:active+span{outline:0;box-shadow:none}form.foggy .switch-input input:checked+span,form.foggy input[type=checkbox]:checked+.checkmark{background:#2271b1;border:2px solid #2271b1}form.foggy .switch-input input:active+span{outline:0;box-shadow:none}form.polar .switch-input input:checked+span,form.polar input[type=checkbox]:checked+.checkmark{background:#53a0de;border:2px solid #53a0de}form.polar .switch-input input:active+span{outline:0;box-shadow:none}input[type=radio]{border:2px solid #dcdfe6;height:18px;width:18px;margin-top:-3px!important;margin-right:10px!important}form.default input[type=radio]:checked,form.foggy input[type=radio]:checked{background:#2271b1;border-color:#2271b1}form.default input[type=radio]:active,form.default input[type=radio]:focus,form.foggy input[type=radio]:active,form.foggy input[type=radio]:focus{border-color:#2271b1;outline:0;box-shadow:none}form.light input[type=radio]:active,form.light input[type=radio]:focus{border-color:#04a4cc;outline:0;box-shadow:none}form.light input[type=radio]:checked{background:#04a4cc;border-color:#04a4cc}form.modern input[type=radio]:active,form.modern input[type=radio]:focus{border-color:#3858e9;outline:0;box-shadow:none}form.modern input[type=radio]:checked{background:#3858e9;border-color:#3858e9}form.blue input[type=radio]:active,form.blue input[type=radio]:focus{border-color:#096484;outline:0;box-shadow:none}form.blue input[type=radio]:checked{background:#096484;border-color:#096484}form.coffee input[type=radio]:active,form.coffee input[type=radio]:focus{border-color:#c7a589;outline:0;box-shadow:none}form.coffee input[type=radio]:checked{background:#c7a589;border-color:#c7a589}form.ectoplasm input[type=radio]:active,form.ectoplasm input[type=radio]:focus{border-color:#a3b745;outline:0;box-shadow:none}form.ectoplasm input[type=radio]:checked{background:#a3b745;border-color:#a3b745}form.midnight input[type=radio]:active,form.midnight input[type=radio]:focus{border-color:#e14d43;outline:0;box-shadow:none}form.midnight input[type=radio]:checked{background:#e14d43;border-color:#e14d43}form.ocean input[type=radio]:active,form.ocean input[type=radio]:focus{border-color:#9ebaa0;outline:0;box-shadow:none}form.ocean input[type=radio]:checked{background:#9ebaa0;border-color:#9ebaa0}form.sunrise input[type=radio]:active,input[type=radio]:focus{border-color:#dd823b;outline:0;box-shadow:none}form.sunrise input[type=radio]:checked{background:#dd823b;border-color:#dd823b}form.polar input[type=radio]:active,form.polar input[type=radio]:focus{border-color:#53a0de;outline:0;box-shadow:none}form.polar input[type=radio]:checked{background:#53a0de;border-color:#53a0de}input[type=radio]:checked::before{background-color:#fff}.form-table td fieldset label{margin-right:20px!important}textarea{height:230px!important;width:100%;padding:10px 15px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#fff!important;border:2px solid #dcdfe6;font-size:14px!important;line-height:24px!important;color:#444}textarea.description{height:148px!important}textarea.labels{height:100px!important}input.sform{width:100%}input.sform[type=number]{width:90px!important;text-align:center}form.default input[type=number]:focus,form.default input[type=text]:focus,form.default select.sform:focus,form.default textarea:focus{border:2px solid #2271b1!important;border-color:#2271b1;outline:0;box-shadow:none}form.light input[type=number]:focus,form.light input[type=text]:focus,form.light select.sform:focus,form.light textarea:focus{border:2px solid #04a4cc!important;border-color:#04a4cc;outline:0;box-shadow:none}form.modern input[type=number]:focus,form.modern input[type=text]:focus,form.modern select.sform:focus,form.modern textarea:focus{border:2px solid #3858e9!important;border-color:#3858e9;outline:0;box-shadow:none}form.blue input[type=number]:focus,form.blue input[type=text]:focus,form.blue select.sform:focus,form.blue textarea:focus{border:2px solid #096484!important;border-color:#096484;outline:0;box-shadow:none}form.coffee input[type=number]:focus,form.coffee input[type=text]:focus,form.coffee select.sform:focus,form.coffee textarea:focus{border:2px solid #c7a589!important;border-color:#c7a589;outline:0;box-shadow:none}form.ectoplasm input[type=number]:focus,form.ectoplasm input[type=text]:focus,form.ectoplasm select.sform:focus,form.ectoplasm textarea:focus{border:2px solid #a3b745!important;border-color:#a3b745;outline:0;box-shadow:none}form.midnight input[type=number]:focus,form.midnight input[type=text]:focus,form.midnight select.sform:focus,form.midnight textarea:focus{border:2px solid #e14d43!important;border-color:#e14d43;outline:0;box-shadow:none}form.ocean input[type=number]:focus,form.ocean input[type=text]:focus,form.ocean select.sform:focus,form.ocean textarea:focus{border:2px solid #9ebaa0!important;border-color:#9ebaa0;outline:0;box-shadow:none}form.sunrise input[type=number]:focus,form.sunrise input[type=text]:focus,form.sunrise select.sform:focus,form.sunrise textarea:focus{border-color:#dd823b;border:2px solid #dd823b!important;color:#dd823b;outline:0;box-shadow:none}form.foggy input[type=number]:focus,form.foggy input[type=text]:focus,form.foggy select.sform:focus,form.foggy textarea:focus{border:2px solid #2271b1!important;border-color:#2271b1;outline:0;box-shadow:none}form.polar input[type=number]:focus,form.polar input[type=text]:focus,form.polar select.sform:focus,form.polar textarea:focus{border:2px solid #53a0de;border-color:#53a0de;outline:0;box-shadow:none}input.sform[type=number],input.sform[type=text],select.sform{height:42px!important;padding:10px 15px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#fff!important;border:2px solid #dcdfe6;font-size:14px!important;line-height:24px!important;color:#444}select.sform{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:2px 20px 2px 8px!important;padding-right:30px!important}form.default select.sform:focus,form.default select.sform:hover{color:#2271b1}form.light select.sform:focus,form.light select.sform:hover{color:#04a4cc}form.modern select.sform:focus,form.modern select.sform:hover{color:#3858e9}form.blue select.sform:focus,form.modern blue.sform:hover{color:#2271b1}form.coffee select.sform:focus,form.coffee select.sform:hover{color:#2271b1}form.ectoplasm select.sform:focus,form.ectoplasm select.sform:hover{color:#2271b1}form.midnight select.sform:focus,form.midnight select.sform:hover{color:#2271b1}form.ocean select.sform:focus,form.ocean select.sform:hover{color:#2271b1}form.sunrise select.sform:hover{color:#dd823b}form.foggy select.sform:focus,form.foggy select.sform:hover{color:#2271b1}form.polar select.sform:focus,form.polar select.sform:hover{color:#53a0de}td>p.description{margin-bottom:-2px;letter-spacing:-.6px}#deletion-toggle.default,#smpt-warnings.default,form.default .privacy-setting.button,form.default .settings-page.button,form.default .widgets-page.button,span.default.button.unavailable{color:#2271b1;border-color:#2271b1}#deletion-toggle.light,#smpt-warnings.light,form.light .privacy-setting.button,form.light .settings-page.button,form.light .widgets-page.button,span.light.button.unavailable{color:#04a4cc;border-color:#04a4cc}#deletion-toggle.modern,#smpt-warnings.modern,form.modern .privacy-setting.button,form.modern .settings-page.button,form.modern .widgets-page.button,span.modern.button.unavailable{color:#3858e9;border-color:#3858e9}#deletion-toggle.blue,#smpt-warnings.blue,form.blue .privacy-setting.button,form.blue .settings-page.button,form.blue .widgets-page.button,span.blue.button.unavailable{color:#096484;border-color:#096484}#deletion-toggle.coffee,#smpt-warnings.coffee,form.coffee .privacy-setting.button,form.coffee .settings-page.button,form.coffee .widgets-page.button,span.coffee.button.unavailable{color:#2271b1;border-color:#2271b1}#deletion-toggle.coffee:hover,#smpt-warnings.coffee:hover,form.coffee .privacy-setting.button:hover,form.coffee .settings-page.button:hover,form.coffee .widgets-page.button:hover,span.coffee.button.unavailable:hover{color:#fff;border-color:#59524c;background-color:#59524c}#deletion-toggle.ectoplasm,#smpt-warnings.ectoplasm,form.ectoplasm .privacy-setting.button,form.ectoplasm .settings-page.button,form.ectoplasm .widgets-page.button,span.ectoplasm.button.unavailable{color:#a3b745;border-color:#a3b745}#deletion-toggle.ectoplasm:hover,#smpt-warnings.ectoplasm:hover,form.ectoplasm .privacy-setting.button:hover,form.ectoplasm .settings-page.button:hover,form.ectoplasm .widgets-page.button:hover,span.ectoplasm.button.unavailable:hover{color:#829237;border-color:#829237}#deletion-toggle.midnight,#smpt-warnings.midnight,form.midnight .privacy-setting.button,form.midnight .settings-page.button,form.midnight .widgets-page.button,span.midnight.button.unavailable{color:#e14d43;border-color:#e14d43}#deletion-toggle.midnight:hover,#smpt-warnings.midnight:hover,form.midnight .privacy-setting.button:hover,form.midnight .settings-page.button:hover,form.midnight .widgets-page.button:hover,span.midnight.button.unavailable:hover{color:#d02c21;border-color:#d02c21}#deletion-toggle.ocean,#smpt-warnings.ocean,form.ocean .privacy-setting.button,form.ocean .settings-page.button,form.ocean .widgets-page.button,span.ocean.button.unavailable{color:#2271b1;border-color:#2271b1}#deletion-toggle.ocean:hover,#smpt-warnings.ocean:hover,form.ocean .privacy-setting.button:hover,form.ocean .settings-page.button:hover,form.ocean .widgets-page.button:hover,span.ocean.button.unavailable:hover{color:#fff;border-color:#0a4b78;background-color:#738e96}#deletion-toggle.sunrise,#smpt-warnings.sunrise,form.sunrise .privacy-setting.button,form.sunrise .settings-page.button,form.sunrise .widgets-page.button,span.sunrise.button.unavailable{color:#dd823b;border-color:#dd823b}#deletion-toggle.foggy,#smpt-warnings.foggy,form.foggy .privacy-setting.button,form.foggy .settings-page.button,form.foggy .widgets-page.button,span.foggy.button.unavailable{color:#72aee6;border-color:#72aee6}#deletion-toggle.polar,#smpt-warnings.polar,form.polar .privacy-setting.button,form.polar .settings-page.button,form.polar .widgets-page.button,span.polar.button.unavailable{color:#53a0de;border-color:#53a0de}#deletion-toggle.polar:hover,#smpt-warnings.polar:hover,form.polar .privacy-setting.button:hover,form.polar .settings-page.button:hover,form.polar .widgets-page.button:hover,span.polar.button.unavailable:hover{color:#fff;background-color:#53a0de}select.sform:disabled:hover{color:#a7aaad!important}.switch-input input:disabled+span{cursor:default;box-shadow:none!important}label.disabled{cursor:default}.switch-input input:disabled:checked+span{opacity:.7}input[type=radio]:disabled,input[type=radio]:disabled:checked{cursor:default;box-shadow:none!important}input[type=radio]:disabled:active,input[type=radio]:disabled:focus{border-color:#dcdfe6!important}input[type=radio]:disabled:active:checked,input[type=radio]:disabled:focus:checked{border-color:#53a0de!important}#submit-wrap{margin:0 auto;text-align:center;padding:0 40px 100px}#alert-wrap{position:relative}#noscript{position:absolute;left:0;right:0;color:#fff;border-radius:8px;background:#dc3545;margin:0 75px 25px;line-height:30px;height:30px;padding:9px}#message-wrap{visibility:hidden;color:#909090;border-radius:8px;background:#f2f2f2;margin:0 75px 38px;line-height:30px;height:30px;padding:9px}#message-wrap.error{background:#f6866f;border:0;color:#fff}#message-wrap.success{background:#9bcc79;color:#fff}#message-wrap.unchanged{background:#f8cd5e;color:#fff}#message-wrap.seen{visibility:visible}.submit-button{padding:5px 12px;outline:0;border-radius:8px;font-size:13px;text-transform:uppercase;cursor:pointer;line-height:2.15384615;min-height:30px;border:none}form.default .submit-button{background:#2271b1;color:#fff}form.default .submit-button:hover{background:#135e96;color:#fff}form.default .submit-button:active{background:#135e96;color:#fff}form.light .submit-button{background:#04a4cc;color:#fff}form.light .submit-button:hover{background:#04b0db;color:#fff}form.light .submit-button:active{background:#0490b3;color:#fff}form.modern .submit-button{background:#3858e9;color:#fff}form.modern .submit-button:hover{background:#4664eb;color:#fff}form.modern .submit-button:active{background:#2145e6;color:#fff}form.blue .submit-button{background:#e1a948;color:#fff}form.blue .submit-button:hover{background:#e3af55;color:#fff}form.blue .submit-button:active{background:#dd9f32;color:#fff}form.coffee .submit-button{background:#c7a589;color:#fff}form.coffee .submit-button:hover{background:#ccad93;color:#fff}form.coffee .submit-button:active{background:#bf9878;color:#fff}form.ectoplasm .submit-button{background:#a3b745;color:#fff}form.ectoplasm .submit-button:hover{background:#a9bd4f;color:#fff}form.ectoplasm .submit-button:active{background:#93a43e;color:#fff}form.midnight .submit-button{background:#e14d43;color:#fff}form.midnight .submit-button:hover{background:#e35950;color:#fff}form.midnight .submit-button:active{background:#dd382d;color:#fff}form.ocean .submit-button{background:#9ebaa0;color:#fff}form.ocean .submit-button:hover{background:#a7c0a9;color:#fff}form.ocean .submit-button:active{background:#8faf91;color:#fff}form.sunrise .submit-button{background:#dd823b;color:#fff}form.sunrise .submit-button:hover{background:#c36922;color:#fff}form.sunrise .submit-button:active{background:#d97426;color:#fff}form.foggy .submit-button{background:#2271b1;color:#fff}form.foggy .submit-button:hover{background:#135e96;color:#fff}form.foggy .submit-button:active{background:#135e96;color:#fff}form.polar .submit-button{background:#53a0de;color:#fff}form.polar .submit-button:hover{background:#77b4e5;color:#fff}form.polar .submit-button:active{background:#318dd7;color:#fff}span.button.unavailable{float:left;margin-right:10px}span.button.unavailable a{color:#fff;text-decoration:none}span.button.unavailable:hover a{color:#fff}#set-page-icon.default:hover,span.default.button.unavailable a{color:#2271b1}#set-page-icon.light:hover,span.light.button.unavailable a{color:#04a4cc}#set-page-icon.modern:hover,span.modern.button.unavailable a{color:#3858e9}#set-page-icon.blue:hover,span.blue.button.unavailable a{color:#096484}#set-page-icon.coffee:hover,span.coffee.button.unavailable a{color:#2271b1}span.coffee.button.unavailable:hover a{color:#fff}#set-page-icon.ectoplasm:hover,span.ectoplasm.button.unavailable a{color:#a3b745}span.ectoplasm.button.unavailable:hover a{color:#829237}#set-page-icon.midnight:hover,span.midnight.button.unavailable a{color:#e14d43}#set-page-icon.ocean:hover,span.ocean.button.unavailable a{color:#2271b1}span.ocean.button.unavailable:hover a{color:#fff}#set-page-icon.sunrise:hover,span.sunrise.button.unavailable a{color:#dd823b}#set-page-icon.foggy:hover,span.foggy.button.unavailable a{color:#72aee6}#set-page-icon.polar:hover,span.polar.button.unavailable a{color:#53a0de}span.polar.button.unavailable:hover a{color:#fff}.publish-link{text-decoration:none;color:#9ccc79}.publish-link:hover{color:#9ccc79}input[placeholder]{text-overflow:ellipsis}::-moz-placeholder{text-overflow:ellipsis}input:-moz-placeholder{text-overflow:ellipsis}.head-bracket{font-style:italic;font-weight:400;padding-left:10px}#shortcode-copy{margin-left:5px;border:none;outline:0;background-color:transparent;line-height:inherit;width:40px;height:40px;padding:8px;border-radius:40px;cursor:pointer}#shortcode-copy:hover{background-color:#eee!important}#shortcode-copy:active{background-color:#dcdfe6!important}#shortcode-copy img{vertical-align:middle;width:24px}#shortcode-tooltip{background-color:#8993ab;display:none;color:#fff!important;padding:4px 7px;border-radius:5px;font-size:.75rem;margin-left:5px}.widgets-page.button{text-align:center;float:right;margin-top:6px!important;border-radius:4px;font-size:.9em;font-weight:600;cursor:pointer}.slug{margin-left:10px}.privacy-setting.button{text-align:center;float:none;margin-top:6px!important;border-radius:4px;font-size:.9em;font-weight:600;cursor:pointer}#label-error,.privacy-setting{margin-left:10px!important}#label-error-top{margin-left:10px!important;font-weight:400!important;color:#f6866f}#set-page-icon{float:right;margin-top:-17px;cursor:pointer}#post-status{margin-right:25px}span.description.left{font-size:13px;font-style:italic;padding-left:10px}#form-borders{margin-left:20px}#smpt-warnings{margin-top:15px!important;font-size:13px;text-align:center;float:right;border-radius:4px;font-weight:400;cursor:pointer}tr.smpt-warnings{background-color:#e4e7ec}div.description h4{margin:1.3em 0}tr.smpt-warnings>td{padding:18px 41px 30px 36px;vertical-align:none;border-width:0 0 0 5px;border-style:solid;background:#e5f5fa;border-color:#00a0d2}.description pre{white-space:pre-wrap}#smpt-warnings:hover{background:#f0f0f1}.notice-toggle{white-space:nowrap}.submission-notice>.notice{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:15px}#submissions-data{padding:0;display:flex}#submissions-data li{float:left;padding:20px 0;width:19%;text-align:center;background:#dcdfe6;opacity:.65;padding-bottom:26px}#submissions-data li:hover{opacity:1}.type{margin-right:1.25%}.label{color:#666;text-transform:uppercase;font-size:.8em}.value{display:block;clear:both;font-size:2em;font-weight:300;line-height:40px}#empty-submission,#last-submission,#submissions-notice{padding:30px 30px 50px;margin-top:20px;background:#fff}#empty-submission h3,#last-submission h3,#submissions-notice h3{line-height:30px}#deletion-notice{padding:5px 30px 30px;margin-top:30px;background:#eb8a84;color:#fff}#deletion-notice h3{line-height:30px;color:#fff}#deletion-notice .disclaimer{display:inline-block;padding:6px 0;width:60%}#deletion-notice .delete{display:inline-block;padding:6px 10px;background:#fff;color:#e35950;border-radius:5px;cursor:pointer}#deletion-notice .cancel{margin-right:20px}input.delete{font-size:inherit;margin:0;border:0;line-height:inherit}#deletion-toggle{margin-top:30px;font-size:13px;font-weight:600;text-align:center;float:right;border-radius:4px;font-weight:400;cursor:pointer;padding:6px 10px;background:#fff;border-style:solid;border-width:1px}#deletion-toggle:hover{background:#f0f0f1}#deletion-buttons{float:right;width:auto}@media screen and (max-width:960px){#deletion-notice .disclaimer{width:100%}#deletion-buttons{width:100%;text-align:center;float:none;margin:20px 0 0}}#deletion-notice span.dashicons,#empty-submission span.dashicons,#last-submission span.dashicons,#submissions-notice span.dashicons{font-size:30px;width:30px;height:30px;padding-right:10px}.row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.columns-body{padding:10px}.columns-body>h4{margin-top:15px;margin-bottom:5px}@media only screen and (min-width:75em),all{.columns-wrap{-webkit-flex-basis:50%;-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%;box-sizing:border-box;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:.5rem;padding-left:.5rem}}@media only screen and (min-width:48em),all{.columns-wrap{-webkit-flex-basis:50%;-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}}@media only screen and (min-width:64em),all{.columns-wrap{-webkit-flex-basis:50%;-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}}@media only screen and (max-width:36em){.columns-wrap{-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}}#visibility-notes{font-size:12px;margin-top:5px;letter-spacing:-.25px}.widget-pages p.first{margin-bottom:5px!important}p.last,p.visibility{margin-bottom:0!important}.widget-alert{margin-top:15px;margin-right:-15px;margin-left:-15px;padding:0 15px;color:#fff;background:#f6866f}.widget-alert div{padding:6px 0}.sform-widget-notes{font-size:12px;margin-top:5px;letter-spacing:-.25px}.sform-widget-boxes{margin-top:30px}.sform-widget-boxes.buttons p label{line-height:40px}.sform-widget-description{font-size:12px;margin-top:5px;letter-spacing:-.25px}.widget-button{padding:6px 10px;background:#007cba;border-color:#007cba;color:#fff;font-size:12px;width:90px;margin-top:6px;text-align:center;cursor:pointer}.widget-button:hover{background:#0071a1;border-color:#0071a1}#widget-button-editor{float:left}#widget-button-settings{float:right}#widget-button-editor,#widget-button-settings{text-align:center;padding:0 10px;border-radius:4px;font-weight:600;cursor:pointer}p#widget-buttons{margin-top:1em;height:42px}#widget-button-editor.default,#widget-button-settings.default,.support.button.default{color:#2271b1;border-color:#2271b1}#widget-button-editor.light,#widget-button-settings.light,.support.button.light{color:#04a4cc;border-color:#04a4cc}#widget-button-editor.modern,#widget-button-settings.modern,.support.button.modern{color:#3858e9;border-color:#3858e9}#widget-button-editor.blue,#widget-button-settings.blue,.support.button.blue{color:#096484;border-color:#096484}#widget-button-editor.coffee,#widget-button-settings.coffee,.support.button.coffee{color:#2271b1;border-color:#2271b1}#widget-button-editor.coffee:hover,#widget-button-settings.coffee:hover,.support.button.coffee:hover{color:#fff;border-color:#59524c;background-color:#59524c}#widget-button-editor.ectoplasm,#widget-button-settings.ectoplasm,.support.button.ectoplasm{color:#a3b745;border-color:#a3b745}#widget-button-editor.ectoplasm:hover,#widget-button-settings.ectoplasm:hover,.support.button.ectoplasm:hover{color:#829237;border-color:#829237}#widget-button-editor.midnight,#widget-button-settings.midnight,.support.button.midnight{color:#e14d43;border-color:#e14d43}#widget-button-editor.midnight:hover,#widget-button-settings.midnight:hover,.support.button.midnight:hover{color:#d02c21;border-color:#d02c21}#widget-button-editor.ocean,#widget-button-settings.ocean,.support.button.ocean{color:#2271b1;border-color:#2271b1}#widget-button-editor.ocean:hover,#widget-button-settings.ocean:hover,.support.button.ocean:hover{color:#fff;border-color:#0a4b78;background-color:#738e96}#widget-button-editor.sunrise,#widget-button-settings.sunrise,.support.button.sunrise{color:#dd823b;border-color:#dd823b}#widget-button-editor.foggy,#widget-button-settings.foggy,.support.button.foggy{color:#72aee6;border-color:#72aee6}#widget-button-editor.polar,#widget-button-settings.polar,.support.button.polar{color:#53a0de;border-color:#53a0de}#widget-button-editor.polar:hover,#widget-button-settings.polar:hover,.support.button.polar:hover{color:#fff;background-color:#53a0de}@media screen and (max-width:374px){#editor-tabs a,#settings-tabs a{font-size:.75rem}}@media screen and (max-width:520px){.type{margin-right:0!important;border-right:1px solid #8993ab!important}#submissions-data{margin:15px 0!important}#submissions-data li{padding:20px 7px!important;width:calc(20% -1px)!important}.label{font-size:.7em!important;letter-spacing:-.5px}.value{font-size:1.5em!important}#empty-submission,#last-submission,#submissions-notice{padding:10px 15px 30px!important;margin:20px 0!important}#last-submission{overflow:auto}label.multiselect{width:100%}}@media screen and (max-width:782px){.submissions-list .notice{margin:20px}#deletion-toggle{margin:20px;margin-top:30px}#page-description.overview{padding:10px 0!important;margin-left:-10px!important;margin-right:-10px!important}#submissions-data li{width:20%}.type{margin-right:0;border-right:1px solid #8993ab!important}.label{font-size:.75em}#empty-submission,#last-submission,#submissions-notice{padding:30px 20px 50px!important}#sform-wrap{padding-right:10px}#page-description{padding:10px}form{padding:10px}.sform.wrap{margin-top:0}.responsive{display:none!important}h1.title{padding:10px}select#form{padding:0 24px 0 8px;min-height:34px;font-size:13px}.wrap{margin-right:0;padding-right:10px;margin-left:-10px;padding-left:10px}.nav-tab{border:none;line-height:26px}#editor-tabs,#settings-tabs,form#attributes,form#settings{margin:0 -10px}#editor-tabs,#settings-tabs{overflow:hidden;padding:0 0 0 10px;height:auto;margin-left:-10px!important}#editor-tabs a,#settings-tabs a{margin-right:0!important;padding:5px 8px!important;font-weight:400}#attributes,#settings{border:none}.options-heading{padding:0 10px 10px}.options-heading.closed>a>.icon-button,.options-heading.closed>span>.icon-button{display:none}.options-heading>a>.icon-button,.options-heading>span>.icon-button{display:block}th.option{padding:15px 10px}td.checkbox-switch,td.checkbox-switch.notes,td.multicheckbox.notes,td.plaintext,td.radio,td.radio.notes,td.radio.notes.last,td.select,td.select.notes,td.text,td.text.notes,td.textarea,td.used-page{padding:10px}td.plaintext.icon{padding:0 10px}td.plaintext.widget #edit-widget{margin-top:-11px!important;margin-bottom:0!important}td.checkbox-switch.last,td.checkbox-switch.last.notes,td.last.radio,td.last.select,td.last.select.notes,td.last.text,td.last.text.notes,td.last.textarea,td.last.used-page{padding:10px 10px 40px}#label-error,#set-page{display:none}label-error-top{display:block}label.radio{width:100%}#smpt-warnings.text,.privacy-setting.button,.settings-page.button,.widgets-page.button,a .text{display:none}input[type=radio]:checked::before{width:.5rem;height:.5rem;margin:.1875rem}}@media screen and (min-width:783px){.submissions-list .notice{margin:5px 0 2px}#sform-wrap{padding-right:20px}.sform.wrap{margin:38px 20px 0 2px}h1.title{padding:10px 0}.nav-tab{border:1px solid #dcdfe6;line-height:25px}#editor-tabs a,#settings-tabs a{font-size:14px;margin-right:5px!important;padding:5px 25px}#attributes,#settings{border:1px solid #dcdfe6}.options-heading,.options-heading span span{line-height:60px}.options-heading{padding:0 41px}.options-heading.closed>a>.settings-page,.options-heading.closed>a>.widgets-page,.options-heading.closed>span>#smpt-warnings{display:none}.options-heading>a>.settings-page,.options-heading>a>.widgets-page,.options-heading>span>#smpt-warnings{display:block}#set-page-icon,.icon-button{display:none}th.option{padding:36px 41px 30px;width:275px}td.checkbox-switch.notes{padding:34px 50px 12px 10px}td.checkbox-switch{padding:34px 50px 35px 10px}td.multicheckbox.notes{padding:33px 50px 7px 10px}td.last.select{padding:24px 50px 54px 9px}td.last.radio{padding:30px 50px 60px 10px}td.select.notes{padding:24px 50px 1px 9px}td.checkbox-switch.last.notes{padding:34px 50px 42px 10px}td.checkbox-switch.last{padding:34px 50px 65px 10px}td.text{padding:24px 50px 24px 9px}td.last.text{padding:24px 50px 54px 9px}td.radio{padding:30px 50px 30px 9px}td.last.select.notes{padding:24px 50px 31px 9px}td.textarea{padding:21px 50px 24px 9px}td.text.notes{padding:23px 50px 2px 9px}td.radio.notes{padding:30px 50px 7px 10px}td.radio.notes.last{padding:30px 50px 37px 10px}td.last.text.notes{padding:23px 50px 32px 9px}td.select{padding:24px 50px 24px 9px}td>p.description{padding-right:50px}td.plaintext{padding:36px 50px 36px 9px}td.plaintext.widget{padding:24px 50px 24px 9px;line-height:42px}td.plaintext.icon{padding:26px 50px 24px 9px}td.used-page{padding:36px 50px 36px 9px}td.last.textarea{padding:21px 50px 24px 9px}}@media screen and (max-width:782px){tr.outside th{padding:45px 10px 15px}tr.outside td.plaintextt{padding:10px}#attributes{margin:0 -10px}#editor-tabs a.form-page{margin-right:5px!important}td.column-lock span{margin-left:-5px;margin-top:-1px}.lock.notes{padding:3px 10px}}@media screen and (min-width:783px){tr.outside th{padding:66px 41px 30px}tr.outside td.plaintext{padding:56px 50px 24px 9px}td.column-lock,th.column-lock{text-align:center}.dashicons-lock,.dashicons-unlock{width:100%}td.column-entries,th.column-entries{width:100px;text-align:center}td.column-movedentries,th.column-movedentries{width:150px;text-align:center}}.checkbox-switch.default:hover p{visibility:visible}.dashicons-lock.red,.lock.notes.red{color:#d63638}.dashicons-lock.orange,.lock.notes.orange{color:orange}.dashicons-unlock,.lock.notes{color:#85c641}.dashicons-lock:hover+span,.dashicons-unlock:hover+span{visibility:visible}
     1.invisible{visibility:hidden}.removed,.secret,.unseen{display:none!important}#new-release{font-size:13px!important;line-height:1;color:#bbb;padding:14px 0!important;float:left;display:flex;line-height:1.5}#new-release a{color:#bbb;text-decoration:none}#new-release .update a{color:#f6866f}.wrap div.error,.wrap div.notice-success{margin:15px 0 10px}.full-width-bar{margin:0 -9999rem;padding:0 9999rem;clear:both}body,html{overflow-x:hidden}.full-width-bar>h1{margin:0}.sform.wrap>h1>div{float:right}h1.title{color:#fff;line-height:36px;font-size:22px;font-weight:500}h1.title>span{display:inline-block;padding:0 20px 0 0;position:relative;vertical-align:sub;font-size:28px;top:1px}.full-width-bar.default,h1.title.default{background-color:#2271b1!important}.full-width-bar.light,h1.title.light{background-color:#04a4cc!important}.full-width-bar.modern,h1.title.modern{background-color:#4664eb!important}.full-width-bar.blue,h1.title.blue{background-color:#e3af55!important}.full-width-bar.coffee,h1.title.coffee{background-color:#c7a589!important}.full-width-bar.ectoplasm,h1.title.ectoplasm{background-color:#a9bd4f!important}.full-width-bar.midnight,h1.title.midnight{background-color:#e35950!important}.full-width-bar.ocean,h1.title.ocean{background-color:#9ebaa0!important}.full-width-bar.sunrise,h1.title.sunrise{background-color:#dd823b!important}.full-width-bar.foggy,h1.title.foggy{background-color:#8993ab!important}.full-width-bar.polar,h1.title.polar{background-color:#fff!important;color:inherit}div.selector{display:inline-block;float:right}#wrap-selector{font-size:.6em;padding-right:10px;float:left}.form-selector{float:right;padding:0;top:0}select#form{line-height:34px;vertical-align:top}select#form.default{border-color:rgb(34 113 177 / 25%)}select#form.light{border-color:rgb(4 164 204 / 25%)}select#form.modern{border-color:rgb(56 88 233 / 25%)}select#form.blue{border-color:rgb(9 100 132 / 25%)}select#form.coffee{border-color:rgb(199 165 137 / 25%)}select#form.ectoplasm{border-color:rgb(163 183 69 / 25%)}select#form.midnight{border-color:rgb(225 77 67 / 25%)}select#form.ocean{border-color:rgb(158 186 160 / 25%)}select#form.sunrise{border-color:rgb(221 130 59 / 25%)}select#form.foggy{border-color:rgb(34 113 177 / 25%)}select#form.polar{border-color:#8993ab}select.default:focus,select.default:hover{color:#2271b1;border-color:#2271b1;box-shadow:none}select.light:focus,select.light:hover{color:#04a4cc;border-color:#04a4cc;box-shadow:none}select.modern:focus,select.modern:hover{color:#3858e9;border-color:#3858e9;box-shadow:none}select.blue:focus,select.blue:hover{color:#2271b1;border-color:#2271b1;box-shadow:none}select.coffee:focus,select.coffee:hover{color:#2271b1;border-color:#c7a589;box-shadow:none}select.ectoplasm:focus,select.ectoplasm:hover{color:#2271b1;border-color:#a3b745;box-shadow:none}select.midnight:focus,select.midnight:hover{color:#2271b1;border-color:#e14d43;box-shadow:none}select.ocean:focus,select.ocean:hover{color:#2271b1;border-color:#9ebaa0;box-shadow:none}select.sunrise:focus,select.sunrise:hover{color:#dd823b;border-color:#dcdfe6;box-shadow:none}select.foggy:focus,select.foggy:hover{color:#2271b1;border-color:#2271b1;box-shadow:none}select.polar:focus,select.polar:hover{color:#53a0de;border-color:#53a0de;box-shadow:none}#page-description{padding:10px 0}.notice.trwidget{margin-top:30px}#editor-tabs,#settings-tabs{margin-left:15px;position:relative;right:0;left:0;min-height:35px;font-size:0;z-index:1;border-bottom:0}.nav-tab{padding:5px 25px;margin-left:5px;border-bottom:none!important;color:#8993ab!important;background:#dcdfe6}.nav-tab-active,.nav-tab-active:focus,.nav-tab-active:hover,.nav-tab.nav-tab-active:hover{background:#fff!important;color:#8993ab!important;border-bottom:1px solid #fff!important;margin-bottom:-1px}.nav-tab:focus,.nav-tab:hover{background-color:#8993ab;color:#fff!important;cursor:pointer}a .dashicons{line-height:26px;transition:none;-webkit-transition:none;-moz-transition:none;-o-transition:none;text-decoration:none}#editor-tabs a,#settings-tabs a{position:relative;display:inline-block;margin:0;border-bottom:0;margin-bottom:-1px;text-decoration:none;transition:none;-webkit-transition:none;-moz-transition:none;-o-transition:none}#editor-tabs a.form-button,#settings-tabs a.form-button{margin-right:0;float:right}#editor-tabs a.last,#settings-tabs a.last{margin-right:0!important}.form-button{background:#dcdfe6;color:#8993ab;border-bottom:none!important;border:1px solid #dcdfe6;line-height:24px}.form-button:focus{box-shadow:none;outline:0}.form-button>span{white-space:nowrap}.form-button>span>span.text{margin-left:5px}.form-button.default:hover{background:#f0f0f1;color:#2271b1}.form-button.light:hover{background:#f0f0f1;color:#04a4cc}.form-button.modern:hover{background:#f0f0f1;color:#3858e9}.form-button.blue:hover{background:#f0f0f1;color:#096484}.form-button.coffee:hover{background:#59524c;color:#fff}.form-button.ectoplasm:hover{background:#f0f0f1;color:#829237}.form-button.midnight:hover{background:#f0f0f1;color:#d02c21}.form-button.ocean:hover{background:#738e96;color:#fff}.form-button.sunrise:hover{background:#f0f0f1;color:#dd823b}.form-button.foggy:hover{background:#2271b1;color:#fff}.form-button.polar:hover{background:#53a0de;color:#fff}#attributes,#card,#settings{background:#fff;padding-top:25px}.options-heading span{cursor:pointer}.options-heading span span{padding-left:10px}.toggle.dashicons{color:#dcdfe6}.dashicons-arrow-up-alt2:hover{color:#f6866f}.dashicons-arrow-down-alt2:hover{color:#9bcc79}.options-heading.closed{margin-bottom:1.85em}.icon-button{color:#dcdfe6;font-size:26px;margin:-3px 0;float:right}.icon-button.default:hover{color:#2271b1}.icon-button.light:hover{color:#04a4cc}.icon-button.modern:hover{color:#3858e9}.icon-button.blue:hover{color:#096484}.icon-button.coffee:hover{color:#59524c}.icon-button.ectoplasm:hover{color:#a3b745}.icon-button.midnight:hover{color:#e14d43}.icon-button.ocean:hover{color:#738e96}.icon-button.sunrise:hover{color:#dd823b}.icon-button.foggy:hover{color:#72aee6}.icon-button.polar:hover{color:#53a0de}.settings-page.button,.widgets-page.button{text-align:center;float:right;margin-top:15px!important;padding:0 10px;border-radius:3px;font-size:13px;font-weight:600;cursor:pointer}.section.admin.collapsed,.section.akismet.collapsed,.section.auto.collapsed,.section.custom.collapsed,.section.fields.collapsed,.section.formdescription.collapsed,.section.formfields.collapsed,.section.layout.collapsed,.section.notification.collapsed,.section.recaptcha.collapsed,.section.rules.collapsed,.section.sending.collapsed,.section.smtp.collapsed,.section.spam.collapsed,.section.specifics.collapsed,.section.storage.collapsed,.section.style.collapsed,.section.submission.collapsed,.section.success.collapsed,.section.uninstall.collapsed{font-size:0;margin:0;opacity:0;padding:0;max-height:0;overflow:hidden;transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s;-webkit-transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s;-moz-transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s;-o-transition:max-height .3s linear,opacity .15s,font-size .15s,margin .15s,padding .15s}.section.admin,.section.akismet,.section.custom,.section.formdescription,.section.layout,.section.rules,.section.sending,.section.spam,.section.style,.section.submission,.section.success,.section.uninstall{max-height:800px;transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s;-webkit-transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s;-moz-transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s;-o-transition:max-height .5s linear,opacity 1s,font-size 1s,margin 1s,padding 1s}.section.auto,.section.notification,.section.recaptcha,.section.smtp,.section.specifics,.section.storage{max-height:1500px;transition:max-height 1.25s linear,opacity 1.5s,font-size 1.5s,margin 1.5s,padding 1.5s}.section.fields{max-height:3500px;transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s;-webkit-transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s;-moz-transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s;-o-transition:max-height 1.75s linear,opacity 2s,font-size 2s,margin 2s,padding 2s}.section.formfields{max-height:5500px;transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s;-webkit-transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s;-moz-transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s;-o-transition:max-height 2s linear,opacity 2.25s,font-size 2.25s,margin 2.25s,padding 2.25s}th>span{cursor:default}.switch-box{display:inline-table;width:100%;position:relative;height:20px;line-height:20px}.switch-input{position:relative;display:inline-block;float:left;margin-right:10px;width:40px;height:20px}.switch-input input{top:2px;left:4px;margin:0;position:absolute;opacity:0!important;width:20px;height:20px}.switch-input input:active+span{outline:0;box-shadow:none}.switch-label{display:inline-block;vertical-align:middle;width:calc(100% - 50px)}.switch-input input+span{position:absolute;z-index:1;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#dcdfe6;-webkit-transition:.4s;transition:.4s;-moz-transition:.4s;-o-transition:.4s;border-radius:20px;border:2px solid #dcdfe6}.switch-input input+span:before{position:absolute;content:"";height:16px;width:16px;background-color:#fff;-webkit-transition:.4s;transition:.4s;-moz-transition:.4s;-o-transition:.4s;border-radius:50%}.switch-input input:checked+span:before{-webkit-transform:translateX(20px);-ms-transform:translateX(20px);transform:translateX(20px)}label.multiselect{position:relative;cursor:pointer;display:inline-block;padding-left:34px;line-height:24px;margin-right:10px;margin-bottom:10px}label.multiselect.last{margin-right:0}input[type=checkbox].multiselect{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.checkmark{position:absolute;cursor:pointer;top:0;left:0;height:20px;width:20px;border-radius:4px;background-color:#dcdfe6;border:2px solid #dcdfe6}.checkmark:after{left:7px;top:2px;width:4px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);content:"";position:absolute;display:none}input[type=checkbox]:checked+.checkmark{background-color:#0d6efd;border:2px solid #0d6efd}input[type=checkbox]:checked+.checkmark:after{display:block}#columns-description.description{margin-top:-3px}form.default .switch-input input:checked+span,form.default input[type=checkbox]:checked+.checkmark{background:#2271b1;border:2px solid #2271b1}form.default .switch-input input:active+span{outline:0;box-shadow:none}form.light .switch-input input:checked+span,form.light input[type=checkbox]:checked+.checkmark{background:#04a4cc;border:2px solid #04a4cc}form.light .switch-input input:active+span{outline:0;box-shadow:none}form.modern .switch-input input:checked+span,form.modern input[type=checkbox]:checked+.checkmark{background:#3858e9;border:2px solid #3858e9}form.modern .switch-input input:active+span{outline:0;box-shadow:none}form.blue .switch-input input:checked+span,form.blue input[type=checkbox]:checked+.checkmark{background:#096484;border:2px solid #096484}form.blue .switch-input input:active+span{outline:0;box-shadow:none}form.coffee .switch-input input:checked+span,form.coffee input[type=checkbox]:checked+.checkmark{background:#c7a589;border:2px solid #c7a589}form.coffee .switch-input input:active+span{outline:0;box-shadow:none}form.ectoplasm .switch-input input:checked+span,form.ectoplasm input[type=checkbox]:checked+.checkmark{background:#a3b745;border:2px solid #a3b745}form.ectoplasm .switch-input input:active+span{outline:0;box-shadow:none}form.midnight .switch-input input:checked+span,form.midnight input[type=checkbox]:checked+.checkmark{background:#e14d43;border:2px solid #e14d43}form.midnight .switch-input input:active+span{outline:0;box-shadow:none}form.ocean .switch-input input:checked+span,form.ocean input[type=checkbox]:checked+.checkmark{background:#9ebaa0;border:2px solid #9ebaa0}form.ocean .switch-input input:active+span{outline:0;box-shadow:none}form.sunrise .switch-input input:checked+span,form.sunrise input[type=checkbox]:checked+.checkmark{background:#dd823b;border:2px solid #dd823b}form.sunrise .switch-input input:active+span{outline:0;box-shadow:none}form.foggy .switch-input input:checked+span,form.foggy input[type=checkbox]:checked+.checkmark{background:#2271b1;border:2px solid #2271b1}form.foggy .switch-input input:active+span{outline:0;box-shadow:none}form.polar .switch-input input:checked+span,form.polar input[type=checkbox]:checked+.checkmark{background:#53a0de;border:2px solid #53a0de}form.polar .switch-input input:active+span{outline:0;box-shadow:none}input[type=radio]{border:2px solid #dcdfe6;height:18px;width:18px;margin-top:-3px!important;margin-right:10px!important}form.default input[type=radio]:checked,form.foggy input[type=radio]:checked{background:#2271b1;border-color:#2271b1}form.default input[type=radio]:active,form.default input[type=radio]:focus,form.foggy input[type=radio]:active,form.foggy input[type=radio]:focus{border-color:#2271b1;outline:0;box-shadow:none}form.light input[type=radio]:active,form.light input[type=radio]:focus{border-color:#04a4cc;outline:0;box-shadow:none}form.light input[type=radio]:checked{background:#04a4cc;border-color:#04a4cc}form.modern input[type=radio]:active,form.modern input[type=radio]:focus{border-color:#3858e9;outline:0;box-shadow:none}form.modern input[type=radio]:checked{background:#3858e9;border-color:#3858e9}form.blue input[type=radio]:active,form.blue input[type=radio]:focus{border-color:#096484;outline:0;box-shadow:none}form.blue input[type=radio]:checked{background:#096484;border-color:#096484}form.coffee input[type=radio]:active,form.coffee input[type=radio]:focus{border-color:#c7a589;outline:0;box-shadow:none}form.coffee input[type=radio]:checked{background:#c7a589;border-color:#c7a589}form.ectoplasm input[type=radio]:active,form.ectoplasm input[type=radio]:focus{border-color:#a3b745;outline:0;box-shadow:none}form.ectoplasm input[type=radio]:checked{background:#a3b745;border-color:#a3b745}form.midnight input[type=radio]:active,form.midnight input[type=radio]:focus{border-color:#e14d43;outline:0;box-shadow:none}form.midnight input[type=radio]:checked{background:#e14d43;border-color:#e14d43}form.ocean input[type=radio]:active,form.ocean input[type=radio]:focus{border-color:#9ebaa0;outline:0;box-shadow:none}form.ocean input[type=radio]:checked{background:#9ebaa0;border-color:#9ebaa0}form.sunrise input[type=radio]:active,input[type=radio]:focus{border-color:#dd823b;outline:0;box-shadow:none}form.sunrise input[type=radio]:checked{background:#dd823b;border-color:#dd823b}form.polar input[type=radio]:active,form.polar input[type=radio]:focus{border-color:#53a0de;outline:0;box-shadow:none}form.polar input[type=radio]:checked{background:#53a0de;border-color:#53a0de}input[type=radio]:checked::before{background-color:#fff}.form-table td fieldset label{margin-right:20px!important}textarea{height:230px!important;width:100%;padding:10px 15px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#fff!important;border:2px solid #dcdfe6;font-size:14px!important;line-height:24px!important;color:#444}textarea.description{height:148px!important}textarea.labels{height:100px!important}input.sform{width:100%}input.sform[type=number]{width:90px!important;text-align:center}form.default input[type=number]:focus,form.default input[type=text]:focus,form.default select.sform:focus,form.default textarea:focus{border:2px solid #2271b1!important;border-color:#2271b1;outline:0;box-shadow:none}form.light input[type=number]:focus,form.light input[type=text]:focus,form.light select.sform:focus,form.light textarea:focus{border:2px solid #04a4cc!important;border-color:#04a4cc;outline:0;box-shadow:none}form.modern input[type=number]:focus,form.modern input[type=text]:focus,form.modern select.sform:focus,form.modern textarea:focus{border:2px solid #3858e9!important;border-color:#3858e9;outline:0;box-shadow:none}form.blue input[type=number]:focus,form.blue input[type=text]:focus,form.blue select.sform:focus,form.blue textarea:focus{border:2px solid #096484!important;border-color:#096484;outline:0;box-shadow:none}form.coffee input[type=number]:focus,form.coffee input[type=text]:focus,form.coffee select.sform:focus,form.coffee textarea:focus{border:2px solid #c7a589!important;border-color:#c7a589;outline:0;box-shadow:none}form.ectoplasm input[type=number]:focus,form.ectoplasm input[type=text]:focus,form.ectoplasm select.sform:focus,form.ectoplasm textarea:focus{border:2px solid #a3b745!important;border-color:#a3b745;outline:0;box-shadow:none}form.midnight input[type=number]:focus,form.midnight input[type=text]:focus,form.midnight select.sform:focus,form.midnight textarea:focus{border:2px solid #e14d43!important;border-color:#e14d43;outline:0;box-shadow:none}form.ocean input[type=number]:focus,form.ocean input[type=text]:focus,form.ocean select.sform:focus,form.ocean textarea:focus{border:2px solid #9ebaa0!important;border-color:#9ebaa0;outline:0;box-shadow:none}form.sunrise input[type=number]:focus,form.sunrise input[type=text]:focus,form.sunrise select.sform:focus,form.sunrise textarea:focus{border-color:#dd823b;border:2px solid #dd823b!important;color:#dd823b;outline:0;box-shadow:none}form.foggy input[type=number]:focus,form.foggy input[type=text]:focus,form.foggy select.sform:focus,form.foggy textarea:focus{border:2px solid #2271b1!important;border-color:#2271b1;outline:0;box-shadow:none}form.polar input[type=number]:focus,form.polar input[type=text]:focus,form.polar select.sform:focus,form.polar textarea:focus{border:2px solid #53a0de;border-color:#53a0de;outline:0;box-shadow:none}input.sform[type=number],input.sform[type=text],select.sform{height:42px!important;padding:10px 15px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#fff!important;border:2px solid #dcdfe6;font-size:14px!important;line-height:24px!important;color:#444}select.sform{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:2px 20px 2px 8px!important;padding-right:30px!important}form.default select.sform:focus,form.default select.sform:hover{color:#2271b1}form.light select.sform:focus,form.light select.sform:hover{color:#04a4cc}form.modern select.sform:focus,form.modern select.sform:hover{color:#3858e9}form.blue select.sform:focus,form.modern blue.sform:hover{color:#2271b1}form.coffee select.sform:focus,form.coffee select.sform:hover{color:#2271b1}form.ectoplasm select.sform:focus,form.ectoplasm select.sform:hover{color:#2271b1}form.midnight select.sform:focus,form.midnight select.sform:hover{color:#2271b1}form.ocean select.sform:focus,form.ocean select.sform:hover{color:#2271b1}form.sunrise select.sform:hover{color:#dd823b}form.foggy select.sform:focus,form.foggy select.sform:hover{color:#2271b1}form.polar select.sform:focus,form.polar select.sform:hover{color:#53a0de}td>p.description{margin-bottom:-2px;letter-spacing:-.6px}#deletion-toggle.default,#smpt-warnings.default,form.default .privacy-setting.button,form.default .settings-page.button,form.default .widgets-page.button,span.default.button.unavailable{color:#2271b1;border-color:#2271b1}#deletion-toggle.light,#smpt-warnings.light,form.light .privacy-setting.button,form.light .settings-page.button,form.light .widgets-page.button,span.light.button.unavailable{color:#04a4cc;border-color:#04a4cc}#deletion-toggle.modern,#smpt-warnings.modern,form.modern .privacy-setting.button,form.modern .settings-page.button,form.modern .widgets-page.button,span.modern.button.unavailable{color:#3858e9;border-color:#3858e9}#deletion-toggle.blue,#smpt-warnings.blue,form.blue .privacy-setting.button,form.blue .settings-page.button,form.blue .widgets-page.button,span.blue.button.unavailable{color:#096484;border-color:#096484}#deletion-toggle.coffee,#smpt-warnings.coffee,form.coffee .privacy-setting.button,form.coffee .settings-page.button,form.coffee .widgets-page.button,span.coffee.button.unavailable{color:#2271b1;border-color:#2271b1}#deletion-toggle.coffee:hover,#smpt-warnings.coffee:hover,form.coffee .privacy-setting.button:hover,form.coffee .settings-page.button:hover,form.coffee .widgets-page.button:hover,span.coffee.button.unavailable:hover{color:#fff;border-color:#59524c;background-color:#59524c}#deletion-toggle.ectoplasm,#smpt-warnings.ectoplasm,form.ectoplasm .privacy-setting.button,form.ectoplasm .settings-page.button,form.ectoplasm .widgets-page.button,span.ectoplasm.button.unavailable{color:#a3b745;border-color:#a3b745}#deletion-toggle.ectoplasm:hover,#smpt-warnings.ectoplasm:hover,form.ectoplasm .privacy-setting.button:hover,form.ectoplasm .settings-page.button:hover,form.ectoplasm .widgets-page.button:hover,span.ectoplasm.button.unavailable:hover{color:#829237;border-color:#829237}#deletion-toggle.midnight,#smpt-warnings.midnight,form.midnight .privacy-setting.button,form.midnight .settings-page.button,form.midnight .widgets-page.button,span.midnight.button.unavailable{color:#e14d43;border-color:#e14d43}#deletion-toggle.midnight:hover,#smpt-warnings.midnight:hover,form.midnight .privacy-setting.button:hover,form.midnight .settings-page.button:hover,form.midnight .widgets-page.button:hover,span.midnight.button.unavailable:hover{color:#d02c21;border-color:#d02c21}#deletion-toggle.ocean,#smpt-warnings.ocean,form.ocean .privacy-setting.button,form.ocean .settings-page.button,form.ocean .widgets-page.button,span.ocean.button.unavailable{color:#2271b1;border-color:#2271b1}#deletion-toggle.ocean:hover,#smpt-warnings.ocean:hover,form.ocean .privacy-setting.button:hover,form.ocean .settings-page.button:hover,form.ocean .widgets-page.button:hover,span.ocean.button.unavailable:hover{color:#fff;border-color:#0a4b78;background-color:#738e96}#deletion-toggle.sunrise,#smpt-warnings.sunrise,form.sunrise .privacy-setting.button,form.sunrise .settings-page.button,form.sunrise .widgets-page.button,span.sunrise.button.unavailable{color:#dd823b;border-color:#dd823b}#deletion-toggle.foggy,#smpt-warnings.foggy,form.foggy .privacy-setting.button,form.foggy .settings-page.button,form.foggy .widgets-page.button,span.foggy.button.unavailable{color:#72aee6;border-color:#72aee6}#deletion-toggle.polar,#smpt-warnings.polar,form.polar .privacy-setting.button,form.polar .settings-page.button,form.polar .widgets-page.button,span.polar.button.unavailable{color:#53a0de;border-color:#53a0de}#deletion-toggle.polar:hover,#smpt-warnings.polar:hover,form.polar .privacy-setting.button:hover,form.polar .settings-page.button:hover,form.polar .widgets-page.button:hover,span.polar.button.unavailable:hover{color:#fff;background-color:#53a0de}select.sform:disabled:hover{color:#a7aaad!important}.switch-input input:disabled+span{cursor:default;box-shadow:none!important}label.disabled{cursor:default}.switch-input input:disabled:checked+span{opacity:.7}input[type=radio]:disabled,input[type=radio]:disabled:checked{cursor:default;box-shadow:none!important}input[type=radio]:disabled:active,input[type=radio]:disabled:focus{border-color:#dcdfe6!important}input[type=radio]:disabled:active:checked,input[type=radio]:disabled:focus:checked{border-color:#53a0de!important}#submit-wrap{margin:0 auto;text-align:center;padding:0 40px 100px}#alert-wrap{position:relative}#noscript{position:absolute;left:0;right:0;color:#fff;border-radius:8px;background:#dc3545;margin:0 75px 25px;line-height:30px;height:30px;padding:9px}#message-wrap{visibility:hidden;color:#909090;border-radius:8px;background:#f2f2f2;margin:0 75px 38px;line-height:30px;height:30px;padding:9px}#message-wrap.error{background:#f6866f;border:0;color:#fff}#message-wrap.success{background:#9bcc79;color:#fff}#message-wrap.unchanged{background:#f8cd5e;color:#fff}#message-wrap.seen{visibility:visible}.submit-button{padding:5px 12px;outline:0;border-radius:8px;font-size:13px;text-transform:uppercase;cursor:pointer;line-height:2.15384615;min-height:30px;border:none}form.default .submit-button{background:#2271b1;color:#fff}form.default .submit-button:hover{background:#135e96;color:#fff}form.default .submit-button:active{background:#135e96;color:#fff}form.light .submit-button{background:#04a4cc;color:#fff}form.light .submit-button:hover{background:#04b0db;color:#fff}form.light .submit-button:active{background:#0490b3;color:#fff}form.modern .submit-button{background:#3858e9;color:#fff}form.modern .submit-button:hover{background:#4664eb;color:#fff}form.modern .submit-button:active{background:#2145e6;color:#fff}form.blue .submit-button{background:#e1a948;color:#fff}form.blue .submit-button:hover{background:#e3af55;color:#fff}form.blue .submit-button:active{background:#dd9f32;color:#fff}form.coffee .submit-button{background:#c7a589;color:#fff}form.coffee .submit-button:hover{background:#ccad93;color:#fff}form.coffee .submit-button:active{background:#bf9878;color:#fff}form.ectoplasm .submit-button{background:#a3b745;color:#fff}form.ectoplasm .submit-button:hover{background:#a9bd4f;color:#fff}form.ectoplasm .submit-button:active{background:#93a43e;color:#fff}form.midnight .submit-button{background:#e14d43;color:#fff}form.midnight .submit-button:hover{background:#e35950;color:#fff}form.midnight .submit-button:active{background:#dd382d;color:#fff}form.ocean .submit-button{background:#9ebaa0;color:#fff}form.ocean .submit-button:hover{background:#a7c0a9;color:#fff}form.ocean .submit-button:active{background:#8faf91;color:#fff}form.sunrise .submit-button{background:#dd823b;color:#fff}form.sunrise .submit-button:hover{background:#c36922;color:#fff}form.sunrise .submit-button:active{background:#d97426;color:#fff}form.foggy .submit-button{background:#2271b1;color:#fff}form.foggy .submit-button:hover{background:#135e96;color:#fff}form.foggy .submit-button:active{background:#135e96;color:#fff}form.polar .submit-button{background:#53a0de;color:#fff}form.polar .submit-button:hover{background:#77b4e5;color:#fff}form.polar .submit-button:active{background:#318dd7;color:#fff}span.button.unavailable{float:left;margin-right:10px}span.button.unavailable a{color:#fff;text-decoration:none}span.button.unavailable:hover a{color:#fff}#set-page-icon.default:hover,span.default.button.unavailable a{color:#2271b1}#set-page-icon.light:hover,span.light.button.unavailable a{color:#04a4cc}#set-page-icon.modern:hover,span.modern.button.unavailable a{color:#3858e9}#set-page-icon.blue:hover,span.blue.button.unavailable a{color:#096484}#set-page-icon.coffee:hover,span.coffee.button.unavailable a{color:#2271b1}span.coffee.button.unavailable:hover a{color:#fff}#set-page-icon.ectoplasm:hover,span.ectoplasm.button.unavailable a{color:#a3b745}span.ectoplasm.button.unavailable:hover a{color:#829237}#set-page-icon.midnight:hover,span.midnight.button.unavailable a{color:#e14d43}#set-page-icon.ocean:hover,span.ocean.button.unavailable a{color:#2271b1}span.ocean.button.unavailable:hover a{color:#fff}#set-page-icon.sunrise:hover,span.sunrise.button.unavailable a{color:#dd823b}#set-page-icon.foggy:hover,span.foggy.button.unavailable a{color:#72aee6}#set-page-icon.polar:hover,span.polar.button.unavailable a{color:#53a0de}span.polar.button.unavailable:hover a{color:#fff}.publish-link{text-decoration:none;color:#9ccc79}.publish-link:hover{color:#9ccc79}input[placeholder]{text-overflow:ellipsis}::-moz-placeholder{text-overflow:ellipsis}input:-moz-placeholder{text-overflow:ellipsis}.head-bracket{font-style:italic;font-weight:400;padding-left:10px}#shortcode-copy{margin-left:5px;border:none;outline:0;background-color:transparent;line-height:inherit;width:40px;height:40px;padding:8px;border-radius:40px;cursor:pointer}#shortcode-copy:hover{background-color:#eee!important}#shortcode-copy:active{background-color:#dcdfe6!important}#shortcode-copy img{vertical-align:middle;width:24px}#shortcode-tooltip{background-color:#8993ab;display:none;color:#fff!important;padding:4px 7px;border-radius:5px;font-size:.75rem;margin-left:5px}.widgets-page.button{text-align:center;float:right;margin-top:6px!important;border-radius:4px;font-size:.9em;font-weight:600;cursor:pointer}.slug{margin-left:10px}.privacy-setting.button{text-align:center;float:none;margin-top:6px!important;border-radius:4px;font-size:.9em;font-weight:600;cursor:pointer}#label-error,.privacy-setting{margin-left:10px!important}#label-error-top{margin-left:10px!important;font-weight:400!important;color:#f6866f}#set-page-icon{float:right;margin-top:-17px;cursor:pointer}#post-status{margin-right:25px}span.description.left{font-size:13px;font-style:italic;padding-left:10px}#form-borders{margin-left:20px}#smpt-warnings{margin-top:15px!important;font-size:13px;text-align:center;float:right;border-radius:4px;font-weight:400;cursor:pointer}tr.smpt-warnings{background-color:#e4e7ec}div.description h4{margin:1.3em 0}tr.smpt-warnings>td{padding:18px 41px 30px 36px;vertical-align:none;border-width:0 0 0 5px;border-style:solid;background:#e5f5fa;border-color:#00a0d2}.description pre{white-space:pre-wrap}#smpt-warnings:hover{background:#f0f0f1}.notice-toggle{white-space:nowrap}.submission-notice>.notice{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:15px}#submissions-data{padding:0;display:flex}#submissions-data li{float:left;padding:20px 0;width:19%;text-align:center;background:#dcdfe6;opacity:.65;padding-bottom:26px}#submissions-data li:hover{opacity:1}.type{margin-right:1.25%}.label{color:#666;text-transform:uppercase;font-size:.8em}.value{display:block;clear:both;font-size:2em;font-weight:300;line-height:40px}#empty-submission,#last-submission,#submissions-notice{padding:30px 30px 50px;margin-top:20px;background:#fff}#empty-submission h3,#last-submission h3,#submissions-notice h3{line-height:30px}#deletion-notice{padding:5px 40px 30px;margin:0 -40px;background:#eb8a84;color:#fff;margin-bottom:-23px}#deletion-notice h3{line-height:30px;color:#fff}#deletion-notice .disclaimer{display:inline-block;padding:6px 0;width:60%}#deletion-notice .delete{display:inline-block;padding:6px 10px;background:#fff;color:#e35950;border-radius:5px;cursor:pointer}#deletion-notice .cancel{margin-right:50px}input.delete{font-size:inherit;margin:0;border:0;line-height:inherit}#deletion-toggle{margin-top:30px;font-size:13px;font-weight:600;text-align:center;float:right;border-radius:4px;font-weight:400;cursor:pointer;padding:6px 10px;background:#fff;border-style:solid;border-width:1px}#deletion-toggle:hover{background:#f0f0f1}#deletion-buttons{float:right;width:auto}@media screen and (max-width:960px){#deletion-notice .disclaimer{width:100%}#deletion-buttons{width:100%;text-align:center;float:none;margin:20px 0 0}}#deletion-notice span.dashicons,#empty-submission span.dashicons,#last-submission span.dashicons,#submissions-notice span.dashicons{font-size:30px;width:30px;height:30px;padding-right:10px}.row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.columns-body{padding:10px}.columns-body>h4{margin-top:15px;margin-bottom:5px}@media only screen and (min-width:75em),all{.columns-wrap{-webkit-flex-basis:50%;-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%;box-sizing:border-box;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;padding-right:.5rem;padding-left:.5rem}}@media only screen and (min-width:48em),all{.columns-wrap{-webkit-flex-basis:50%;-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}}@media only screen and (min-width:64em),all{.columns-wrap{-webkit-flex-basis:50%;-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}}@media only screen and (max-width:36em){.columns-wrap{-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}}#visibility-notes{font-size:12px;margin-top:5px;letter-spacing:-.25px}.widget-pages p.first{margin-bottom:5px!important}p.last,p.visibility{margin-bottom:0!important}.widget-alert{margin-top:15px;margin-right:-15px;margin-left:-15px;padding:0 15px;color:#fff;background:#f6866f}.widget-alert div{padding:6px 0}.sform-widget-notes{font-size:12px;margin-top:5px;letter-spacing:-.25px}.sform-widget-boxes{margin-top:30px}.sform-widget-boxes.buttons p label{line-height:40px}.sform-widget-description{font-size:12px;margin-top:5px;letter-spacing:-.25px}.widget-button{padding:6px 10px;background:#007cba;border-color:#007cba;color:#fff;font-size:12px;width:90px;margin-top:6px;text-align:center;cursor:pointer}.widget-button:hover{background:#0071a1;border-color:#0071a1}#widget-button-editor{float:left}#widget-button-settings{float:right}#widget-button-editor,#widget-button-settings{text-align:center;padding:0 10px;border-radius:4px;font-weight:600;cursor:pointer}p#widget-buttons{margin-top:1em;height:42px}#widget-button-editor.default,#widget-button-settings.default,.support.button.default{color:#2271b1;border-color:#2271b1}#widget-button-editor.light,#widget-button-settings.light,.support.button.light{color:#04a4cc;border-color:#04a4cc}#widget-button-editor.modern,#widget-button-settings.modern,.support.button.modern{color:#3858e9;border-color:#3858e9}#widget-button-editor.blue,#widget-button-settings.blue,.support.button.blue{color:#096484;border-color:#096484}#widget-button-editor.coffee,#widget-button-settings.coffee,.support.button.coffee{color:#2271b1;border-color:#2271b1}#widget-button-editor.coffee:hover,#widget-button-settings.coffee:hover,.support.button.coffee:hover{color:#fff;border-color:#59524c;background-color:#59524c}#widget-button-editor.ectoplasm,#widget-button-settings.ectoplasm,.support.button.ectoplasm{color:#a3b745;border-color:#a3b745}#widget-button-editor.ectoplasm:hover,#widget-button-settings.ectoplasm:hover,.support.button.ectoplasm:hover{color:#829237;border-color:#829237}#widget-button-editor.midnight,#widget-button-settings.midnight,.support.button.midnight{color:#e14d43;border-color:#e14d43}#widget-button-editor.midnight:hover,#widget-button-settings.midnight:hover,.support.button.midnight:hover{color:#d02c21;border-color:#d02c21}#widget-button-editor.ocean,#widget-button-settings.ocean,.support.button.ocean{color:#2271b1;border-color:#2271b1}#widget-button-editor.ocean:hover,#widget-button-settings.ocean:hover,.support.button.ocean:hover{color:#fff;border-color:#0a4b78;background-color:#738e96}#widget-button-editor.sunrise,#widget-button-settings.sunrise,.support.button.sunrise{color:#dd823b;border-color:#dd823b}#widget-button-editor.foggy,#widget-button-settings.foggy,.support.button.foggy{color:#72aee6;border-color:#72aee6}#widget-button-editor.polar,#widget-button-settings.polar,.support.button.polar{color:#53a0de;border-color:#53a0de}#widget-button-editor.polar:hover,#widget-button-settings.polar:hover,.support.button.polar:hover{color:#fff;background-color:#53a0de}.checkbox-switch.default:hover p{visibility:visible}.dashicons-lock.red,.lock.notes.red{color:#d63638}.dashicons-lock.orange,.lock.notes.orange{color:orange}.dashicons-unlock,.lock.notes{color:#85c641}.dashicons-lock:hover+span,.dashicons-unlock:hover+span{visibility:visible}#card-submit-wrap{margin:0 auto;padding:0 40px 100px}#alert-wrap,#form-buttons{text-align:center}.button.back-list.default{color:#2271b1;border-color:#2271b1}.button.back-list.light{color:#04a4cc;border-color:#04a4cc}.button.back-list.modern{color:#3858e9;border-color:#3858e9}.button.back-list.blue{color:#096484;border-color:#096484}.button.back-list.coffee{color:#2271b1;border-color:#2271b1}.button.back-list.coffee:hover{color:#fff;border-color:#59524c;background-color:#59524c}.button.back-list.ectoplasm{color:#a3b745;border-color:#a3b745}.button.back-list.ectoplasm:hover{color:#829237;border-color:#829237}.button.back-list.midnight{color:#e14d43;border-color:#e14d43}.button.back-list.midnight:hover{color:#d02c21;border-color:#d02c21}.button.back-list.ocean{color:#2271b1;border-color:#2271b1}.button.back-list.ocean:hover{color:#fff;border-color:#0a4b78;background-color:#738e96}.button.back-list.sunrise{color:#dd823b;border-color:#dd823b}.button.back-list.foggy{color:#72aee6;border-color:#72aee6}.button.back-list.polar{color:#53a0de;border-color:#53a0de}.button.back-list.polar:hover{color:#fff;background-color:#53a0de}.forwarding{padding-right:3px}#deletion-notice.success{text-align:center;background:#75c375}#deletion-notice .disclaimer.success{padding:0;line-height:48px}#deletion-notice .disclaimer.success span{font-size:80px;width:68px;height:48px;line-height:48px;padding-right:0}#deletion-notice.confirm{background:#d63638}div.notice{margin-top:13px!important}@media screen and (max-width:374px){#editor-tabs a,#settings-tabs a{font-size:.75rem}}@media screen and (max-width:520px){.type{margin-right:0!important;border-right:1px solid #8993ab!important}#submissions-data{margin:15px 0!important}#submissions-data li{padding:20px 7px!important;width:calc(20% -1px)!important}.label{font-size:.7em!important;letter-spacing:-.5px}.value{font-size:1.5em!important}#empty-submission,#last-submission,#submissions-notice{padding:10px 15px 30px!important;margin:20px 0!important}#last-submission{overflow:auto}label.multiselect{width:100%}}@media screen and (max-width:782px){#deletion-notice{padding:5px 10px 30px!important;margin:0 -50px!important}.submissions-list .notice{margin:20px}#deletion-toggle{margin:20px;margin-top:30px}#page-description.overview{padding:10px 0!important;margin-left:-10px!important;margin-right:-10px!important}#submissions-data li{width:20%}.type{margin-right:0;border-right:1px solid #8993ab!important}.label{font-size:.75em}#empty-submission,#last-submission,#submissions-notice{padding:30px 20px 50px!important}#sform-wrap{padding-right:10px}#page-description{padding:10px}form{padding:10px}.sform.wrap{margin-top:0}.responsive{display:none!important}h1.title{padding:10px}select#form{padding:0 24px 0 8px;min-height:34px;font-size:13px}.wrap{margin-right:0;padding-right:10px;margin-left:-10px;padding-left:10px}.nav-tab{border:none;line-height:26px}#editor-tabs #card-tabs,#settings-tabs,form#attributes,form#card,form#settings{margin:0 -10px}#editor-tabs,#settings-tabs{overflow:hidden;padding:0 0 0 10px;height:auto;margin-left:-10px!important;margin-right:-10px}.form-button{line-height:25px}#editor-tabs a,#settings-tabs a{margin-right:0!important;padding:5px 8px!important;font-weight:400}#attributes,#card,#settings{border:none}.options-heading{padding:0 10px 10px}.options-heading.closed>a>.icon-button,.options-heading.closed>span>.icon-button{display:none}.options-heading>a>.icon-button,.options-heading>span>.icon-button{display:block}th.option{padding:15px 10px}td.checkbox-switch,td.checkbox-switch.notes,td.multicheckbox.notes,td.plaintext,td.plaintext.last,td.radio,td.radio.notes,td.radio.notes.last,td.select,td.select.notes,td.text,td.text.notes,td.textarea,td.used-page{padding:10px}td.plaintext.icon{padding:0 10px}td.plaintext.widget #edit-widget{margin-top:-11px!important;margin-bottom:0!important}td.checkbox-switch.last,td.checkbox-switch.last.notes,td.last.radio,td.last.select,td.last.select.notes,td.last.text,td.last.text.notes,td.last.textarea,td.last.used-page{padding:10px 10px 40px}#label-error,#set-page{display:none}label-error-top{display:block}label.radio{width:100%}#smpt-warnings.text,.privacy-setting.button,.settings-page.button,.widgets-page.button,a .text{display:none}input[type=radio]:checked::before{width:.5rem;height:.5rem;margin:.1875rem}tr.outside th{padding:45px 10px 15px}tr.outside td.plaintextt{padding:10px}#attributes{margin:0 -10px}#editor-tabs a.form-page{margin-right:5px!important}td.column-locks span{margin-left:-5px;margin-top:-1px}.lock.notes{padding:3px 10px}.icon-button{line-height:46px!important}.button.back-list{display:none}.subsubsub{font-size:13px;width:100%}.tablenav .tablenav-pages{margin:0}.tablenav.top,p.search-box{text-align:center}.tablenav.top{margin:20px 0 12px 0}.tablenav.bottom{margin:8px 20px 0}#forms-table .tablenav .button{margin-bottom:0!important;margin-left:10px;margin-right:0!important}.row-actions{display:flex!important}#forms-table{padding:20px 0 10px 0}.widefat tbody th.check-column,.widefat tfoot td.check-column,.widefat thead td.check-column,tbody td.check-column{padding:8px 0 0 10px}.widefat td,.widefat th{padding:14px 10px}input[type=checkbox]{margin:2px 0 8px 10px!important}.widefat tfoot td input[type=checkbox],.widefat thead td input[type=checkbox]{margin:0 0 8px 10px!important}.wp-list-table .toggle-row{top:16px}.wp-list-table .is-expanded td:not(.hidden){padding-bottom:10px!important;padding-right:20px!important}.tablenav-pages .pagination-links{font-size:13px}.tablenav .tablenav-pages .button,.tablenav .tablenav-pages .tablenav-pages-navspan{display:inline-block;vertical-align:baseline;min-width:30px;min-height:30px;margin:0!important;padding:0 4px;font-size:16px;line-height:1.625;text-align:center;margin-left:10px}.tablenav-pages .pagination-links .current-page{margin:0 2px 0 0;font-size:13px;text-align:center;min-width:30px;min-height:30px;margin:0;padding:0 4px}}@media screen and (min-width:783px){.submissions-list .notice{margin:5px 0 2px}#sform-wrap{padding-right:20px}.sform.wrap{margin:38px 20px 0 2px}h1.title{padding:10px 0}.nav-tab{border:1px solid #dcdfe6;line-height:24px}#editor-tabs a,#settings-tabs a{font-size:14px;margin-right:5px!important;padding:5px 25px}#attributes,#card,#settings{border:1px solid #dcdfe6}.options-heading,.options-heading span span{line-height:60px}.options-heading{padding:0 41px}.options-heading.closed>a>.settings-page,.options-heading.closed>a>.widgets-page,.options-heading.closed>span>#smpt-warnings{display:none}.options-heading>a>.settings-page,.options-heading>a>.widgets-page,.options-heading>span>#smpt-warnings{display:block}#set-page-icon,.icon-button{display:none}th.option{padding:36px 41px 30px;width:275px}td.checkbox-switch.notes{padding:34px 50px 12px 10px}td.checkbox-switch{padding:34px 50px 35px 10px}td.multicheckbox.notes{padding:33px 50px 7px 10px}td.last.select{padding:24px 50px 54px 9px}td.last.radio{padding:30px 50px 60px 10px}td.select.notes{padding:24px 50px 1px 9px}td.checkbox-switch.last.notes{padding:34px 50px 42px 10px}td.checkbox-switch.last{padding:34px 50px 65px 10px}td.text{padding:24px 50px 24px 9px}td.last.text{padding:24px 50px 54px 9px}td.radio{padding:30px 50px 30px 9px}td.last.select.notes{padding:24px 50px 31px 9px}td.textarea{padding:21px 50px 24px 9px}td.text.notes{padding:23px 50px 2px 9px}td.radio.notes{padding:30px 50px 7px 10px}td.radio.notes.last{padding:30px 50px 37px 10px}td.last.text.notes{padding:23px 50px 32px 9px}td.select{padding:24px 50px 24px 9px}td>p.description{padding-right:50px}td.plaintext{padding:36px 50px 36px 9px}td.plaintext.last{padding:36px 50px 66px 9px}td.plaintext.widget{padding:24px 50px 24px 9px;line-height:42px}td.plaintext.icon{padding:26px 50px 24px 9px}td.used-page{padding:36px 50px 36px 9px}td.last.textarea{padding:21px 50px 24px 9px}tr.outside th{padding:66px 41px 30px}tr.outside td.plaintext{padding:56px 50px 24px 9px}td.column-locks,th.column-locks,th.column-status,td.column-status{text-align:center}.dashicons-lock,.dashicons-unlock{width:100%}td.column-entries,td.column-forwarding,th.column-entries,th.column-forwarding{width:100px;text-align:center}td.column-movedentries,th.column-movedentries{width:150px;text-align:center}td.column-target,th.column-target{text-align:center}td.column-creation,th.column-creation{text-align:center}th.column-creation a{display:inline-flex}th.column-creation a span{margin-left:17px}th.column-creation a span.sorting-indicator{margin-left:7px}.button.admin{float:right;padding:3px 10px!important}.button.admin{float:right;padding:3px 10px!important}}
  • simpleform/trunk/admin/css/admin.css

    r2618058 r2664049  
    44
    55/* New release message */
    6 #new-release { font-size: 13px !important; line-height: 1; color: #bbb; padding: 14px 0 !important; float: left; }
     6#new-release { font-size: 13px !important; line-height: 1; color: #bbb; padding: 14px 0 !important; float: left;  display: flex; line-height: 1.5; }
    77#new-release a { color: #bbb; text-decoration: none; }
    88#new-release .update a { color: #f6866f; }
     
    6767#settings-tabs a.form-button, #editor-tabs a.form-button { margin-right: 0; float: right; }
    6868#settings-tabs a.last, #editor-tabs a.last { margin-right: 0 !important; }
    69 .form-button { background: #dcdfe6; color: #8993ab; border-bottom: none !important; border: 1px solid #dcdfe6; line-height:25px; }
     69.form-button { background: #dcdfe6; color: #8993ab; border-bottom: none !important; border: 1px solid #dcdfe6; line-height: 24px; }
    7070.form-button:focus { box-shadow: none; outline: none; }
    7171.form-button > span { white-space: nowrap; }
     
    8484
    8585/* Admin forms */
    86 #attributes, #settings { background: #fff; padding-top: 25px; }
     86#attributes, #settings, #card { background: #fff; padding-top: 25px; }
    8787.options-heading span { cursor: pointer; }
    8888.options-heading span span { padding-left: 10px; }
     
    292292.head-bracket { font-style: italic; font-weight: 400; padding-left: 10px; }
    293293
    294 /* Form Editor page */
     294/* Editor page */
    295295#shortcode-copy { margin-left: 5px; border: none; outline: none; background-color: transparent; line-height: inherit; width: 40px; height: 40px; padding: 8px; border-radius: 40px; cursor:pointer; }
    296296#shortcode-copy:hover { background-color: #eee !important; }
     
    309309/* Settings page */
    310310#form-borders { margin-left: 20px; }
    311 
    312311#smpt-warnings { margin-top: 15px !important; font-size: 13px; text-align: center; float: right; border-radius: 4px; font-weight: 400; cursor: pointer; }
    313312tr.smpt-warnings { background-color: #e4e7ec; }
     
    318317.notice-toggle { white-space: nowrap; }
    319318
    320 /* Submissions page */
     319/* Entries page */
    321320.submission-notice > .notice { margin-left: 0; margin-right: 0; margin-top: 5px; margin-bottom: 15px; }
    322321#submissions-data { padding: 0; display: flex; }
     
    328327#empty-submission, #last-submission, #submissions-notice { padding: 30px 30px 50px; margin-top: 20px; background: #fff; }
    329328#empty-submission h3, #last-submission h3, #submissions-notice h3 { line-height: 30px; }
    330 #deletion-notice { padding: 5px 30px 30px; margin-top: 30px; background: #eb8a84; color: #FFF; }
     329#deletion-notice { padding: 5px 40px 30px; margin: 0 -40px; background: #eb8a84; color: #FFF; margin-bottom: -23px; }
    331330#deletion-notice h3 { line-height: 30px; color: #FFF; }
    332331#deletion-notice .disclaimer { display: inline-block; padding: 6px 0; width: 60%; }
    333332#deletion-notice .delete { display: inline-block; padding: 6px 10px; background: #fff; color: #e35950; border-radius: 5px; cursor: pointer; }
    334 #deletion-notice .cancel { margin-right: 20px; }
     333#deletion-notice .cancel { margin-right: 50px; }
    335334input.delete { font-size: inherit; margin: 0; border: 0; line-height: inherit; }
    336335#deletion-toggle { margin-top: 30px; font-size: 13px; font-weight: 600; text-align: center; float: right; border-radius: 4px; font-weight: 400; cursor: pointer; padding: 6px 10px; background: #fff; border-style: solid; border-width: 1px; }
     
    393392#widget-button-editor.polar, #widget-button-settings.polar, .support.button.polar { color: #53a0de; border-color: #53a0de; }
    394393#widget-button-editor.polar:hover, #widget-button-settings.polar:hover, .support.button.polar:hover { color: #fff; background-color: #53a0de; }
    395    
     394
     395.checkbox-switch.default:hover p { visibility: visible; }
     396.dashicons-lock.red, .lock.notes.red { color: #D63638; }
     397.dashicons-lock.orange, .lock.notes.orange { color: #FFA500; }
     398.dashicons-unlock, .lock.notes { color: #85C641; }
     399.dashicons-lock:hover + span, .dashicons-unlock:hover + span { visibility: visible; }
     400#card-submit-wrap { margin: 0 auto; padding: 0 40px 100px; }
     401#alert-wrap, #form-buttons { text-align: center; }
     402.button.back-list.default { color: #2271b1; border-color: #2271b1; }
     403.button.back-list.light { color: #04a4cc; border-color: #04a4cc; }
     404.button.back-list.modern { color: #3858e9; border-color: #3858e9; }
     405.button.back-list.blue { color: #096484; border-color: #096484; }
     406.button.back-list.coffee { color: #2271b1; border-color: #2271b1; }
     407.button.back-list.coffee:hover { color: #fff; border-color: #59524c; background-color: #59524c; }
     408.button.back-list.ectoplasm { color: #a3b745; border-color: #a3b745; }
     409.button.back-list.ectoplasm:hover { color: #829237; border-color: #829237; }
     410.button.back-list.midnight { color: #e14d43; border-color: #e14d43; }
     411.button.back-list.midnight:hover { color: #d02c21; border-color: #d02c21; }
     412.button.back-list.ocean { color: #2271b1; border-color: #2271b1; }
     413.button.back-list.ocean:hover { color: #fff; border-color: #0a4b78; background-color: #738e96; }
     414.button.back-list.sunrise { color: #dd823b; border-color: #dd823b; }
     415.button.back-list.foggy { color: #72aee6; border-color: #72aee6; }
     416.button.back-list.polar { color: #53a0de; border-color: #53a0de; }
     417.button.back-list.polar:hover { color: #fff; background-color: #53a0de; }
     418
     419/* Form page */
     420.forwarding { padding-right: 3px; }
     421#deletion-notice.success { text-align: center; background: #75C375; }
     422#deletion-notice .disclaimer.success { padding: 0; line-height: 48px; }
     423#deletion-notice .disclaimer.success span { font-size: 80px; width: 68px; height: 48px; line-height: 48px;  padding-right: 0; }
     424#deletion-notice.confirm { background: #D63638; }
     425div.notice { margin-top: 13px !important; }
     426
    396427@media screen and (max-width: 374px) {
    397428#settings-tabs a, #editor-tabs a { font-size: 0.75rem; }
     
    410441
    411442@media screen and (max-width: 782px) {
     443#deletion-notice { padding: 5px 10px 30px !important; margin: 0 -50px !important; }
    412444.submissions-list .notice { margin: 20px; }
    413445#deletion-toggle { margin: 20px; margin-top: 30px; }
     
    426458.wrap { margin-right: 0px; padding-right: 10px; margin-left: -10px; padding-left: 10px; }
    427459.nav-tab { border:none; line-height: 26px; }
    428 form#attributes, form#settings, #settings-tabs, #editor-tabs { margin: 0 -10px; }
    429 #settings-tabs, #editor-tabs { overflow: hidden; padding: 0 0 0 10px; height: auto; margin-left: -10px !important; }
     460form#attributes, form#settings, form#card, #settings-tabs, #editor-tabs #card-tabs { margin: 0 -10px; }
     461#settings-tabs, #editor-tabs { overflow: hidden; padding: 0 0 0 10px; height: auto; margin-left: -10px !important; margin-right: -10px; }
     462.form-button { line-height: 25px; }
    430463#settings-tabs a, #editor-tabs a { margin-right: 0 !important; padding: 5px 8px !important; font-weight: 400; }
    431 #settings, #attributes { border: none; }
     464#settings, #attributes, #card { border: none; }
    432465.options-heading { padding: 0 10px 10px; }
    433466.options-heading.closed > a > .icon-button, .options-heading.closed > span > .icon-button { display: none; }
    434467.options-heading > a > .icon-button, .options-heading > span > .icon-button { display: block; }
    435468th.option { padding: 15px 10px; }
    436 td.checkbox-switch.notes, td.checkbox-switch, td.multicheckbox.notes, td.select.notes, td.text, td.radio, td.textarea, td.text.notes, td.radio.notes, td.radio.notes.last, td.select, td.used-page, td.plaintext { padding: 10px; }
     469td.checkbox-switch.notes, td.checkbox-switch, td.multicheckbox.notes, td.select.notes, td.text, td.radio, td.textarea, td.text.notes, td.radio.notes, td.radio.notes.last, td.select, td.used-page, td.plaintext, td.plaintext.last { padding: 10px; }
    437470td.plaintext.icon { padding: 0px 10px; }
    438471td.plaintext.widget #edit-widget{ margin-top: -11px !important; margin-bottom: 0 !important; }
     
    443476a .text, #smpt-warnings.text, .settings-page.button, .widgets-page.button, .privacy-setting.button { display: none; }
    444477input[type=radio]:checked::before { width: .5rem; height: .5rem; margin: .1875rem; }
     478tr.outside th { padding: 45px 10px 15px; }
     479tr.outside td.plaintextt { padding: 10px; }
     480#attributes { margin: 0 -10px; }
     481#editor-tabs a.form-page { margin-right: 5px!important; }
     482td.column-locks span { margin-left: -5px; margin-top:  -1px;}
     483.lock.notes { padding: 3px 10px; }
     484.icon-button { line-height: 46px !important; }
     485.button.back-list { display: none; }
     486.subsubsub { font-size: 13px; width: 100%; }
     487.tablenav .tablenav-pages { margin: 0; }
     488.tablenav.top, p.search-box { text-align: center; }
     489.tablenav.top { margin: 20px 0 12px 0; }
     490.tablenav.bottom { margin: 8px 20px 0; }
     491#forms-table .tablenav .button { margin-bottom: 0 !important; margin-left: 10px; margin-right: 0 !important; }
     492.row-actions  { display: flex !important; }
     493#forms-table { padding: 20px 0 10px 0; }
     494tbody td.check-column, .widefat tbody th.check-column, .widefat tfoot td.check-column, .widefat thead td.check-column { padding: 8px 0 0 10px; }
     495.widefat td, .widefat th { padding: 14px 10px; }
     496input[type=checkbox] { margin: 2px 0 8px 10px !important; }
     497.widefat tfoot td input[type=checkbox], .widefat thead td input[type=checkbox] { margin: 0 0 8px 10px !important; }
     498.wp-list-table .toggle-row { top: 16px; }
     499.wp-list-table .is-expanded td:not(.hidden) { padding-bottom: 10px !important; padding-right: 20px !important; }
     500.tablenav-pages .pagination-links { font-size: 13px; }
     501.tablenav .tablenav-pages .button, .tablenav .tablenav-pages .tablenav-pages-navspan { display: inline-block; vertical-align: baseline; min-width: 30px; min-height: 30px; margin: 0 !important; padding: 0 4px; font-size: 16px; line-height: 1.625; text-align: center; margin-left: 10px; }
     502.tablenav-pages .pagination-links .current-page { margin: 0 2px 0 0; font-size: 13px; text-align: center; min-width: 30px; min-height: 30px; margin: 0; padding: 0 4px; }
    445503}
    446504
     
    450508.sform.wrap { margin: 38px 20px 0 2px; }
    451509h1.title { padding: 10px 0; }
    452 .nav-tab { border:1px solid #dcdfe6; line-height: 25px; }
     510.nav-tab { border:1px solid #dcdfe6; line-height: 24px; }
    453511#settings-tabs a, #editor-tabs a { font-size: 14px; margin-right: 5px !important; padding: 5px 25px; }
    454 #settings, #attributes { border: 1px solid #dcdfe6; }
     512#settings, #attributes, #card { border: 1px solid #dcdfe6; }
    455513.options-heading, .options-heading span span { line-height: 60px; }
    456514.options-heading { padding: 0 41px; }
     
    480538td > p.description { padding-right: 50px; }
    481539td.plaintext { padding: 36px 50px 36px 9px; }
     540td.plaintext.last { padding: 36px 50px 66px 9px; }
    482541td.plaintext.widget { padding: 24px 50px 24px 9px; line-height: 42px; }
    483542td.plaintext.icon { padding: 26px 50px 24px 9px; }
    484543td.used-page { padding: 36px 50px 36px 9px; }
    485544td.last.textarea { padding: 21px 50px 24px 9px; }
    486 }
    487 
    488 @media screen and (max-width: 782px) {
    489 tr.outside th { padding: 45px 10px 15px; }
    490 tr.outside td.plaintextt { padding: 10px; }
    491 #attributes { margin: 0 -10px; }
    492 #editor-tabs a.form-page { margin-right: 5px!important; }
    493 td.column-lock span { margin-left: -5px; margin-top:  -1px;}
    494 .lock.notes { padding: 3px 10px; }
    495 }
    496 
    497 @media screen and (min-width: 783px) {
    498545tr.outside th { padding: 66px 41px 30px; }
    499546tr.outside td.plaintext { padding: 56px 50px 24px 9px; }
    500 th.column-lock, td.column-lock { text-align: center; }
     547th.column-locks, td.column-locks, th.column-status, td.column-status { text-align: center; }
    501548.dashicons-lock, .dashicons-unlock { width: 100%; }
    502 th.column-entries, td.column-entries { width: 100px; text-align: center; }
     549th.column-entries, td.column-entries, th.column-forwarding, td.column-forwarding { width: 100px; text-align: center; }
    503550th.column-movedentries, td.column-movedentries { width: 150px; text-align: center; }
    504 /*
    505 th.column-creation, td.column-creation { width: 240px; text-align: center; }
    506 th.column-creation a span { width: 240px; text-align: center; float: inherit; }
    507 th.column-creation a  { padding-left: 30px; }
    508 th.column-creation a span.sorting-indicator { width: auto; display: inline-grid;  }
    509 */
    510 }
    511 
    512 .checkbox-switch.default:hover p {
    513 visibility: visible;
    514 }
    515 
    516 .dashicons-lock.red, .lock.notes.red { color: #D63638; }
    517 .dashicons-lock.orange, .lock.notes.orange { color: #FFA500; }
    518 .dashicons-unlock, .lock.notes { color: #85C641; }
    519 
    520 
    521 .dashicons-lock:hover + span, .dashicons-unlock:hover + span {
    522 visibility: visible;
    523 }
     551th.column-target, td.column-target { text-align: center; }
     552th.column-creation, td.column-creation { text-align: center; }
     553th.column-creation a { display: inline-flex; }
     554th.column-creation a span { margin-left: 17px; }
     555th.column-creation a span.sorting-indicator { margin-left: 7px; }
     556.button.admin { float: right; padding: 3px 10px !important; }
     557.button.admin { float: right; padding: 3px 10px !important; }
     558}
  • simpleform/trunk/admin/js/admin-min.js

    r2618058 r2664049  
    1 !function(o){"use strict";o(window).load(function(){o("ul#submissions-data").hover(function(){o("#last-submission").addClass("unseen"),o("#submissions-notice").removeClass("unseen")},function(){o("#last-submission").removeClass("unseen"),o("#submissions-notice").addClass("unseen")}),o("#shortcode-copy").click(function(){event.preventDefault();var e=document.createElement("input");e.style="position: absolute; left: -1000px; top: -1000px",document.body.appendChild(e),e.value=o("#shortcode").text(),e.select(),document.execCommand("copy"),document.body.removeChild(e),o("#shortcode-tooltip").text(ajax_sform_settings_options_object.copied),setTimeout(function(){o("#shortcode-tooltip").hide()},1500)}),o("#shortcode-copy").hover(function(){o("#shortcode-tooltip").text(ajax_sform_settings_options_object.copy),o("#shortcode-tooltip").show()},function(){o("#shortcode-tooltip").hide()}),o("#show-for").change(function(){var e=o(this).val(),e=o(location).attr("href")+"&showfor="+e;document.location.href=e}),o("#name-field").on("change",function(){"hidden"==o("#name-field option:selected").val()?o(".trname").addClass("unseen"):(o(".trname").removeClass("unseen"),1==o("#namelabel").prop("checked")?o("tr.namelabel").addClass("unseen"):o("tr.namelabel").removeClass("unseen"))}),o("#lastname-field").on("change",function(){"hidden"==o("#lastname-field option:selected").val()?o(".trlastname").addClass("unseen"):(o(".trlastname").removeClass("unseen"),1==o("#lastnamelabel").prop("checked")?o("tr.lastnamelabel").addClass("unseen"):o("tr.lastnamelabel").removeClass("unseen"))}),o("#email-field").on("change",function(){"hidden"==o("#email-field option:selected").val()?o(".tremail").addClass("unseen"):(o(".tremail").removeClass("unseen"),1==o("#emaillabel").prop("checked")?o("tr.emaillabel").addClass("unseen"):o("tr.emaillabel").removeClass("unseen"))}),o("#phone-field").on("change",function(){"hidden"==o("#phone-field option:selected").val()?o(".trphone").addClass("unseen"):(o(".trphone").removeClass("unseen"),1==o("#phonelabel").prop("checked")?o("tr.phonelabel").addClass("unseen"):o("tr.phonelabel").removeClass("unseen"))}),o("#subject-field").on("change",function(){"hidden"==o("#subject-field option:selected").val()?o(".trsubject").addClass("unseen"):(o(".trsubject").removeClass("unseen"),1==o("#subjectlabel").prop("checked")?o("tr.subjectlabel").addClass("unseen"):o("tr.subjectlabel").removeClass("unseen"))}),o("#captcha-field").on("change",function(){"hidden"==o("#captcha-field option:selected").val()?o(".trcaptchalabel").addClass("unseen"):o(".trcaptchalabel").removeClass("unseen")}),o("#preference-field").on("change",function(){"hidden"==o("#preference-field option:selected").val()?o(".trpreference").addClass("unseen"):o(".trpreference").removeClass("unseen")}),o("#consent-field").on("change",function(){"hidden"==o("#consent-field option:selected").val()?o(".trconsent").addClass("unseen"):(o(".trconsent").removeClass("unseen"),1==o("#privacy-link").prop("checked")?o(".trpage").removeClass("unseen"):o(".trpage").addClass("unseen"))}),o("#privacy-link").on("click",function(){var e,s=o("#consent-label").val(),t=ajax_sform_settings_options_object.privacy;1==o(this).prop("checked")?o(".trpage").removeClass("unseen"):(o(".trpage").addClass("unseen"),e=new RegExp("<a [^>]*>"+t+"</a>","i"),t=s.replace(e,t),o("#consent-label").val(t),o("#privacy-page").val(""),o("#set-page, #set-page-icon").addClass("unseen"),o("#set-page, #set-page-icon").attr("page",0),o("#post-status").html("&nbsp;"))}),o("#privacy-page").on("change",function(){var e=o(this).val(),s=o("#set-page").attr("page");""!=e?(o("#page-id").val(e),e==s?o("#set-page, #set-page-icon").addClass("unseen"):o("#set-page, #set-page-icon").removeClass("unseen")):(o("#set-page, #set-page-icon").addClass("unseen"),o("#privacy-link").click())}),o("#set-page").click(function(e){o("#label-error").html("");var s=o('textarea[name="consent-label"]').val(),t=o('input[name="page-id"]').val(),n=o('input[name="verification_nonce"]').val();return o.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:{action:"setting_privacy",verification_nonce:n,"page-id":t,"consent-label":s},success:function(e){!0===e.error&&o("#label-error").html("Error occurred during creation of the link"),!1===e.error&&(o("#consent-label").val(e.label),o("#set-page").addClass("unseen"),o("#set-page").attr("page",t))},error:function(e){o("#label-error").html("Error occurred during creation of the link")}}),e.preventDefault(),!1}),o("#set-page-icon").click(function(e){var s=o('textarea[name="consent-label"]').val(),t=o('input[name="page-id"]').val(),n=o('input[name="verification_nonce"]').val();return o.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:{action:"setting_privacy",verification_nonce:n,"page-id":t,"consent-label":s},success:function(e){!0===e.error&&o("#label-error-top").html("Error occurred during creation of the link"),!1===e.error&&(o("#consent-label").val(e.label),o("#set-page-icon").addClass("unseen"),o("#set-page-icon").attr("page",t))},error:function(e){o("#label-error-top").html("Error occurred during creation of the link")}}),e.preventDefault(),!1}),o(".field-label").on("click",function(){var e=o(this).attr("id");1==o(this).prop("checked")?o("tr."+e).addClass("unseen"):o("tr."+e).removeClass("unseen")}),o("#required-sign").on("click",function(){1==o(this).prop("checked")?o(".trsign").addClass("unseen"):o(".trsign").removeClass("unseen")}),o("#optional-labelling").on("click",function(){o("#required-word").val()==ajax_sform_settings_options_object.required&&o("#required-word").val(ajax_sform_settings_options_object.optional)}),o("#required-labelling").on("click",function(){o("#required-word").val()==ajax_sform_settings_options_object.optional&&o("#required-word").val(ajax_sform_settings_options_object.required)}),o(".nav-tab").on("click",function(){var e=o(this).attr("id");o(".nav-tab-active").removeClass("nav-tab-active"),o(".navtab").addClass("unseen"),o("#tab-"+e).removeClass("unseen"),o(this).addClass("nav-tab-active"),"appearance"==e?o(".editorpage").text(ajax_sform_settings_options_object.appearance):o(".editorpage").text(ajax_sform_settings_options_object.builder)}),o("#widget-editor").on("click",function(){1==o(this).prop("checked")?o(".trwidget").addClass("unseen"):o(".trwidget").removeClass("unseen")}),o("#form-template").on("change",function(){var e=o("#form-template option:selected").val();"transparent"==e?o("#form-borders").removeClass("unseen"):o("#form-borders").addClass("unseen"),"customized"==e?o("#template-notice").text(ajax_sform_settings_options_object.notes):o("#template-notice").html("&nbsp;")}),o("#stylesheet").on("click",function(){1==o(this).prop("checked")?o(".trstylesheet").removeClass("unseen"):o(".trstylesheet").addClass("unseen")}),o("#stylesheet-file").on("click",function(){1==o(this).prop("checked")?o("#stylesheet-description").html(ajax_sform_settings_options_object.cssenabled):o("#stylesheet-description").html(ajax_sform_settings_options_object.cssdisabled)}),o("#javascript").on("click",function(){1==o(this).prop("checked")?o("#javascript-description").html(ajax_sform_settings_options_object.jsenabled):o("#javascript-description").html(ajax_sform_settings_options_object.jsdisabled)}),o("#outside-error").on("change",function(){var n=o("#outside-error option:selected").val(),e=o("label#focusout").html();"none"!=n&&o(".out").each(function(e,s){var t,s=o(s);"top"==n&&(t=s.attr("placeholder").replace(ajax_sform_settings_options_object.bottom,ajax_sform_settings_options_object.top)),"bottom"==n&&(t=s.attr("placeholder").replace(ajax_sform_settings_options_object.top,ajax_sform_settings_options_object.bottom)),console.log(s.attr("placeholder")),s.attr("placeholder",t)}),"top"==n?(o("label#focusout").html(e.replace(ajax_sform_settings_options_object.nofocus,ajax_sform_settings_options_object.focusout)),o("#outside-notice").text(ajax_sform_settings_options_object.topnotes),o(".trout").removeClass("removed"),(o("#trcaptcha").hasClass("unseen")?o(".messagecell"):o(".captchacell")).removeClass("last")):"bottom"==n?(o("label#focusout").html(e.replace(ajax_sform_settings_options_object.nofocus,ajax_sform_settings_options_object.focusout)),o("#outside-notice").text(ajax_sform_settings_options_object.bottomnotes),o(".trout").removeClass("removed"),(o("#trcaptcha").hasClass("unseen")?o(".messagecell"):o(".captchacell")).removeClass("last")):(o("label#focusout").html(e.replace(ajax_sform_settings_options_object.focusout,ajax_sform_settings_options_object.nofocus)),o("#outside-notice").html("&nbsp;"),o(".trout").addClass("removed"),(o("#trcaptcha").hasClass("unseen")?o(".messagecell"):o(".captchacell")).addClass("last"))}),o("#characters-length").on("click",function(){1==o(this).prop("checked")?(o("#characters-description").html(ajax_sform_settings_options_object.showcharacters),o("#incomplete-name").val(ajax_sform_settings_options_object.numnamer),o("#incomplete-lastname").val(ajax_sform_settings_options_object.numlster),o("#incomplete-subject").val(ajax_sform_settings_options_object.numsuber),o("#incomplete-message").val(ajax_sform_settings_options_object.nummsger)):(o("#characters-description").html(ajax_sform_settings_options_object.hidecharacters),o("#incomplete-name").val(ajax_sform_settings_options_object.gennamer),o("#incomplete-lastname").val(ajax_sform_settings_options_object.genlster),o("#incomplete-subject").val(ajax_sform_settings_options_object.gensuber),o("#incomplete-message").val(ajax_sform_settings_options_object.genmsger))}),o("#ajax-submission").on("click",function(){1==o(this).prop("checked")?o(".trajax").removeClass("unseen"):o(".trajax").addClass("unseen")}),o("#confirmation-message").on("click",function(){1==o(this).prop("checked")&&(o(".trsuccessmessage").removeClass("unseen"),o(".trsuccessredirect").addClass("unseen"),o("#confirmation-page").val(""),o("#post-status").html("&nbsp;"))}),o("#success-redirect").on("click",function(){1==o(this).prop("checked")&&(o(".trsuccessmessage").addClass("unseen"),o(".trsuccessredirect").removeClass("unseen"))}),o("#confirmation-page, #privacy-page").on("change",function(){var e=o(this).find("option:selected"),s=e.attr("value");"draft"==e.attr("Tag")?o("#post-status").html(ajax_sform_settings_options_object.status+' - <strong><a href="'+ajax_sform_settings_options_object.adminurl+"post.php?post="+s+'&action=edit" target="_blank" style="text-decoration: none; color: #9ccc79;">'+ajax_sform_settings_options_object.publish+"</a></strong>"):""!=s?(e='<strong><a href="'+ajax_sform_settings_options_object.adminurl+"post.php?post="+s+'&action=edit" target="_blank" style="text-decoration: none;">'+ajax_sform_settings_options_object.edit+"</a></strong>",s='<strong><a href="'+ajax_sform_settings_options_object.pageurl+"/?page_id="+s+'" target="_blank" style="text-decoration: none;">'+ajax_sform_settings_options_object.view+"</a></strong>",s=ajax_sform_settings_options_object.pagelinks.replace(ajax_sform_settings_options_object.edit,e).replace(ajax_sform_settings_options_object.view,s),o("#post-status").html(s)):o("#post-status").html("&nbsp;")}),o(".notice-toggle").on("click",function(){o(".smpt-warnings").hasClass("unseen")?(o("#smpt-warnings").text(ajax_sform_settings_options_object.hide),o(".smpt-settings").addClass("unseen"),o(".smpt-warnings").removeClass("unseen")):(o("#smpt-warnings").text(ajax_sform_settings_options_object.show),o("#trsmtpon").removeClass("unseen"),o(".smpt-warnings").addClass("unseen"),1==o("#server-smtp").prop("checked")?(o(".trsmtp").removeClass("unseen"),1==o("#smtp-authentication").prop("checked")?o(".trauthentication").removeClass("unseen"):o(".trauthentication").addClass("unseen")):o(".trsmtp").addClass("unseen"))}),o("#server-smtp").on("click",function(){1==o(this).prop("checked")?(o(".trsmtp").removeClass("unseen"),o("#tdsmtp").removeClass("last"),o("#smtp-notice").text(ajax_sform_settings_options_object.smtpnotes),1==o("#smtp-authentication").prop("checked")?o(".trauthentication").removeClass("unseen"):o(".trauthentication").addClass("unseen")):(o(".trsmtp").addClass("unseen"),o("#tdsmtp").addClass("last"),o("#smtp-notice").text(""))}),o("#smtp-authentication").on("click",function(){1==o(this).prop("checked")?(o("#tdauthentication").removeClass("last"),o(".trauthentication").removeClass("unseen")):(o("#tdauthentication").addClass("last"),o(".trauthentication").addClass("unseen"))}),o("#notification").on("click",function(){1==o(this).prop("checked")?(o(".trnotification").removeClass("unseen"),o("#tdnotification").removeClass("last"),1==o("#custom-name").prop("checked")?o(".trcustomname").removeClass("unseen"):o(".trcustomname").addClass("unseen"),1==o("#default-subject").prop("checked")?o(".trcustomsubject").removeClass("unseen"):o(".trcustomsubject").addClass("unseen")):(o(".trnotification").addClass("unseen"),o("#tdnotification").addClass("last"))}),o("#requester-name").on("click",function(){1==o(this).prop("checked")?o(".trcustomname").addClass("unseen"):o(".trcustomname").removeClass("unseen")}),o("#form-name").on("click",function(){1==o(this).prop("checked")?o(".trcustomname").addClass("unseen"):o(".trcustomname").removeClass("unseen")}),o("#custom-name").on("click",function(){1==o(this).prop("checked")?o(".trcustomname").removeClass("unseen"):o(".trcustomname").addClass("unseen")}),o("#request-subject").on("click",function(){1==o(this).prop("checked")?o(".trcustomsubject").addClass("unseen"):o(".trcustomsubject").removeClass("unseen")}),o("#default-subject").on("click",function(){1==o(this).prop("checked")?o(".trcustomsubject").removeClass("unseen"):o(".trcustomsubject").addClass("unseen")}),o("#autoresponder").on("click",function(){1==o(this).prop("checked")?(o(".trauto").removeClass("unseen"),o("#tdconfirmation").removeClass("last")):(o(".trauto").addClass("unseen"),o("#tdconfirmation").addClass("last"))}),o("#save-settings").click(function(e){o(".message").removeClass("error success unchanged"),o(".message").addClass("seen"),o(".message").html(ajax_sform_settings_options_object.loading);var s=o("form#settings").serialize();return o.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:s+"&action=sform_edit_options",success:function(e){var s=e.error,t=(e.message,e.update);!0===s&&(o(".message").addClass("error"),o(".message").html(e.message)),!1===s&&(o(".message").html(e.message),!1===t&&o(".message").addClass("unchanged"),!0===t&&o(".message").addClass("success"))},error:function(e){o(".message").html("AJAX call failed")}}),e.preventDefault(),!1}),o(document).on("change","input[type=checkbox], input[type=radio], select",function(){o(".message").removeClass("seen error success unchanged")}),o(document).on("input","input[type=text], input[type=email], textarea",function(){o(".message").removeClass("seen error success unchanged")}),o("#save-attributes").click(function(e){o(".message").removeClass("error success unchanged"),o(".message").addClass("seen"),o(".message").text(ajax_sform_settings_options_object.saving);var s=o("form#attributes").serialize();return o.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:s+"&action=shortcode_costruction",success:function(e){var s=e.error,t=(e.message,e.update),n=e.redirect,a=e.url;!0===s&&(o(".message").addClass("error"),o(".message").html(e.message)),!1===s&&(o(".message").html(e.message),!1===t&&o(".message").addClass("unchanged"),!0===t&&(!0===n?document.location.href=a:o(".message").addClass("success")))},error:function(e){o(".message").html("AJAX call failed")}}),e.preventDefault(),!1}),o(document).on("change",".sform-target",function(){var e=o(this).val(),s=o(this).attr("field");"in"===e?o("p#usertype.role-"+s).removeClass("unseen"):o("p#usertype.role-"+s).addClass("unseen")}),o(document).on("change",".sfwidget",function(){var e=o(this).attr("box"),s=o(this).val();"all"===s?(o("div#sform-widget-hidden-pages."+e).addClass("unseen"),o("div#sform-widget-visible-pages."+e).addClass("unseen"),o("p#visibility-notes").removeClass("unseen"),o("p#visibility").addClass("visibility")):(o("p#visibility-notes").addClass("unseen"),o("p#visibility").removeClass("visibility"),"hidden"===s?(o("div#sform-widget-hidden-pages."+e).removeClass("unseen"),o("div#sform-widget-visible-pages."+e).addClass("unseen")):(o("div#sform-widget-hidden-pages."+e).addClass("unseen"),o("div#sform-widget-visible-pages."+e).removeClass("unseen")))}),o("#form").change(function(){var e=o(this).val(),s=o(location).attr("href"),t=new URLSearchParams(s),n=t.get("form");s=-1<s.indexOf("form=")?e?s.replace("&form="+n,"&form="+e):s.replace("&form="+n,""):e?s+"&form="+e:s;t=t.get("paged");s=-1<s.indexOf("paged=")?s.replace("&paged="+t,""):s,document.location.href=s}),o(".cbfield").on("click",function(){var e=o(this).attr("field");1==o(this).prop("checked")?o(".tr"+e).addClass("secret"):(o(".tr"+e).removeClass("secret"),1==o("#"+e+"label").prop("checked")?o("tr."+e+"label").addClass("unseen"):o("tr."+e+"label").removeClass("unseen"))}),o("#admin-notices").on("click",function(){1==o(this).prop("checked")?o(".admin-notices").addClass("invisible"):o(".admin-notices").removeClass("invisible")}),o("#duplicate").on("click",function(){1==o(this).prop("checked")?o(".trduplicate").removeClass("unseen"):o(".trduplicate").addClass("unseen")}),o(".sform-switch").on("click",function(){0==o(this).prop("checked")?o(this).val("false"):o(this).val("true")}),o("#admin-color").on("change",function(e){var s=o(this).val(),t=o("#settings").attr("class"),n=o('input[name="verification_nonce"]').val();return o.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:{action:"admin_color_scheme",verification_nonce:n,"admin-color":s},success:function(e){e.error;var s=e.color;!0===e.error&&o("#label-error").html("Error occurred during creation of the link"),!1===e.error&&(o(".full-width-bar, h1.title, select#form, .form-button, #settings, #smpt-warnings, .icon-button").removeClass(t),o(".full-width-bar, h1.title, select#form, .form-button, #settings, #smpt-warnings, .icon-button").addClass(s))},error:function(e){o("#label-error").html("Error occurred during creation of the link")}}),e.preventDefault(),!1}),o("span.heading").on("click",function(){var e=o(this).attr("section");o(".section."+e).toggleClass("collapsed"),o(".section."+e).hasClass("collapsed")?(o("span.toggle."+e).removeClass("dashicons-arrow-up-alt2"),o("span.toggle."+e).addClass("dashicons-arrow-down-alt2"),o("#h2-"+e).addClass("closed")):(o("span.toggle."+e).removeClass("dashicons-arrow-down-alt2"),o("span.toggle."+e).addClass("dashicons-arrow-up-alt2"),o("#h2-"+e).removeClass("closed"))}),o("#deletion-toggle, .cancel.delete").on("click",function(){o("#deletion-notice").hasClass("unseen")?(o("#deletion-toggle").addClass("unseen"),o("#deletion-notice").removeClass("unseen")):(o("#deletion-toggle").removeClass("unseen"),o("#deletion-notice").addClass("unseen"))}),o("#deletion-confirm").click(function(e){var s=o("form#deletion").serialize();return o.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:s+"&action=sform_delete_form",success:function(e){e.error;var s=e.message,t=e.redirect_url;!0===e.error&&o(".disclaimer").html(s),!1===e.error&&(o(".disclaimer").html(s),o("#deletion-buttons").addClass("unseen"),setTimeout(function(){document.location.href=t},1500))},error:function(e){o(".disclaimer").html("AJAX call failed")}}),e.preventDefault(),!1}),-1<window.location.href.indexOf("#css")&&(document.getElementById("appearance").click(),document.getElementById("additional-css").focus())})}(jQuery);
     1!function(m){"use strict";m(window).load(function(){m("ul#submissions-data").hover(function(){m("#last-submission").addClass("unseen"),m("#submissions-notice").removeClass("unseen")},function(){m("#last-submission").removeClass("unseen"),m("#submissions-notice").addClass("unseen")}),m("#shortcode-copy").click(function(){event.preventDefault();var e=document.createElement("input");e.style="position: absolute; left: -1000px; top: -1000px",document.body.appendChild(e),e.value=m("#shortcode").text(),e.select(),document.execCommand("copy"),document.body.removeChild(e),m("#shortcode-tooltip").text(ajax_sform_settings_options_object.copied),setTimeout(function(){m("#shortcode-tooltip").hide()},1500)}),m("#shortcode-copy").hover(function(){m("#shortcode-tooltip").text(ajax_sform_settings_options_object.copy),m("#shortcode-tooltip").show()},function(){m("#shortcode-tooltip").hide()}),m("#show-for").change(function(){var e=m(this).val(),e=m(location).attr("href")+"&showfor="+e;document.location.href=e}),m("#name-field").on("change",function(){"hidden"==m("#name-field option:selected").val()?m(".trname").addClass("unseen"):(m(".trname").removeClass("unseen"),1==m("#namelabel").prop("checked")?m("tr.namelabel").addClass("unseen"):m("tr.namelabel").removeClass("unseen"))}),m("#lastname-field").on("change",function(){"hidden"==m("#lastname-field option:selected").val()?m(".trlastname").addClass("unseen"):(m(".trlastname").removeClass("unseen"),1==m("#lastnamelabel").prop("checked")?m("tr.lastnamelabel").addClass("unseen"):m("tr.lastnamelabel").removeClass("unseen"))}),m("#email-field").on("change",function(){"hidden"==m("#email-field option:selected").val()?m(".tremail").addClass("unseen"):(m(".tremail").removeClass("unseen"),1==m("#emaillabel").prop("checked")?m("tr.emaillabel").addClass("unseen"):m("tr.emaillabel").removeClass("unseen"))}),m("#phone-field").on("change",function(){"hidden"==m("#phone-field option:selected").val()?m(".trphone").addClass("unseen"):(m(".trphone").removeClass("unseen"),1==m("#phonelabel").prop("checked")?m("tr.phonelabel").addClass("unseen"):m("tr.phonelabel").removeClass("unseen"))}),m("#subject-field").on("change",function(){"hidden"==m("#subject-field option:selected").val()?m(".trsubject").addClass("unseen"):(m(".trsubject").removeClass("unseen"),1==m("#subjectlabel").prop("checked")?m("tr.subjectlabel").addClass("unseen"):m("tr.subjectlabel").removeClass("unseen"))}),m("#captcha-field").on("change",function(){"hidden"==m("#captcha-field option:selected").val()?m(".trcaptchalabel").addClass("unseen"):m(".trcaptchalabel").removeClass("unseen")}),m("#preference-field").on("change",function(){"hidden"==m("#preference-field option:selected").val()?m(".trpreference").addClass("unseen"):m(".trpreference").removeClass("unseen")}),m("#consent-field").on("change",function(){"hidden"==m("#consent-field option:selected").val()?m(".trconsent").addClass("unseen"):(m(".trconsent").removeClass("unseen"),1==m("#privacy-link").prop("checked")?m(".trpage").removeClass("unseen"):m(".trpage").addClass("unseen"))}),m("#privacy-link").on("click",function(){var e,s=m("#consent-label").val(),t=ajax_sform_settings_options_object.privacy;1==m(this).prop("checked")?m(".trpage").removeClass("unseen"):(m(".trpage").addClass("unseen"),e=new RegExp("<a [^>]*>"+t+"</a>","i"),t=s.replace(e,t),m("#consent-label").val(t),m("#privacy-page").val(""),m("#set-page, #set-page-icon").addClass("unseen"),m("#set-page, #set-page-icon").attr("page",0),m("#post-status").html("&nbsp;"))}),m("#privacy-page").on("change",function(){var e=m(this).val(),s=m("#set-page").attr("page");""!=e?(m("#page-id").val(e),e==s?m("#set-page, #set-page-icon").addClass("unseen"):m("#set-page, #set-page-icon").removeClass("unseen")):(m("#set-page, #set-page-icon").addClass("unseen"),m("#privacy-link").click())}),m("#set-page").click(function(e){m("#label-error").html("");var s=m('textarea[name="consent-label"]').val(),t=m('input[name="page-id"]').val(),n=m('input[name="verification_nonce"]').val();return m.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:{action:"setting_privacy",verification_nonce:n,"page-id":t,"consent-label":s},success:function(e){!0===e.error&&m("#label-error").html("Error occurred during creation of the link"),!1===e.error&&(m("#consent-label").val(e.label),m("#set-page").addClass("unseen"),m("#set-page").attr("page",t))},error:function(e){m("#label-error").html("Error occurred during creation of the link")}}),e.preventDefault(),!1}),m("#set-page-icon").click(function(e){var s=m('textarea[name="consent-label"]').val(),t=m('input[name="page-id"]').val(),n=m('input[name="verification_nonce"]').val();return m.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:{action:"setting_privacy",verification_nonce:n,"page-id":t,"consent-label":s},success:function(e){!0===e.error&&m("#label-error-top").html("Error occurred during creation of the link"),!1===e.error&&(m("#consent-label").val(e.label),m("#set-page-icon").addClass("unseen"),m("#set-page-icon").attr("page",t))},error:function(e){m("#label-error-top").html("Error occurred during creation of the link")}}),e.preventDefault(),!1}),m(".field-label").on("click",function(){var e=m(this).attr("id");1==m(this).prop("checked")?m("tr."+e).addClass("unseen"):m("tr."+e).removeClass("unseen")}),m("#required-sign").on("click",function(){1==m(this).prop("checked")?m(".trsign").addClass("unseen"):m(".trsign").removeClass("unseen")}),m("#optional-labelling").on("click",function(){m("#required-word").val()==ajax_sform_settings_options_object.required&&m("#required-word").val(ajax_sform_settings_options_object.optional)}),m("#required-labelling").on("click",function(){m("#required-word").val()==ajax_sform_settings_options_object.optional&&m("#required-word").val(ajax_sform_settings_options_object.required)}),m(".nav-tab").on("click",function(){var e=m(this).attr("id");m(".nav-tab-active").removeClass("nav-tab-active"),m(".navtab").addClass("unseen"),m("#tab-"+e).removeClass("unseen"),m(this).addClass("nav-tab-active"),"appearance"==e?m(".editorpage").text(ajax_sform_settings_options_object.appearance):m(".editorpage").text(ajax_sform_settings_options_object.builder)}),m("#widget-editor").on("click",function(){1==m(this).prop("checked")?m(".trwidget").addClass("unseen"):m(".trwidget").removeClass("unseen")}),m("#form-template").on("change",function(){var e=m("#form-template option:selected").val();"transparent"==e?m("#form-borders").removeClass("unseen"):m("#form-borders").addClass("unseen"),"customized"==e?m("#template-notice").text(ajax_sform_settings_options_object.notes):m("#template-notice").html("&nbsp;")}),m("#stylesheet").on("click",function(){1==m(this).prop("checked")?m(".trstylesheet").removeClass("unseen"):m(".trstylesheet").addClass("unseen")}),m("#stylesheet-file").on("click",function(){1==m(this).prop("checked")?m("#stylesheet-description").html(ajax_sform_settings_options_object.cssenabled):m("#stylesheet-description").html(ajax_sform_settings_options_object.cssdisabled)}),m("#javascript").on("click",function(){1==m(this).prop("checked")?m("#javascript-description").html(ajax_sform_settings_options_object.jsenabled):m("#javascript-description").html(ajax_sform_settings_options_object.jsdisabled)}),m("#outside-error").on("change",function(){var n=m("#outside-error option:selected").val(),e=m("label#focusout").html();"none"!=n&&m(".out").each(function(e,s){var t,s=m(s);"top"==n&&(t=s.attr("placeholder").replace(ajax_sform_settings_options_object.bottom,ajax_sform_settings_options_object.top)),"bottom"==n&&(t=s.attr("placeholder").replace(ajax_sform_settings_options_object.top,ajax_sform_settings_options_object.bottom)),console.log(s.attr("placeholder")),s.attr("placeholder",t)}),"top"==n?(m("label#focusout").html(e.replace(ajax_sform_settings_options_object.nofocus,ajax_sform_settings_options_object.focusout)),m("#outside-notice").text(ajax_sform_settings_options_object.topnotes),m(".trout").removeClass("removed"),(m("#trcaptcha").hasClass("unseen")?m(".messagecell"):m(".captchacell")).removeClass("last")):"bottom"==n?(m("label#focusout").html(e.replace(ajax_sform_settings_options_object.nofocus,ajax_sform_settings_options_object.focusout)),m("#outside-notice").text(ajax_sform_settings_options_object.bottomnotes),m(".trout").removeClass("removed"),(m("#trcaptcha").hasClass("unseen")?m(".messagecell"):m(".captchacell")).removeClass("last")):(m("label#focusout").html(e.replace(ajax_sform_settings_options_object.focusout,ajax_sform_settings_options_object.nofocus)),m("#outside-notice").html("&nbsp;"),m(".trout").addClass("removed"),(m("#trcaptcha").hasClass("unseen")?m(".messagecell"):m(".captchacell")).addClass("last"))}),m("#characters-length").on("click",function(){1==m(this).prop("checked")?(m("#characters-description").html(ajax_sform_settings_options_object.showcharacters),m("#incomplete-name").val(ajax_sform_settings_options_object.numnamer),m("#incomplete-lastname").val(ajax_sform_settings_options_object.numlster),m("#incomplete-subject").val(ajax_sform_settings_options_object.numsuber),m("#incomplete-message").val(ajax_sform_settings_options_object.nummsger)):(m("#characters-description").html(ajax_sform_settings_options_object.hidecharacters),m("#incomplete-name").val(ajax_sform_settings_options_object.gennamer),m("#incomplete-lastname").val(ajax_sform_settings_options_object.genlster),m("#incomplete-subject").val(ajax_sform_settings_options_object.gensuber),m("#incomplete-message").val(ajax_sform_settings_options_object.genmsger))}),m("#ajax-submission").on("click",function(){1==m(this).prop("checked")?m(".trajax").removeClass("unseen"):m(".trajax").addClass("unseen")}),m("#confirmation-message").on("click",function(){1==m(this).prop("checked")&&(m(".trsuccessmessage").removeClass("unseen"),m(".trsuccessredirect").addClass("unseen"),m("#confirmation-page").val(""),m("#post-status").html("&nbsp;"))}),m("#success-redirect").on("click",function(){1==m(this).prop("checked")&&(m(".trsuccessmessage").addClass("unseen"),m(".trsuccessredirect").removeClass("unseen"))}),m("#confirmation-page, #privacy-page").on("change",function(){var e=m(this).find("option:selected"),s=e.attr("value");"draft"==e.attr("Tag")?m("#post-status").html(ajax_sform_settings_options_object.status+' - <strong><a href="'+ajax_sform_settings_options_object.adminurl+"post.php?post="+s+'&action=edit" target="_blank" style="text-decoration: none; color: #9ccc79;">'+ajax_sform_settings_options_object.publish+"</a></strong>"):""!=s?(e='<strong><a href="'+ajax_sform_settings_options_object.adminurl+"post.php?post="+s+'&action=edit" target="_blank" style="text-decoration: none;">'+ajax_sform_settings_options_object.edit+"</a></strong>",s='<strong><a href="'+ajax_sform_settings_options_object.pageurl+"/?page_id="+s+'" target="_blank" style="text-decoration: none;">'+ajax_sform_settings_options_object.view+"</a></strong>",s=ajax_sform_settings_options_object.pagelinks.replace(ajax_sform_settings_options_object.edit,e).replace(ajax_sform_settings_options_object.view,s),m("#post-status").html(s)):m("#post-status").html("&nbsp;")}),m(".notice-toggle").on("click",function(){m(".smpt-warnings").hasClass("unseen")?(m("#smpt-warnings").text(ajax_sform_settings_options_object.hide),m(".smpt-settings").addClass("unseen"),m(".smpt-warnings").removeClass("unseen")):(m("#smpt-warnings").text(ajax_sform_settings_options_object.show),m("#trsmtpon").removeClass("unseen"),m(".smpt-warnings").addClass("unseen"),1==m("#server-smtp").prop("checked")?(m(".trsmtp").removeClass("unseen"),1==m("#smtp-authentication").prop("checked")?m(".trauthentication").removeClass("unseen"):m(".trauthentication").addClass("unseen")):m(".trsmtp").addClass("unseen"))}),m("#server-smtp").on("click",function(){1==m(this).prop("checked")?(m(".trsmtp").removeClass("unseen"),m("#tdsmtp").removeClass("last"),m("#smtp-notice").text(ajax_sform_settings_options_object.smtpnotes),1==m("#smtp-authentication").prop("checked")?m(".trauthentication").removeClass("unseen"):m(".trauthentication").addClass("unseen")):(m(".trsmtp").addClass("unseen"),m("#tdsmtp").addClass("last"),m("#smtp-notice").text(""))}),m("#smtp-authentication").on("click",function(){1==m(this).prop("checked")?(m("#tdauthentication").removeClass("last"),m(".trauthentication").removeClass("unseen")):(m("#tdauthentication").addClass("last"),m(".trauthentication").addClass("unseen"))}),m("#notification").on("click",function(){1==m(this).prop("checked")?(m(".trnotification").removeClass("unseen"),m("#tdnotification").removeClass("last"),1==m("#custom-name").prop("checked")?m(".trcustomname").removeClass("unseen"):m(".trcustomname").addClass("unseen"),1==m("#default-subject").prop("checked")?m(".trcustomsubject").removeClass("unseen"):m(".trcustomsubject").addClass("unseen")):(m(".trnotification").addClass("unseen"),m("#tdnotification").addClass("last"))}),m("#requester-name").on("click",function(){1==m(this).prop("checked")?m(".trcustomname").addClass("unseen"):m(".trcustomname").removeClass("unseen")}),m("#form-name").on("click",function(){1==m(this).prop("checked")?m(".trcustomname").addClass("unseen"):m(".trcustomname").removeClass("unseen")}),m("#custom-name").on("click",function(){1==m(this).prop("checked")?m(".trcustomname").removeClass("unseen"):m(".trcustomname").addClass("unseen")}),m("#request-subject").on("click",function(){1==m(this).prop("checked")?m(".trcustomsubject").addClass("unseen"):m(".trcustomsubject").removeClass("unseen")}),m("#default-subject").on("click",function(){1==m(this).prop("checked")?m(".trcustomsubject").removeClass("unseen"):m(".trcustomsubject").addClass("unseen")}),m("#autoresponder").on("click",function(){1==m(this).prop("checked")?(m(".trauto").removeClass("unseen"),m("#tdconfirmation").removeClass("last")):(m(".trauto").addClass("unseen"),m("#tdconfirmation").addClass("last"))}),m("#save-settings").click(function(e){m(".message").removeClass("error success unchanged"),m(".message").addClass("seen"),m(".message").html(ajax_sform_settings_options_object.loading);var s=m("form#settings").serialize();return m.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:s+"&action=sform_edit_options",success:function(e){var s=e.error,t=(e.message,e.update);!0===s&&(m(".message").addClass("error"),m(".message").html(e.message)),!1===s&&(m(".message").html(e.message),!1===t&&m(".message").addClass("unchanged"),!0===t&&m(".message").addClass("success"))},error:function(e){m(".message").html("AJAX call failed")}}),e.preventDefault(),!1}),m(document).on("change","input[type=checkbox], input[type=radio], select",function(){m(".message").removeClass("seen error success unchanged")}),m(document).on("input","input[type=text], input[type=email], textarea",function(){m(".message").removeClass("seen error success unchanged")}),m("#save-attributes").click(function(e){m(".message").removeClass("error success unchanged"),m(".message").addClass("seen"),m(".message").text(ajax_sform_settings_options_object.saving);var s=m("form#attributes").serialize();return m.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:s+"&action=shortcode_costruction",success:function(e){var s=e.error,t=(e.message,e.update),n=e.redirect,a=e.url;!0===s&&(m(".message").addClass("error"),m(".message").html(e.message)),!1===s&&(m(".message").html(e.message),!1===t&&m(".message").addClass("unchanged"),!0===t&&(!0===n?document.location.href=a:m(".message").addClass("success")))},error:function(e){m(".message").html("AJAX call failed")}}),e.preventDefault(),!1}),m(document).on("change",".sform-target",function(){var e=m(this).val(),s=m(this).attr("field");"in"===e?m("p#usertype.role-"+s).removeClass("unseen"):m("p#usertype.role-"+s).addClass("unseen")}),m(document).on("change",".sfwidget",function(){var e=m(this).attr("box"),s=m(this).val();"all"===s?(m("div#sform-widget-hidden-pages."+e).addClass("unseen"),m("div#sform-widget-visible-pages."+e).addClass("unseen"),m("p#visibility-notes").removeClass("unseen"),m("p#visibility").addClass("visibility")):(m("p#visibility-notes").addClass("unseen"),m("p#visibility").removeClass("visibility"),"hidden"===s?(m("div#sform-widget-hidden-pages."+e).removeClass("unseen"),m("div#sform-widget-visible-pages."+e).addClass("unseen")):(m("div#sform-widget-hidden-pages."+e).addClass("unseen"),m("div#sform-widget-visible-pages."+e).removeClass("unseen")))}),m("#form").change(function(){var e=m(this).val(),s=m(location).attr("href"),t=new URLSearchParams(s),n=t.get("form");s=-1<s.indexOf("form=")?e?s.replace("&form="+n,"&form="+e):s.replace("&form="+n,""):e?s+"&form="+e:s;t=t.get("paged");s=-1<s.indexOf("paged=")?s.replace("&paged="+t,""):s,document.location.href=s}),m(".cbfield").on("click",function(){var e=m(this).attr("field");1==m(this).prop("checked")?m(".tr"+e).addClass("secret"):(m(".tr"+e).removeClass("secret"),1==m("#"+e+"label").prop("checked")?m("tr."+e+"label").addClass("unseen"):m("tr."+e+"label").removeClass("unseen"))}),m("#admin-notices").on("click",function(){1==m(this).prop("checked")?m(".admin-notices").addClass("invisible"):m(".admin-notices").removeClass("invisible")}),m("#duplicate").on("click",function(){1==m(this).prop("checked")?m(".trduplicate").removeClass("unseen"):m(".trduplicate").addClass("unseen")}),m(".sform-switch").on("click",function(){0==m(this).prop("checked")?m(this).val("false"):m(this).val("true")}),m("#admin-color").on("change",function(e){var s=m(this).val(),t=m("#settings").attr("class"),n=m('input[name="verification_nonce"]').val();return m.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:{action:"admin_color_scheme",verification_nonce:n,"admin-color":s},success:function(e){e.error;var s=e.color;!0===e.error&&m("#label-error").html("Error occurred during creation of the link"),!1===e.error&&(m(".full-width-bar, h1.title, select#form, .form-button, #settings, #smpt-warnings, .icon-button").removeClass(t),m(".full-width-bar, h1.title, select#form, .form-button, #settings, #smpt-warnings, .icon-button").addClass(s))},error:function(e){m("#label-error").html("Error occurred during creation of the link")}}),e.preventDefault(),!1}),m("span.heading").on("click",function(){var e=m(this).attr("section");m(".section."+e).toggleClass("collapsed"),m(".section."+e).hasClass("collapsed")?(m("span.toggle."+e).removeClass("dashicons-arrow-up-alt2"),m("span.toggle."+e).addClass("dashicons-arrow-down-alt2"),m("#h2-"+e).addClass("closed")):(m("span.toggle."+e).removeClass("dashicons-arrow-down-alt2"),m("span.toggle."+e).addClass("dashicons-arrow-up-alt2"),m("#h2-"+e).removeClass("closed"))}),-1<window.location.href.indexOf("#css")&&(document.getElementById("appearance").click(),document.getElementById("additional-css").focus()),m("#deletion-toggle, .cancel.delete").on("click",function(){m("#deletion-notice").hasClass("unseen")?(m("#alert-wrap").addClass("unseen"),m("#form-buttons").addClass("unseen"),m("#deletion-toggle").addClass("unseen"),m("#deletion-notice").removeClass("unseen"),m("span#confirm").addClass("unseen")):(m("#alert-wrap").removeClass("unseen"),m("#form-buttons").removeClass("unseen"),m("#deletion-toggle").removeClass("unseen"),m("#deletion-notice").addClass("unseen"),m("span#default").removeClass("unseen"),m("#deletion-notice").removeClass("confirm"),m("#confirmation").val(""))}),m("#deletion-form").on("click",function(){1==m(this).prop("checked")?m("#deletion-toggle").removeClass("unseen"):(m("#deletion-toggle").addClass("unseen"),m("#alert-wrap").removeClass("unseen"),m("#form-buttons").removeClass("unseen"),m("#deletion-notice").addClass("unseen"),m("span#default").removeClass("unseen"),m("#deletion-notice").removeClass("confirm"),m("#confirmation").val(""))}),m("#deletion-confirm").click(function(e){var s=m("form#deletion").serialize();return m.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:s+"&action=sform_delete_form",success:function(e){e.error;var s=e.message,t=e.redirect_url,n=e.img,a=e.confirm;!0===e.error&&(m("span#default").addClass("unseen"),m("span#confirm").removeClass("unseen"),m("span#confirm").html(s),a&&(m("#deletion-notice").addClass("confirm"),m("#hidden-confirm").html(a))),!1===e.error&&(m(".disclaimer").html(s),m("#deletion-buttons").addClass("unseen"),m("#deletion-notice").removeClass("confirm"),m("#deletion-notice, .disclaimer").addClass("success"),m("h3.deletion").text(s),m(".disclaimer").html(n),setTimeout(function(){document.location.href=t},3e3))},error:function(e){m(".disclaimer").html("AJAX call failed")}}),e.preventDefault(),!1}),m("#relocation").on("click",function(){1==m(this).prop("checked")?(m(".trmoving").removeClass("unseen"),""!=m("#moveto").val()&&(m(".trmoveto").removeClass("unseen"),""!=m("#starting").val()&&"next"!=m("#starting").val()&&m(".tronetime").removeClass("unseen"))):(m(".trmoving").addClass("unseen"),m(".trmoveto").addClass("unseen"),m(".tronetime").addClass("unseen"))}),m("#moveto").on("change",function(){var e=m(this).val(),s=m('#moveto option[value="'+e+'"]').text();m("#starting").val(""),m("#onetime").prop("checked",!0),m(".description.onetime").addClass("invisible"),m(".tronetime").addClass("unseen"),""==e?(m(".trmoveto").addClass("unseen"),m("#starting").val(""),m("#onetime").prop("checked",!0)):(m("#form-to").val(s),m(".trmoveto").removeClass("unseen"))}),m("#starting").on("change",function(){var e=m(this).val();"next"==e||""==e?(m(".tronetime").addClass("unseen"),m("#onetime").prop("checked",!1),m(".description.onetime").removeClass("invisible")):(m(".tronetime").removeClass("unseen"),m("#onetime").prop("checked",!0),m(".description.onetime").addClass("invisible"))}),m("#onetime").on("click",function(){1==m(this).prop("checked")?m(".description.onetime").addClass("invisible"):m(".description.onetime").removeClass("invisible")}),m("#save-card").click(function(e){m(".message").removeClass("error success unchanged"),m(".message").addClass("seen"),m(".message").text(ajax_sform_settings_options_object.saving);var s=m("form#card").serialize();return m.ajax({type:"POST",dataType:"json",url:ajax_sform_settings_options_object.ajaxurl,data:s+"&action=form_update",success:function(e){var s=e.error,t=(e.message,e.update),n=e.redirect,a=e.moving,o=e.restore,r=e.messages,i=e.moved,c=e.select,l=e.onetime,d=e.url;!0===s&&(m(".message").addClass("error"),m(".message").html(e.message),!0===n&&setTimeout(function(){document.location.href=d},1e3)),!1===s&&(m(".message").html(e.message),!1===t?m(".message").addClass("unchanged"):(m(".message").addClass("success"),!0===a&&(m("#starting").html(c),m("#tdentries").removeClass("last"),m(".trmoved, .trrestore").removeClass("unseen"),m("#entries").text(r),m("#submissions").val(r),m("#moved-entries").text(i),m("#moved-submissions").val(i),!1===l?(m("#starting").val("next"),m(".tronetime").addClass("unseen")):(m("#relocation").prop("checked",!1),m("#moveto").val(""),m("#starting").val(""),m(".trmoving, .trmoveto, .tronetime").addClass("unseen"))),!1===a&&(!0===o&&(m("#starting").html(c),m("#tdentries").addClass("last"),m(".trrestore").removeClass("unseen"),m("#entries").text(r),m("#submissions").val(r),m("#moved-entries").text(i),m("#moved-submissions").val(i),m("#restore").prop("checked",!1),m(".trmoved, .trrestore").addClass("unseen")),!1===l&&m("#starting").val("next"))))},error:function(e){m(".message").html("AJAX call failed")}}),e.preventDefault(),!1});var e=document.getElementById("new-release").innerHTML;m("#storing-notice").on("click",function(){document.getElementById("new-release").innerHTML===e?document.getElementById("new-release").innerHTML=ajax_sform_settings_options_object.storing_notice:document.getElementById("new-release").innerHTML=e})})}(jQuery);
  • simpleform/trunk/admin/js/admin.js

    r2618058 r2664049  
    737737       });
    738738       
     739       if( window.location.href.indexOf("#css") > -1 ) {
     740          document.getElementById('appearance').click();
     741          document.getElementById('additional-css').focus();
     742       }
     743       
    739744       $("#deletion-toggle, .cancel.delete").on("click", function() {
    740745         if( $('#deletion-notice').hasClass('unseen') ) {
     746             $('#alert-wrap').addClass('unseen');
     747             $('#form-buttons').addClass('unseen');
    741748             $('#deletion-toggle').addClass('unseen');
    742749             $('#deletion-notice').removeClass('unseen');
     750             $('span#confirm').addClass('unseen');
    743751         }
    744752         else {
     753           $('#alert-wrap').removeClass('unseen');
     754           $('#form-buttons').removeClass('unseen');
    745755           $('#deletion-toggle').removeClass('unseen');
    746756           $('#deletion-notice').addClass('unseen');
    747          }
    748        });
    749    
     757           $('span#default').removeClass('unseen');
     758           $('#deletion-notice').removeClass('confirm');
     759           $('#confirmation').val('');
     760        }
     761       });
     762       
     763       $("#deletion-form").on("click", function() {
     764         if($(this).prop('checked') == true) {
     765           $('#deletion-toggle').removeClass('unseen');
     766         }
     767         else {
     768           $('#deletion-toggle').addClass('unseen');
     769           $('#alert-wrap').removeClass('unseen');
     770           $('#form-buttons').removeClass('unseen');
     771           $('#deletion-notice').addClass('unseen');
     772           $('span#default').removeClass('unseen');
     773           $('#deletion-notice').removeClass('confirm');
     774           $('#confirmation').val('');
     775         }
     776       });
     777 
    750778       $('#deletion-confirm').click(function(e){
    751779         var formData = $('form#deletion').serialize();
     
    759787              var message = data['message'];
    760788              var redirect_url = data['redirect_url'];
     789              var img = data['img'];
     790              var confirm = data['confirm'];
    761791              if( data.error === true ){
    762                 $('.disclaimer').html(message);
    763               }
     792                $('span#default').addClass('unseen');
     793                $('span#confirm').removeClass('unseen');
     794                $('span#confirm').html(message);
     795                if ( confirm ) {
     796                  $('#deletion-notice').addClass('confirm');
     797                  $('#hidden-confirm').html(confirm);
     798                }
     799             }
    764800              if( data.error === false ){               
    765801                $('.disclaimer').html(message);
    766802                $('#deletion-buttons').addClass('unseen');
    767                 setTimeout(function(){ document.location.href = redirect_url; }, 1500);
     803                $('#deletion-notice').removeClass('confirm');
     804                $('#deletion-notice, .disclaimer').addClass('success');
     805                $('h3.deletion').text(message);
     806                $('.disclaimer').html(img);
     807                setTimeout(function(){ document.location.href = redirect_url; }, 3000);
    768808              }
    769809            },
     
    775815          return false;
    776816       });
     817
     818       $("#relocation").on("click", function() {
     819         if($(this).prop('checked') == true) {
     820           $('.trmoving').removeClass('unseen');
     821           if ( $("#moveto").val() != '' ) {
     822              $('.trmoveto').removeClass('unseen');
     823              if ( $("#starting").val() != '' && $("#starting").val() != 'next' ) {
     824                 $('.tronetime').removeClass('unseen');
     825              }
     826           }
     827         }
     828         else {
     829           $('.trmoving').addClass('unseen');
     830           $('.trmoveto').addClass('unseen');
     831           $('.tronetime').addClass('unseen');
     832         }
     833       });
     834
     835       $('#moveto').on('change', function () {
     836          var selectVal = $(this).val();
     837          var selectName = $('#moveto option[value="' + selectVal +'"]').text();
     838          $('#starting').val('');
     839          $( "#onetime" ).prop( "checked", true );
     840          $('.description.onetime').addClass('invisible');
     841          $('.tronetime').addClass('unseen');
     842          if ( selectVal == '' ) {
     843             $('.trmoveto').addClass('unseen');
     844             $('#starting').val('');
     845             $( "#onetime" ).prop( "checked", true );
     846          }
     847          else {
     848             $('#form-to').val(selectName);
     849             $('.trmoveto').removeClass('unseen');
     850          }
     851       });         
     852
     853       $('#starting').on('change', function () {
     854          var selectVal = $(this).val();
     855          if ( selectVal == 'next' || selectVal == '' ) {
     856              $('.tronetime').addClass('unseen');
     857              $( "#onetime" ).prop( "checked", false );
     858              $('.description.onetime').removeClass('invisible');
     859          }
     860          else {
     861              $('.tronetime').removeClass('unseen');
     862              $( "#onetime" ).prop( "checked", true );
     863              $('.description.onetime').addClass('invisible');
     864         }
     865       });         
     866
     867       $("#onetime").on("click", function() {
     868         if($(this).prop('checked') == true) {
     869           $('.description.onetime').addClass('invisible');
     870         }
     871         else {
     872           $('.description.onetime').removeClass('invisible');
     873         }
     874       });
     875
     876        $('#save-card').click(function(e){
     877          $('.message').removeClass('error success unchanged');
     878          $('.message').addClass('seen');
     879          $('.message').text(ajax_sform_settings_options_object.saving);
     880          var formData = $('form#card').serialize();
     881          $.ajax({
     882            type: 'POST',
     883            dataType: 'json',
     884            url: ajax_sform_settings_options_object.ajaxurl,
     885            data: formData + '&action=form_update',
     886            success: function(data){
     887              var error = data['error'];
     888              var message = data['message'];
     889              var update = data['update'];
     890              var redirect = data['redirect'];
     891              var moving = data['moving'];
     892              var restore = data['restore'];
     893              var messages = data['messages'];
     894              var moved = data['moved'];
     895              var select = data['select'];
     896              var onetime = data['onetime'];
     897              var url = data['url'];
     898              if( error === true ){
     899                $('.message').addClass('error');
     900                $('.message').html(data.message);
     901                if( redirect === true ) { setTimeout(function(){ document.location.href = url; }, 1000); }
     902              }
     903              if( error === false ){
     904                $('.message').html(data.message);
     905                if( update === false ) {
     906                  $('.message').addClass('unchanged');
     907                }
     908                else {
     909                  $('.message').addClass('success');
     910                  if ( moving === true ) {
     911                    $('#starting').html(select);
     912                    $('#tdentries').removeClass('last');
     913                    $('.trmoved, .trrestore').removeClass('unseen');
     914                    $('#entries').text(messages);
     915                    $('#submissions').val(messages);
     916                    $('#moved-entries').text(moved);
     917                    $('#moved-submissions').val(moved);
     918                    if( onetime === false ){
     919                      $('#starting').val('next');
     920                      $('.tronetime').addClass('unseen');
     921                    }
     922                    else {                       
     923                      $('#relocation').prop( "checked", false );
     924                      $('#moveto').val('');
     925                      $('#starting').val('');
     926                      $('.trmoving, .trmoveto, .tronetime').addClass('unseen');
     927                    }
     928                  }
     929                  if ( moving === false ) {
     930                    if ( restore === true ) {
     931                      $('#starting').html(select);
     932                      $('#tdentries').addClass('last');
     933                      $('.trrestore').removeClass('unseen');                     
     934                      $('#entries').text(messages);
     935                      $('#submissions').val(messages);
     936                      $('#moved-entries').text(moved);
     937                      $('#moved-submissions').val(moved);
     938                      $( "#restore" ).prop( "checked", false );
     939                      $('.trmoved, .trrestore').addClass('unseen');
     940                     }
     941                    if ( onetime === false ) {
     942                       $('#starting').val('next');
     943                    }
     944                   }
     945                }
     946              }
     947            },
     948            error: function(data){
     949              $('.message').html('AJAX call failed');
     950            }   
     951          });
     952          e.preventDefault();
     953          return false;
     954       });
    777955       
    778        if( window.location.href.indexOf("#css") > -1 ) {
    779           document.getElementById('appearance').click();
    780           document.getElementById('additional-css').focus();
    781        }       
    782        
     956       var currentText = document.getElementById("new-release").innerHTML;
     957   
     958       $("#storing-notice").on("click", function() {
     959         if ( document.getElementById("new-release").innerHTML === currentText) {
     960             document.getElementById("new-release").innerHTML = ajax_sform_settings_options_object.storing_notice;
     961         } else {
     962             document.getElementById("new-release").innerHTML = currentText;
     963         } 
     964       });
     965       
    783966     });
    784 
     967             
    785968})( jQuery );
  • simpleform/trunk/admin/partials/editor.php

    r2581779 r2664049  
    1919global $wpdb;
    2020$table_name = "{$wpdb->prefix}sform_shortcodes";
    21 $page_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget = '0' ORDER BY name ASC", 'ARRAY_A' );
    22 $widget_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget != '0' ORDER BY name ASC", 'ARRAY_A' );
     21$page_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget = '0' AND status != 'trash' ORDER BY name ASC", 'ARRAY_A' );
     22$widget_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget != '0' AND status != 'trash' ORDER BY name ASC", 'ARRAY_A' );
    2323$page_ids = array_column($page_forms, 'id');
    2424$widget_ids = array_column($widget_forms, 'id');
     
    121121?>   
    122122
     123<tr><th class="option"><span><?php _e('Form Name','simpleform') ?></span></th><td class="text"><input class="sform" name="form-name" placeholder="<?php esc_attr_e('Enter a name for this Form','simpleform') ?>" id="form-name" type="text" value="<?php echo $contact_form_name; ?>"></td></tr>
     124
    123125<tr><th class="option"><span><?php _e('Shortcode','simpleform') ?></span></th><td class="plaintext icon"><span id="shortcode">[<?php echo $shortcode ?>]</span><button id="shortcode-copy"><img src="<?php echo $icon ?>"></button><span id="shortcode-tooltip"><?php _e('Copy shortcode','simpleform') ?></span></td></tr>
    124126
    125 <tr><th class="option"><span><?php _e('Form Name','simpleform') ?></span></th><td class="text"><input class="sform" name="form-name" placeholder="<?php esc_attr_e('Enter a name for this Form','simpleform') ?>" id="form-name" type="text" value="<?php echo $contact_form_name; ?>"></td></tr>
    126 
    127127<tr><th class="option"><span><?php _e('Show for','simpleform') ?></span></th><td class="select"><select name="show-for" id="show-for" class="sform"><option value="all" <?php selected( $show_for, 'all'); ?>><?php _e('Everyone','simpleform') ?></option><option value="in" <?php selected( $show_for, 'in'); ?>><?php _e('Logged-in users','simpleform') ?></option><option value="out" <?php selected( $show_for, 'out'); ?>><?php _e('Logged-out users','simpleform') ?></option></select></td></tr>
    128128
    129129<tr class="trlevel <?php if ( $show_for !='in') {echo 'unseen';} ?>"><th class="option"><span><?php _e('Role','simpleform') ?></span></th><td class="select"><select name="user-role" id="user-role" class="sform"><option value="any" <?php selected( $user_role, 'any'); ?>><?php _e('Any','simpleform') ?></option><?php wp_dropdown_roles($user_role); ?></select></td></tr>
    130130
    131 <tr><th class="option"><span><?php _e('Used in','simpleform') ?></span></th><td class="used-page last">
     131<tr><th class="option"><span><?php _e('Published in','simpleform') ?></span></th><td class="used-page last">   
    132132
    133133<?php
     
    250250<?php } ?>
    251251
    252 <tr><th class="option"><span><?php _e('Used in','simpleform') ?></span></th><td class="used-page last"><?php echo $widget_pages; ?></td></tr>
     252<tr><th class="option"><span><?php _e('Published in','simpleform') ?></span></th><td class="used-page last"><?php echo $widget_pages; ?></td></tr>
    253253
    254254<input type="hidden" id="widget-id" name="widget-id" value="<?php echo $widget_id ?>">
  • simpleform/trunk/admin/partials/new.php

    r2544675 r2664049  
    1414<div id="new-release" class="<?php if ( $admin_notices == 'true' ) {echo 'invisible';} ?>"><?php echo apply_filters( 'sform_update', $notice ); ?>&nbsp;</div>
    1515
    16 <div class="full-width-bar <?php echo $color ?>"><h1 class="title <?php echo $color ?>"><span class="dashicons dashicons-plus-alt responsive"></span><?php _e( 'Add New', 'simpleform' ); ?></h1></div>
     16<div class="full-width-bar <?php echo $color ?>"><h1 class="title <?php echo $color ?>"><span class="dashicons dashicons-plus-alt responsive"></span><?php _e( 'Add New', 'simpleform' ); ?>
     17
     18
     19<a href="<?php echo esc_url(get_admin_url(get_current_blog_id(), 'admin.php?page=sform-forms')) ?>"><span class="dashicons dashicons-list-view icon-button admin <?php echo $color ?>"></span><span class="wp-core-ui button admin back-list <?php echo $color ?>"><?php _e( 'Back to forms', 'simpleform' ) ?></span></a>
     20
     21</h1></div>
    1722
    1823<div id="page-description"><p><?php _e( 'Adding a new form is quick and easy. Do it whenever you need it!','simpleform') ?></p></div>
  • simpleform/trunk/admin/partials/settings.php

    r2587421 r2664049  
    2020global $wpdb;
    2121$table_name = "{$wpdb->prefix}sform_shortcodes";
    22 $page_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget = '0' ORDER BY name ASC", 'ARRAY_A' );
    23 $widget_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget != '0' ORDER BY name ASC", 'ARRAY_A' );
     22$page_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget = '0' AND status != 'trash' ORDER BY name ASC", 'ARRAY_A' );
     23$widget_forms = $wpdb->get_results( "SELECT id, name FROM $table_name WHERE widget != '0' AND status != 'trash' ORDER BY name ASC", 'ARRAY_A' );
    2424$page_ids = array_column($page_forms, 'id');
    2525$widget_ids = array_column($widget_forms, 'id');
  • simpleform/trunk/changelog.txt

    r2618058 r2664049  
    11== Changelog ==
     2
     3= 2.1 (25 January 2022) =
     4* Changed: code cleaning and optimization
     5* Added: forms page
    26
    37= 2.0.9 (22 October 2021) =
  • simpleform/trunk/includes/class-activator.php

    r2591776 r2664049  
    5454
    5555        $current_db_version = SIMPLEFORM_DB_VERSION;
    56 
    57         global $wpdb;
    58         $charset_collate = $wpdb->get_charset_collate();
    5956        $installed_version = get_option('sform_db_version');
    60         $prefix = $wpdb->prefix;
    61         require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    6257
    6358        if ( $installed_version != $current_db_version ) {
     59           
     60          global $wpdb;
     61          $shortcodes_table = $wpdb->prefix . 'sform_shortcodes';
     62          $submissions_table = $wpdb->prefix . 'sform_submissions';
     63          $charset_collate = $wpdb->get_charset_collate();
    6464       
    65           $shortcodes_table = $prefix . 'sform_shortcodes';
    66           $sql = "CREATE TABLE " . $shortcodes_table . " (
     65          $sql_shortcodes = "CREATE TABLE {$shortcodes_table} (
    6766            id int(11) NOT NULL AUTO_INCREMENT,
    6867            shortcode tinytext NOT NULL,
     
    7170            shortcode_pages text NOT NULL,
    7271            block_pages text NOT NULL,
    73             widget_id text NOT NULL,
    74             widget smallint(5) UNSIGNED NOT NULL DEFAULT 0,
     72            widget_id varchar(128) NOT NULL default '',
    7573            target tinytext NOT NULL,
    7674            creation datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
     75            widget smallint(5) UNSIGNED NOT NULL DEFAULT '0',
     76            entries mediumint(9) NOT NULL DEFAULT '0',
     77            relocation tinyint(1) NOT NULL DEFAULT '0',
     78            moveto smallint(6) NOT NULL DEFAULT '0',
     79            to_be_moved varchar(32) NOT NULL default '',
     80            onetime_moving tinyint(1) NOT NULL DEFAULT '1',
     81            moved_entries mediumint(9) NOT NULL DEFAULT '0',
     82            deletion tinyint(1) NOT NULL DEFAULT '0',
     83            status tinytext NOT NULL,
     84            previous_status varchar(32) NOT NULL default '',
     85            storing tinyint(1) NOT NULL DEFAULT '1',
    7786            PRIMARY KEY  (id)
    78           ) ". $charset_collate .";";
    79           dbDelta($sql);
    80 
    81           $submissions_table = $prefix . 'sform_submissions';
    82           $sql = "CREATE TABLE " . $submissions_table . " (
     87          ) {$charset_collate};";
     88
     89          $sql_submissions = "CREATE TABLE {$submissions_table} (
    8390            id int(11) NOT NULL AUTO_INCREMENT,
    84             form int(7) NOT NULL DEFAULT 1,
     91            form int(7) NOT NULL DEFAULT '1',
     92            moved_from int(7) NOT NULL DEFAULT '0',
    8593            requester_type tinytext NOT NULL,
    86             requester_id int(15) NOT NULL,
     94            requester_id int(15) NOT NULL DEFAULT '0',
    8795            date datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    88             notes text NOT NULL,
     96            status tinytext NOT NULL,
     97            previous_status varchar(32) NOT NULL default '',
     98            trash_date datetime NULL,
     99            hidden tinyint(1) NOT NULL DEFAULT '0',
     100            notes text NULL,
    89101            PRIMARY KEY  (id)
    90           ) ". $charset_collate .";";
    91           dbDelta($sql);
     102          ) {$charset_collate};";
     103         
     104          require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
     105
     106          dbDelta($sql_shortcodes);
     107          dbDelta($sql_submissions);
    92108         
    93109          update_option('sform_db_version', $current_db_version);
     
    96112   
    97113    }
     114   
    98115    /**
    99116     * Save default properties.
     
    105122     
    106123        global $wpdb;
    107         $prefix = $wpdb->prefix;
    108         $shortcodes_table = $prefix . 'sform_shortcodes';
     124        $shortcodes_table = $wpdb->prefix . 'sform_shortcodes';
    109125        $shortcode = 'simpleform';
    110126        $name = __( 'Contact Us Page','simpleform');
    111127        $shortcode_data = $wpdb->get_results("SELECT * FROM {$shortcodes_table}");
    112         if(count($shortcode_data) == 0) { $wpdb->insert( $shortcodes_table, array( 'shortcode' => $shortcode, 'name' => $name ) ); }
    113                
     128        if(count($shortcode_data) == 0) { $wpdb->insert( $shortcodes_table, array( 'shortcode' => $shortcode, 'name' => $name, 'status' => 'draft' ) ); }
     129        else {
     130          $where_submissions = defined('SIMPLEFORM_SUBMISSIONS_NAME') ? "WHERE object != '' AND object != 'not stored'" : '';
     131          $msg = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions $where_submissions");
     132          $entries = $wpdb->get_var("SELECT SUM(entries) as total_entries FROM {$wpdb->prefix}sform_shortcodes");
     133          if ( $msg > 0 && $entries == 0 ) {
     134            $forms = $wpdb->get_col( "SELECT id FROM {$wpdb->prefix}sform_shortcodes" );
     135            foreach ($forms as $form) {
     136              $form_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}sform_shortcodes WHERE id = %d", $form) );
     137              $status = esc_attr($form_data->shortcode_pages) != '' || esc_attr($form_data->block_pages) != '' || esc_attr($form_data->widget_id) != '' ? 'published' : 'draft';
     138              $where = defined('SIMPLEFORM_SUBMISSIONS_NAME') ? "AND object != '' AND object != 'not stored'" : '';
     139              $form_msg = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->prefix}sform_submissions WHERE form = {$form} $where");
     140              $wpdb->update( $shortcodes_table, array( 'entries' => $form_msg, 'status' => $status ), array('id' => $form ) );
     141            }
     142          }
     143        }
     144
    114145    }
    115146   
     
    259290
    260291    /**
    261      *  Specify the initial form fields.
     292     *  Specify the initial attributes.
    262293     *
    263294     * @since    1.8.4
  • simpleform/trunk/includes/class-core.php

    r2618058 r2664049  
    44 * The core plugin class
    55 *
    6  * @since      1.0
     6 * @since 1.0
    77 */
    88
     
    1010
    1111    /**
    12      * The loader responsible for maintaining and registering all hooks.
    13      *
    14      * @since    1.0
     12     * The loader responsible for maintaining and registering all hooks
     13     *
     14     * @since 1.0
    1515     */
    1616     
     
    1818
    1919    /**
    20      * The unique identifier of this plugin.
    21      *
    22      * @since    1.0
     20     * The plugin's unique identifier
     21     *
     22     * @since 1.0
    2323     */
    2424
     
    2626
    2727    /**
    28      * The current version of the plugin.
    29      *
    30      * @since    1.0
     28     * The plugin's current version
     29     *
     30     * @since 1.0
    3131     */
    3232
     
    3434
    3535    /**
    36      * Define the core functionality of the plugin.
    37      *
    38      * @since    1.0
     36     * Define the plugin's core functionality
     37     *
     38     * @since 1.0
    3939     */
    4040
     
    4242       
    4343        if ( defined( 'SIMPLEFORM_VERSION' ) ) { $this->version = SIMPLEFORM_VERSION; }
    44         else { $this->version = '2.0.8'; }
     44        else { $this->version = '2.1'; }
    4545        $this->plugin_name = 'simpleform';
    4646        $this->load_dependencies();
     
    5454
    5555    /**
    56      * Load the required dependencies for this plugin.
    57      *
    58      * @since    1.0
     56     * Load the required dependencies
     57     *
     58     * @since 1.0
    5959     */
    6060     
    6161    private function load_dependencies() {
    6262
    63         // The class responsible for orchestrating the actions and filters of the core plugin.
     63        // The class responsible for orchestrating actions and filters of plugin
    6464        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-loader.php';
    65         // The class responsible for defining all actions that occur in the admin area.     
     65        // The class responsible for defining actions that occur in the admin area       
    6666        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-admin.php';
    67         // The class responsible for defining all actions that occur in the public-facing side of the site.     
     67        // The class responsible for defining actions that occur in the public-facing side of the site       
    6868        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-public.php';
    6969        // The class responsible for defining the widget
     
    7171        // The class responsible for defining the block
    7272        if ( version_compare(get_bloginfo('version'),'5.6', '>=') ) {   
    73         // require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-block.php';
    7473        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/block/class-block.php';
    7574        }
    76         // The class responsible for defining the general utilities 
     75        // The class responsible for defining utilities 
    7776        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-utilities.php';
    78         // The base class for displaying a list of forms in an ajaxified HTML table.
    79         // if ( ! class_exists( 'WP_List_Table' ) ) {
    80         // require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
    81         // }
    82         // The customized forms class that extends the base class
    83         // require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-forms.php';
     77        // The base class for displaying a list of forms
     78        if ( ! class_exists( 'WP_List_Table' ) ) {
     79        require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
     80        }
     81        // The customized class that extends the base class
     82        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-forms.php';
    8483
    8584        $this->loader = new SimpleForm_Loader();
     
    8887
    8988    /**
    90      * Register all hooks related to the admin area functionality of the plugin.
    91      *
    92      * @since    1.0
     89     * Register all hooks related to the admin area functionality
     90     *
     91     * @since 1.0
    9392     */
    9493   
     
    126125        }   
    127126        // Retrieve pages list containing the SimpleForm shortcode
    128         $this->loader->add_action( 'save_post', $plugin_admin, 'sform_pages_list', 10, 2 );
     127        $this->loader->add_action( 'save_post', $plugin_admin, 'sform_pages_list', 10, 2 );        
    129128        // Clean up the post content of any non-existent and redundant form
    130129        // $this->loader->add_filter('content_save_pre', $plugin_admin, 'clean_up_post_content', 10, 1 );
     
    138137        $this->loader->add_action('wp_ajax_sform_delete_form', $plugin_admin, 'sform_delete_form');
    139138        // Save screen options
    140         // $this->loader->add_filter( 'set-screen-option', $plugin_admin, 'forms_screen_option', 10, 3 );       
     139        $this->loader->add_filter( 'set-screen-option', $plugin_admin, 'forms_screen_option', 10, 3 );     
    141140        // Register a post type for change the pagination in Screen Options tab
    142         // $this->loader->add_action( 'init', $plugin_admin, 'form_post_type' );
     141        $this->loader->add_action( 'init', $plugin_admin, 'form_post_type' );
    143142        // Show the parent menu active for hidden sub-menu item
    144         // $this->loader->add_filter( 'parent_file', $plugin_admin, 'contacts_menu_open', 1, 2 );
    145 
    146     }
    147 
    148     /**
    149      * Register all hooks related to the public-facing functionality of the plugin.
    150      *
    151      * @since    1.0
     143        $this->loader->add_filter( 'parent_file', $plugin_admin, 'contacts_menu_open', 1, 2 );
     144        // Register ajax callback for form moving/deleting
     145        $this->loader->add_action('wp_ajax_form_update', $plugin_admin, 'form_update');
     146        // Remove all unnecessary parameters leaving the original URL used before performing an action
     147        $this->loader->add_action( 'current_screen', $plugin_admin, 'url_cleanup' );
     148
     149    }
     150
     151    /**
     152     * Register all hooks related to the public-facing functionality
     153     *
     154     * @since 1.0
    152155     */
    153156   
     
    175178
    176179    /**
    177      * Register all hooks related to the block functionality of the plugin.
    178      *
    179      * @since    1.0
     180     * Register all hooks related to the block functionality
     181     *
     182     * @since 1.0
    180183     */
    181184   
     
    186189        // Register the block
    187190        $this->loader->add_action( 'init', $plugin_block, 'register_block' );
     191        // Set the widgets check
     192        $this->loader->add_action( 'admin_init', $plugin_block, 'set_up_widgets_check', 100 );
    188193        // Clean up the widget areas of any non-existent and redundant form
    189         $this->loader->add_action( 'widgets_init', $plugin_block, 'clean_up_widget_areas' );
    190         // Hide widget blocks if the form already appears in the post content
     194        $this->loader->add_action( 'sform_widgets_cleaning', $plugin_block, 'widgets_cleaning' );
     195        // Hide widget blocks if the form already appears in the page
    191196        $this->loader->add_filter( 'sidebars_widgets', $plugin_block, 'hide_widgets' );
    192 
    193     }
    194 
    195     /**
    196      * Run the loader to execute all of the hooks with WordPress.
    197      *
    198      * @since    1.0
     197        // Add block customized style in a block theme
     198        if ( version_compare(get_bloginfo('version'),'5.9', '>=') ) {   
     199        $this->loader->add_action( 'after_setup_theme', $plugin_block, 'enqueue_block_styles' );       
     200        }       
     201
     202    }
     203
     204    /**
     205     * Run the loader to execute all hooks
     206     *
     207     * @since 1.0
    199208     */
    200209     
     
    206215
    207216    /**
    208      * Retrieve the name of the plugin.
    209      *
    210      * @since     1.0
     217     * Retrieve the plugin's name
     218     *
     219     * @since 1.0
    211220     */
    212221     
     
    218227
    219228    /**
    220      * The reference to the class that orchestrates the hooks with the plugin.
    221      *
    222      * @since     1.0
     229     * The reference to the class that orchestrates the hooks with the plugin
     230     *
     231     * @since 1.0
    223232     */
    224233     
     
    230239
    231240    /**
    232      * Retrieve the version number of the plugin.
    233      *
    234      * @since     1.0
     241     * Retrieve the plugin's version number
     242     *
     243     * @since 1.0
    235244     */
    236245     
  • simpleform/trunk/public/class-public.php

    r2618058 r2664049  
    657657     }
    658658     
    659      
    660659    $mailing = 'false';
    661660    $submission_timestamp = time();
     
    667666    $user_ID = is_user_logged_in() ? get_current_user_id() : '0';
    668667   
    669     $sform_default_values = array( "form" => $form_id, "date" => $submission_date, "requester_type" => $requester_type, "requester_id" => $user_ID );
     668    $form_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}sform_shortcodes WHERE id = %d", $form_id) );
     669    $relocation = esc_attr($form_data->relocation) ? 'true' : 'false';
     670    $moveto = esc_attr($form_data->moveto) != '0' ? esc_attr($form_data->moveto) : '';
     671    $to_be_moved = esc_attr($form_data->to_be_moved) ? esc_attr($form_data->to_be_moved) : '';
     672    $onetime_moving = esc_attr($form_data->onetime_moving) ? 'true' : 'false';
     673    $moving = $relocation == 'true' && $moveto != '' && $to_be_moved == 'next' && $onetime_moving == 'false' ? true : false;
     674    $save_as = $moving == true ? $moveto : $form_id;
     675    $moved_from = $moving == true ? $form_id : '0';
     676    $sform_default_values = array( "form" => $save_as, "moved_from" => $moved_from, "date" => $submission_date, "requester_type" => $requester_type, "requester_id" => $user_ID );       
    670677    $extra_fields = array('notes' => '');
    671  
    672678    $submitter = $requester_name != '' ? $requester_name : __( 'Anonymous', 'simpleform' );
    673679 
     
    676682    $success = $wpdb->insert($table_name, $sform_extra_values);
    677683
    678     if ($success)  {
     684    if ( $success ) {
     685       
     686      if ( $moving == true ) {   
     687         $count_entries = $wpdb->get_var("SELECT entries FROM {$wpdb->prefix}sform_shortcodes WHERE id = '$moveto'");
     688         $update_entries = $count_entries + 1;
     689         $wpdb->update($wpdb->prefix . 'sform_shortcodes', array('entries' => $update_entries, 'status' => 'used' ), array('id' => $moveto ) );
     690         $update_moved = esc_attr($form_data->moved_entries) + 1;
     691         $wpdb->update($wpdb->prefix . 'sform_shortcodes', array('moved_entries' => $update_moved, 'status' => 'used' ), array('id' => $form_id ) );
     692      }
     693      else {
     694         $update_entries = esc_attr($form_data->entries) + 1;
     695         $wpdb->update($wpdb->prefix . 'sform_shortcodes', array('entries' => $update_entries, 'status' => 'used' ), array('id' => $form_id ) );
     696      }
    679697
    680698    $from_data = '<b>'. __('From', 'simpleform') .':</b>&nbsp;&nbsp;';
     
    713731    $last_message = '<div style="line-height:18px;">' . $from_data . '<b>'. __('Date', 'simpleform') .':</b>&nbsp;&nbsp;' . $website_date . $subject_data . '<b>'. __('Message', 'simpleform') .':</b>&nbsp;&nbsp;' .  $formdata['message'] . '</div>';
    714732
    715        set_transient('sform_last_'.$form_id.'_message', $last_message, 0 );
    716        set_transient( 'sform_last_message', $last_message, 0 );
     733    update_option( 'sform_last_message', $last_message );
     734    $timestamp = strtotime($submission_date);
     735    $message_data = $timestamp . '#' . $last_message;
     736    update_option('sform_last_'.$save_as.'_message', $message_data);
    717737
    718738    $notification = ! empty( $settings['notification'] ) ? esc_attr($settings['notification']) : 'true';
     
    12191239      $user_ID = is_user_logged_in() ? get_current_user_id() : '0';
    12201240     
    1221       $sform_default_values = array( "form" => $form_id, "date" => $submission_date, "requester_type" => $requester_type, "requester_id" => $user_ID ); 
     1241      $form_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}sform_shortcodes WHERE id = %d", $form_id) );
     1242      $relocation = esc_attr($form_data->relocation);
     1243      $moveto = esc_attr($form_data->moveto);
     1244      $to_be_moved = esc_attr($form_data->to_be_moved);
     1245      $onetime_moving = esc_attr($form_data->onetime_moving);
     1246      $moving = $relocation == '1' && $moveto != '0' && $to_be_moved == 'next' && $onetime_moving == '0' ? true : false;
     1247      $save_as = $moving == true ? $moveto : $form_id;
     1248      $moved_from = $moving == true ? $form_id : '0';
     1249
     1250      $sform_default_values = array( "form" => $save_as, "moved_from" => $moved_from, "requester_type" => $requester_type, "requester_id" => $user_ID, "date" => $submission_date );   
     1251     
    12221252      $extra_fields = array('notes' => '');
    12231253      $submitter = $requester_name != ''  ? $requester_name : __( 'Anonymous', 'simpleform' );     
    12241254      $sform_extra_values = array_merge($sform_default_values, apply_filters( 'sform_storing_values', $extra_fields, $form_id, $name, $requester_lastname, $email, $phone, $subject_value, $request, $flagged ));
    12251255      $sform_additional_values = array_merge($sform_extra_values, apply_filters( 'sform_testing', $extra_fields ));
     1256     
    12261257      $success = $wpdb->insert($table_name, $sform_additional_values);
    12271258      $server_error = ! empty( $settings['server_error'] ) ? stripslashes(esc_attr($settings['server_error'])) : __( 'Error occurred during processing data. Please try again!', 'simpleform' );
    12281259     
    1229       if ( $success )  {           
     1260      if ( $success )  {         
     1261                 
     1262        if ( $moving == true ) {         
     1263            $count_entries = $wpdb->get_var("SELECT entries FROM {$wpdb->prefix}sform_shortcodes WHERE id = '$moveto'");
     1264            $update_entries = $count_entries + 1;
     1265            $wpdb->update($wpdb->prefix . 'sform_shortcodes', array('entries' => $update_entries, 'status' => 'used' ), array('id' => $moveto ) );
     1266            $update_moved = esc_attr($form_data->moved_entries) + 1;
     1267            $wpdb->update($wpdb->prefix . 'sform_shortcodes', array('moved_entries' => $update_moved, 'status' => 'used' ), array('id' => $form_id ) );             
     1268        }
     1269        else {
     1270            // $wpdb->query( $wpdb->prepare("UPDATE $wpdb->prefix}sform_shortcodes SET status = 'used', entries = entries + 1 WHERE id = '%d'", $form_id) );
     1271            $update_entries = esc_attr($form_data->entries) + 1;
     1272            $wpdb->update($wpdb->prefix . 'sform_shortcodes', array('entries' => $update_entries, 'status' => 'used' ), array('id' => $form_id ) );
     1273        }
     1274                   
    12301275       if (has_action('spam_check_activation')):
    12311276          do_action( 'spam_check_activation' );
     
    12901335       remove_filter( 'wp_mail_from', array ( $this, 'alert_sender_email' ) );
    12911336       $last_message = '<div style="line-height:18px;">' . $from_data . '<b>'. __('Date', 'simpleform') .':</b>&nbsp;&nbsp;' . $website_date . $subject_data . '<b>'. __('Message', 'simpleform') .':</b>&nbsp;&nbsp;' .  $request . '</div>';
    1292        set_transient('sform_last_'.$form_id.'_message', $last_message, 0 );
    1293        set_transient( 'sform_last_message', $last_message, 0 );
    1294         if ($sent):
     1337       
     1338       update_option( 'sform_last_message', $last_message );
     1339       $timestamp = strtotime($submission_date);
     1340       $message_data = $timestamp . '#' . $last_message;
     1341       update_option('sform_last_'.$save_as.'_message', $message_data);
     1342       
     1343       if ($sent):
    12951344         $mailing = 'true';
    1296         endif;
     1345       endif;
    12971346      }
    12981347
  • simpleform/trunk/public/css/public-min.css

    r2618058 r2664049  
    1 .d-block{display:inline-block}.d-none{display:none!important}.v-visible{visibility:visible!important}.v-invisible{visibility:hidden!important;opacity:0}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}h1.sform,h2.sform,h3.sform,h4.sform,h5.sform,h6.sform{color:inherit}.sform-introduction{padding-bottom:15px;clear:both}.sform-bottom{margin:0 auto;clear:both}.sform-field-group{line-height:1;padding-bottom:3px;clear:both}.sform-field-group label{display:block;margin-bottom:5px}label.sform{font-size:inherit;color:inherit;font-weight:400}label.sform.smaller{font-size:.9em}label.sform.larger{font-size:1.1em}.required-symbol.mark{color:#dc3545;padding-left:3px;background-color:transparent}.required-symbol.word{color:inherit;padding-left:3px;font-weight:300;font-size:.8em;font-style:italic}input.sform-field{width:100%;margin-bottom:0;outline:0;font-size:inherit;color:inherit;font-weight:400;line-height:normal}textarea.sform-field{width:100%;height:auto;outline:0;line-height:1.5;font-size:inherit;color:inherit;font-weight:400}.half{clear:none}.email.half,.name.half{width:47.5%;float:left}.lastname.half,.phone.half{width:47.5%;float:right}.default input.sform-field{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 16px}.basic input.sform-field{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff;padding:10px 32px 10px 16px}.rounded input.sform-field{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 32px 10px 16px}.minimal input.sform-field{border:none;border-bottom:2px solid #ccc;border-radius:0;background-color:transparent;padding:10px 0}.transparent input.sform-field{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent;padding:10px 16px}.transparent.light .checkmark,.transparent.light div.captcha,.transparent.light input.sform-field,.transparent.light textarea.sform-field{border-color:#f8f8f8}.highlighted input.sform-field{border:none;border-radius:5px;background-color:#eaeaea;padding:10px 16px}.default textarea.sform-field{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 16px}.basic textarea.sform-field{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff;padding:10px 32px 10px 16px}.rounded textarea.sform-field{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 32px 10px 16px}.minimal textarea.sform-field{border:none;border-bottom:2px solid #ccc;border-radius:0;background-color:transparent;padding:10px 0}.transparent textarea.sform-field{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent;padding:10px 16px}.highlighted textarea.sform-field{border:none;border-radius:5px;background-color:#eaeaea;padding:10px 16px}.sform-field-group.checkbox{margin-top:20px}input.checkbox{position:absolute;opacity:0;height:1px;width:1px;appearance:none;-webkit-appearance:none;-moz-appearance:none}input.checkbox+label{position:relative;cursor:default;display:inline-block;margin-left:0;width:100%;font-size:inherit}input.checkbox+label a{color:inherit;text-decoration:underline;text-decoration-style:dotted}.checkmark{position:absolute;cursor:pointer;top:0;left:0;height:34px;width:34px}input.checkbox:checked+label .checkmark:after{display:block}.default input.checkbox+label,.highlighted input.checkbox+label,.minimal input.checkbox+label,.transparent input.checkbox+label{padding-left:50px;line-height:34px;margin-bottom:25px}.default .checkmark{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff}.default .checkmark:after,.highlighted .checkmark:after,.minimal .checkmark:after,.transparent .checkmark:after{left:10px;top:5px;width:12px;height:18px;border:solid #fff;border-width:0 4px 4px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);content:"";position:absolute;box-sizing:border-box;display:none}.default input.checkbox:checked+label .checkmark{border-color:#8bc34a;background-color:#8bc34a}.basic .checkmark{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff;margin-top:10px;height:20px;width:20px;line-height:20px;text-align:center;color:#fff;font-size:18px;font-weight:600}.basic .checkmark:after{display:none;box-sizing:border-box}.basic input.checkbox:checked+label .checkmark{background-color:#007bff;border-color:#007bff}.basic input.checkbox:checked+label .checkmark:after{content:"\2713";display:block}.basic input.checkbox+label{padding-left:30px;margin-top:10px;margin-bottom:30px;line-height:40px}.rounded .checkmark{width:52px;height:26px;border:none;border-radius:26px;background-color:#6c757d}.rounded .checkmark:after{position:absolute;display:inherit;content:"";height:18px;width:18px;left:4px;top:4px;border-radius:50%;background-color:#fff;-webkit-transition:.4s;transition:.4s}.rounded input.checkbox:checked+label .checkmark{background-color:#8bc34a}.rounded input.checkbox:checked+label .checkmark:after{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.rounded input.checkbox+label{margin-bottom:22px;line-height:26px;padding-left:72px}.minimal .checkmark{border-width:2px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:transparent}.minimal input.checkbox:checked+label .checkmark{border-color:#8bc34a;background-color:#8bc34a}.transparent .checkmark{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent}.transparent input.checkbox:checked+label .checkmark{border-color:#0d6efd;background-color:#0d6efd}.highlighted .checkmark{border-width:1px;border-color:#eaeaea;border-style:solid;border-radius:5px;background-color:#eaeaea}.highlighted input.checkbox:checked+label .checkmark{border-color:#0d6efd;background-color:#0d6efd}div.captcha{width:200px;height:intrinsic}input.sform-field.question{width:110px;height:inherit;cursor:text;border:none;outline:0;display:inline-block;background-color:transparent;padding-right:0;padding-left:0;text-align:right;box-shadow:none}input.sform-field.captcha{width:75px;border:none;outline:0;display:inline-block;background-color:transparent;padding-right:0;padding-left:5px;box-shadow:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{appearance:textfield;-moz-appearance:textfield;-webkit-appearance:textfield}.default div.captcha{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff}.basic .sform-field-group.checkbox{margin-top:0}.basic div.captcha{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff}.rounded div.captcha{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:5px;background-color:#fff}.minimal div.captcha{border-bottom:2px solid #ccc;background-color:transparent}.transparent div.captcha{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent}.highlighted div.captcha{border:none;border-radius:5px;background-color:#eaeaea}#gcaptcha-wrap,.gcaptcha-wrap{margin:16px 0 30px}.rc-anchor-error-msg-container{letter-spacing:-.5px}.sizelabel{font-size:inherit;margin-bottom:22px}.sizelabel.smaller{font-size:.9em}.sizelabel.larger{font-size:1.1em}.submit-wrap{margin:22px 0}.submit-wrap button.sform{outline:0;font-size:inherit;text-transform:uppercase;font-weight:600;line-height:1.25;text-decoration:none;box-shadow:none;padding:10px 16px}.submit-wrap button.sform:hover{box-shadow:none}.default .submit-wrap button.sform{border-width:1px;border-color:#0090d5;border-style:solid;border-radius:25px;background-color:#0090d5;color:#fff}.default .submit-wrap button.sform:hover{color:#0090d5;background-color:#fff}.basic .submit-wrap button.sform{border-width:1px;border-color:#007bff;border-style:solid;border-radius:0;background-color:#007bff;color:#fff}.basic .submit-wrap button.sform:hover{border-color:#0062cc;background-color:#0069d9}.rounded .submit-wrap button.sform{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:50px;background-color:transparent;color:inherit}.rounded .submit-wrap button.sform:hover{border-color:#6c757d;color:#fff;background-color:#6c757d}.minimal .submit-wrap button.sform{border-width:2px;border-color:#0090d5;border-style:solid;border-radius:5px;background-color:#0090d5;color:#fff}.minimal .submit-wrap button.sform:hover{border-color:#0090d5;color:#0090d5;background-color:#fff}.transparent .submit-wrap button.sform{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:#333;color:#fff}.transparent .submit-wrap button.sform:hover{border-color:#0d6efd;color:#fff;background-color:#0d6efd}.highlighted .submit-wrap button.sform{border-width:1px;border-color:#333;border-style:solid;border-radius:5px;background-color:#333;color:#fff}.highlighted .submit-wrap button.sform:hover{border-color:#0d6efd;color:#fff;background-color:#0d6efd}.submit-wrap button.smaller{font-size:.9em}.submit-wrap button.larger{font-size:1.1em}.submit-wrap button:focus{outline:0}.submit-wrap button:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd;box-shadow:none}.submit-wrap.left{text-align:left}.submit-wrap.right{text-align:right}.submit-wrap.center{text-align:center}.submit-wrap.full{text-align:center}.submit-wrap button.fullwidth{width:100%}.carrots{opacity:0;position:absolute;top:0;left:0;height:0;width:0;z-index:-1}div.captcha.is-invalid,input.sform-field.is-invalid,input.sform-field.is-invalid+label .checkmark,textarea.sform-field.is-invalid{border-color:#dc3545}.sform-field.is-invalid:focus,div.captcha.is-invalid.focus{box-shadow:none}div.captcha.is-invalid+.error-des span{display:block}label.checkbox.is-invalid{color:#dc3545}.basic .sform-field.is-invalid,.basic div.captcha.is-invalid,.rounded .sform-field.is-invalid,.rounded div.captcha.is-invalid{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 5px center;background-size:1em}.basic textarea.sform-field.is-invalid,.rounded textarea.sform-field.is-invalid{background-position:top 14px right 5px}.basic input.sform-field.captcha.is-invalid,.basic input.sform-field.question.is-invalid,.rounded input.sform-field.captcha.is-invalid,.rounded input.sform-field.question.is-invalid{background-image:none}.rounded input.sform-field.is-invalid+label .checkmark{background-color:#dc3545}.highlighted div.captcha.is-invalid,.highlighted input.sform-field.is-invalid,.highlighted input.sform-field.is-invalid+label .checkmark,.highlighted textarea.sform-field.is-invalid{border:none;background-color:#f1abb2}input:focus,textarea:focus{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.sform-field.captcha:focus{background-color:transparent;box-shadow:none}.default div.captcha.focus,.default input.sform-field:focus,.default textarea.sform-field:focus{border-color:#0090d5;background-color:#fafafa;outline:0}.default div.captcha.is-invalid.focus,.default input.sform-field.is-invalid:focus,.default textarea.sform-field.is-invalid:focus,.minimal div.captcha.is-invalid.focus,.minimal input.sform-field.is-invalid:focus,.minimal textarea.sform-field.is-invalid:focus{border-color:#dc3545}.basic input.sform-field.captcha:focus,.basic input.sform-field.question:focus,.default input.sform-field.captcha:focus,.default input.sform-field.question:focus,.highlighted input.sform-field.captcha:focus,.highlighted input.sform-field.question:focus{background-color:transparent}.basic div.captcha.focus,.basic input.sform-field:focus,.basic textarea.sform-field:focus,.rounded div.captcha.focus,.rounded input.sform-field:focus,.rounded textarea.sform-field:focus{border-color:#007bff;box-shadow:0 0 0 2px rgba(0,123,255,.25);outline:0}.basic .sform-field.captcha:focus,.basic .sform-field.is-invalid.captcha:focus,.basic .sform-field.is-invalid.question:focus,.basic .sform-field.question:focus{box-shadow:none}.basic div.captcha.is-invalid.focus,.basic input.sform-field.is-invalid:focus,.basic textarea.sform-field.is-invalid:focus,.rounded div.captcha.is-invalid.focus,.rounded input.sform-field.is-invalid:focus,.rounded textarea.sform-field.is-invalid:focus{border-color:#dc3545;box-shadow:0 0 0 2px rgba(220,53,69,.25)}.rounded .sform-field.captcha:focus,.rounded .sform-field.is-invalid.captcha:focus,.rounded .sform-field.is-invalid.question:focus,.rounded .sform-field.question:focus{box-shadow:none}.minimal div.captcha.focus,.minimal input.sform-field:focus,.minimal textarea.sform-field:focus{border-color:#0090d5;outline:0;box-shadow:none}.transparent div.captcha.focus,.transparent input.sform-field:focus,.transparent textarea.sform-field:focus{border-color:#0d6efd;background-color:#e8f0fe;outline:0;box-shadow:none}.transparent .sform-field.captcha:focus,.transparent .sform-field.is-invalid.captcha:focus,.transparent .sform-field.is-invalid.question:focus,.transparent .sform-field.question:focus{background-color:transparent;box-shadow:none}.transparent div.captcha.is-invalid.focus,.transparent input.sform-field.is-invalid:focus,.transparent textarea.sform-field.is-invalid:focus{border-color:#dc3545;background-color:#f1b1b7}.highlighted div.captcha.focus,.highlighted input.sform-field:focus,.highlighted textarea.sform-field:focus{border:none;background-color:rgba(13,110,253,.5);outline:0;box-shadow:none}.highlighted div.captcha.is-invalid.focus,.highlighted input.sform-field.is-invalid:focus,.highlighted textarea.sform-field.is-invalid:focus{background-color:#f1abb2}.error-des{line-height:1;color:#dc3545;font-size:14px;height:14px;margin-top:5px;margin-bottom:5px}.error-des span{display:none}.sform-field.is-invalid+.error-des span{display:block}.msgoutside{padding:0 0 5px 0;position:relative;outline:0}.msgoutside span{display:block;visibility:hidden;text-align:center;font-size:16px;padding:7.5px 12.5px}.default .msgoutside span,.highlighted .msgoutside span,.transparent .msgoutside span{border-radius:5px;background-color:#dc3545;color:#fff}.basic .msgoutside span{border-radius:0;background-color:#f8d7da;color:#721c24}.rounded .msgoutside span{border-radius:5px;background-color:#dc3545;color:#fff;opacity:.75}.minimal .msgoutside span{border-radius:5px;background-color:#f8d7da;color:#dc3545}.noscript{position:absolute;top:0;width:100%}.msgoutside.top{margin-bottom:20px}.form.confirmation{text-align:center;padding-top:50px;outline:0}.form.confirmation>img,.form.confirmation>p>img{margin:30px auto;width:250px}.sform-confirmation{position:relative;outline:0}.sform.spinner{height:44px;line-height:44px;width:120px;padding:3px 0}.minimal .sform.spinner,.transparent .sform.spinner{height:46px;line-height:46px}.sform.spinner.left{margin:0 auto 0 0}.sform.spinner.right{margin:0 0 0 auto}.sform.spinner.center{margin:0 auto}.sform.spinner>div{width:18px;height:18px;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.2s infinite ease-in-out both;animation:sk-bouncedelay 1.2s infinite ease-in-out both;margin:0 3px}.default .sform.spinner>div,.highlighted .sform.spinner>div,.minimal .sform.spinner>div{background-color:#0090d5}.basic .sform.spinner>div{background-color:#0069d9}.rounded .sform.spinner>div{background-color:#6c757d}.transparent .sform.spinner>div{background-color:#0d6efd}.sform.spinner .bounce1{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sform.spinner .bounce2{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sform.spinner .bounce3{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sform.spinner .bounce4{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;clear:right}.row .captcha-error{width:100%;padding-left:135px}.col-sm-10{position:relative;width:100%;min-height:1px}.checkbox.col-sm-10,.msgoutside.col-sm-10,.nolabel.col-sm-10,.submit-wrap.col-sm-10{float:right}.row.checkbox{float:right;width:calc(100% - 135px)}label.sform.col-sm-2{letter-spacing:-.05em}@media (min-width:576px){.col-sm-10{-ms-flex:0 0 calc(100% - 135px);flex:0 0 calc(100% - 135px);max-width:calc(100% - 135px)}.col-sm-2{-ms-flex:135px;flex:135px;max-width:135px;line-height:41px;padding-right:15px}}@media (max-width:575px){.col-sm-10{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.col-sm-2{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}@media (max-width:1023px){.email.half,.name.half{width:100%;float:left}.lastname.half,.phone.half{width:100%;float:right}}.sform-bottom.rtl,.sform-introduction.rtl,form.sform.rtl{direction:rtl}.rtl .sform-field-group label span{display:inline-block;padding-right:5px;padding-left:0}.rtl .lastname.half,.rtl .phone.half{float:left}.rtl .email.half,.rtl .name.half{float:right}.rtl .row{clear:left}.rtl .checkbox.col-sm-10,.rtl .nolabel.col-sm-10{float:left}.rtl .checkmark{right:0}.rtl label.sform.checkbox:before{right:0}.rtl.basic label.sform.checkbox{padding-right:35px;padding-left:0}.rtl.rounded label.sform.checkbox{padding-right:72px;padding-left:0}.rtl.basic input.sform-field,.rtl.basic textarea.sform-field,.rtl.rounded input.sform-field,.rtl.rounded textarea.sform-field{padding:10px 16px 10px 32px}.rtl.basic div.captcha.is-invalid,.rtl.basic input.sform-field.is-invalid,.rtl.rounded div.captcha.is-invalid,.rtl.rounded input.sform-field.is-invalid{background-position:left 5px center}.rtl.basic textarea.sform-field.is-invalid,.rtl.rounded textarea.sform-field.is-invalid{background-position:top 14px left 5px}.rtl .sform-field.question{text-align:left;padding-left:0}.rtl .sform-field.captcha{padding-right:5px}.rtl.basic input.sform-field.question,.rtl.rounded input.sform-field.question{padding-right:0;padding-left:0}.rtl.basic input.sform-field.captcha,.rtl.rounded input.sform-field.captcha{padding-right:5px;padding-left:32px}.rtl .captcha-error.row{padding-right:135px}.rtl .error-des span{text-align:right}.rtl .msgoutside,.rtl .submit-wrap{float:left;width:100%}.rtl .sform-field-group .col-sm-2{padding-right:0}.rtl label.checkbox span{padding-left:0;padding-right:0}.rtl label.checkbox span.required-symbol{padding-right:5px}.rtl .sform-field-group label span.d-none{display:none}.rtl label.checkbox{margin-right:0;padding-right:50px;padding-left:0}.rtl .sform-field-group label{text-align:right}.rtl .row.checkbox{float:left}.form-wrap.success{background-color:inherit!important}
     1.d-block{display:inline-block}.d-none{display:none!important}.v-visible{visibility:visible!important}.v-invisible{visibility:hidden!important;opacity:0}.align-left{text-align:left}.align-center{text-align:center}.align-right{text-align:right}h1.sform,h2.sform,h3.sform,h4.sform,h5.sform,h6.sform{color:inherit}.sform-introduction{padding-bottom:15px;clear:both}.sform-bottom{margin:0 auto;clear:both}.sform-field-group{line-height:1;padding-bottom:3px;clear:both}.sform-field-group label{display:block;margin-bottom:5px}label.sform{font-size:inherit;color:inherit;font-weight:400}label.sform.smaller{font-size:.9em}label.sform.larger{font-size:1.1em}.required-symbol.mark{color:#dc3545;padding-left:3px;background-color:transparent}.required-symbol.word{color:inherit;padding-left:3px;font-weight:300;font-size:.8em;font-style:italic}input.sform-field{width:100%;margin-bottom:0;outline:0;font-size:inherit;color:inherit;font-weight:400;line-height:normal;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}textarea.sform-field{width:100%;height:auto;outline:0;line-height:1.5;font-size:inherit;color:inherit;font-weight:400;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.half{clear:none}.email.half,.name.half{width:47.5%;float:left}.lastname.half,.phone.half{width:47.5%;float:right}.default input.sform-field{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 16px}.basic input.sform-field{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff;padding:10px 32px 10px 16px}.rounded input.sform-field{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 32px 10px 16px}.minimal input.sform-field{border:none;border-bottom:2px solid #ccc;border-radius:0;background-color:transparent;padding:10px 0}.transparent input.sform-field{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent;padding:10px 16px}.transparent.light .checkmark,.transparent.light div.captcha,.transparent.light input.sform-field,.transparent.light textarea.sform-field{border-color:#f8f8f8}.highlighted input.sform-field{border:none;border-radius:5px;background-color:#eaeaea;padding:10px 16px}.default textarea.sform-field{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 16px}.basic textarea.sform-field{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff;padding:10px 32px 10px 16px}.rounded textarea.sform-field{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:5px;background-color:#fff;padding:10px 32px 10px 16px}.minimal textarea.sform-field{border:none;border-bottom:2px solid #ccc;border-radius:0;background-color:transparent;padding:10px 0}.transparent textarea.sform-field{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent;padding:10px 16px}.highlighted textarea.sform-field{border:none;border-radius:5px;background-color:#eaeaea;padding:10px 16px}.sform-field-group.checkbox{margin-top:20px}input.checkbox{position:absolute;opacity:0;height:1px;width:1px;appearance:none;-webkit-appearance:none;-moz-appearance:none}input.checkbox+label{position:relative;cursor:default;display:inline-block;margin-left:0;width:100%;font-size:inherit}input.checkbox+label a{color:inherit;text-decoration:underline;text-decoration-style:dotted}.checkmark{position:absolute;cursor:pointer;top:0;left:0;height:34px;width:34px}input.checkbox:checked+label .checkmark:after{display:block}.default input.checkbox+label,.highlighted input.checkbox+label,.minimal input.checkbox+label,.transparent input.checkbox+label{padding-left:50px;line-height:34px;margin-bottom:25px}.default .checkmark{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff}.default .checkmark:after,.highlighted .checkmark:after,.minimal .checkmark:after,.transparent .checkmark:after{left:10px;top:5px;width:12px;height:18px;border:solid #fff;border-width:0 4px 4px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);content:"";position:absolute;box-sizing:border-box;display:none}.default input.checkbox:checked+label .checkmark{border-color:#8bc34a;background-color:#8bc34a}.basic .checkmark{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff;margin-top:10px;height:20px;width:20px;line-height:20px;text-align:center;color:#fff;font-size:18px;font-weight:600}.basic .checkmark:after{display:none;box-sizing:border-box}.basic input.checkbox:checked+label .checkmark{background-color:#007bff;border-color:#007bff}.basic input.checkbox:checked+label .checkmark:after{content:"\2713";display:block}.basic input.checkbox+label{padding-left:30px;margin-top:10px;margin-bottom:30px;line-height:40px}.rounded .checkmark{width:52px;height:26px;border:none;border-radius:26px;background-color:#6c757d}.rounded .checkmark:after{position:absolute;display:inherit;content:"";height:18px;width:18px;left:4px;top:4px;border-radius:50%;background-color:#fff;-webkit-transition:.4s;transition:.4s}.rounded input.checkbox:checked+label .checkmark{background-color:#8bc34a}.rounded input.checkbox:checked+label .checkmark:after{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.rounded input.checkbox+label{margin-bottom:22px;line-height:26px;padding-left:72px}.minimal .checkmark{border-width:2px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:transparent}.minimal input.checkbox:checked+label .checkmark{border-color:#8bc34a;background-color:#8bc34a}.transparent .checkmark{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent}.transparent input.checkbox:checked+label .checkmark{border-color:#0d6efd;background-color:#0d6efd}.highlighted .checkmark{border-width:1px;border-color:#eaeaea;border-style:solid;border-radius:5px;background-color:#eaeaea}.highlighted input.checkbox:checked+label .checkmark{border-color:#0d6efd;background-color:#0d6efd}div.captcha{width:200px;height:intrinsic}input.sform-field.question{width:110px;height:inherit;cursor:text;border:none;outline:0;display:inline-block;background-color:transparent;padding-right:0;padding-left:0;text-align:right;box-shadow:none}input.sform-field.captcha{width:75px;border:none;outline:0;display:inline-block;background-color:transparent;padding-right:0;padding-left:5px;box-shadow:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{appearance:textfield;-moz-appearance:textfield;-webkit-appearance:textfield}.default div.captcha{border-width:1px;border-color:#ccc;border-style:solid;border-radius:5px;background-color:#fff}.basic .sform-field-group.checkbox{margin-top:0}.basic div.captcha{border-width:1px;border-color:#aaa;border-style:solid;border-radius:0;background-color:#fff}.rounded div.captcha{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:5px;background-color:#fff}.minimal div.captcha{border-bottom:2px solid #ccc;background-color:transparent}.transparent div.captcha{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:transparent}.highlighted div.captcha{border:none;border-radius:5px;background-color:#eaeaea}#gcaptcha-wrap,.gcaptcha-wrap{margin:16px 0 30px}.rc-anchor-error-msg-container{letter-spacing:-.5px}.sizelabel{font-size:inherit;margin-bottom:22px}.sizelabel.smaller{font-size:.9em}.sizelabel.larger{font-size:1.1em}.submit-wrap{margin:22px 0}.submit-wrap button.sform{outline:0;font-size:inherit;text-transform:uppercase;font-weight:600;line-height:1.25;text-decoration:none;box-shadow:none;padding:10px 16px}.submit-wrap button.sform:hover{box-shadow:none}.default .submit-wrap button.sform{border-width:1px;border-color:#0090d5;border-style:solid;border-radius:25px;background-color:#0090d5;color:#fff;cursor:pointer}.default .submit-wrap button.sform:hover{color:#0090d5;background-color:#fff}.basic .submit-wrap button.sform{border-width:1px;border-color:#007bff;border-style:solid;border-radius:0;background-color:#007bff;color:#fff}.basic .submit-wrap button.sform:hover{border-color:#0062cc;background-color:#0069d9}.rounded .submit-wrap button.sform{border-width:1px;border-color:#6c757d;border-style:solid;border-radius:50px;background-color:transparent;color:inherit}.rounded .submit-wrap button.sform:hover{border-color:#6c757d;color:#fff;background-color:#6c757d}.minimal .submit-wrap button.sform{border-width:2px;border-color:#0090d5;border-style:solid;border-radius:5px;background-color:#0090d5;color:#fff}.minimal .submit-wrap button.sform:hover{border-color:#0090d5;color:#0090d5;background-color:#fff}.transparent .submit-wrap button.sform{border-width:2px;border-color:#333;border-style:solid;border-radius:0;background-color:#333;color:#fff}.transparent .submit-wrap button.sform:hover{border-color:#0d6efd;color:#fff;background-color:#0d6efd}.highlighted .submit-wrap button.sform{border-width:1px;border-color:#333;border-style:solid;border-radius:5px;background-color:#333;color:#fff}.highlighted .submit-wrap button.sform:hover{border-color:#0d6efd;color:#fff;background-color:#0d6efd}.submit-wrap button.smaller{font-size:.9em}.submit-wrap button.larger{font-size:1.1em}.submit-wrap button:focus{outline:0}.submit-wrap button:hover{color:#fff;background-color:#0d6efd;border-color:#0d6efd;box-shadow:none}.submit-wrap.left{text-align:left}.submit-wrap.right{text-align:right}.submit-wrap.center{text-align:center}.submit-wrap.full{text-align:center}.submit-wrap button.fullwidth{width:100%}.carrots{opacity:0;position:absolute;top:0;left:0;height:0;width:0;z-index:-1}div.captcha.is-invalid,input.sform-field.is-invalid,input.sform-field.is-invalid+label .checkmark,textarea.sform-field.is-invalid{border-color:#dc3545}.sform-field.is-invalid:focus,div.captcha.is-invalid.focus{box-shadow:none}div.captcha.is-invalid+.error-des span{display:block}label.checkbox.is-invalid{color:#dc3545}.basic .sform-field.is-invalid,.basic div.captcha.is-invalid,.rounded .sform-field.is-invalid,.rounded div.captcha.is-invalid{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right 5px center;background-size:1em}.basic textarea.sform-field.is-invalid,.rounded textarea.sform-field.is-invalid{background-position:top 14px right 5px}.basic input.sform-field.captcha.is-invalid,.basic input.sform-field.question.is-invalid,.rounded input.sform-field.captcha.is-invalid,.rounded input.sform-field.question.is-invalid{background-image:none}.rounded input.sform-field.is-invalid+label .checkmark{background-color:#dc3545}.highlighted div.captcha.is-invalid,.highlighted input.sform-field.is-invalid,.highlighted input.sform-field.is-invalid+label .checkmark,.highlighted textarea.sform-field.is-invalid{border:none;background-color:#f1abb2}input:focus,textarea:focus{-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.sform-field.captcha:focus{background-color:transparent;box-shadow:none}.default div.captcha.focus,.default input.sform-field:focus,.default textarea.sform-field:focus{border-color:#0090d5;background-color:#fafafa;outline:0}.default div.captcha.is-invalid.focus,.default input.sform-field.is-invalid:focus,.default textarea.sform-field.is-invalid:focus,.minimal div.captcha.is-invalid.focus,.minimal input.sform-field.is-invalid:focus,.minimal textarea.sform-field.is-invalid:focus{border-color:#dc3545}.basic input.sform-field.captcha:focus,.basic input.sform-field.question:focus,.default input.sform-field.captcha:focus,.default input.sform-field.question:focus,.highlighted input.sform-field.captcha:focus,.highlighted input.sform-field.question:focus{background-color:transparent}.basic div.captcha.focus,.basic input.sform-field:focus,.basic textarea.sform-field:focus,.rounded div.captcha.focus,.rounded input.sform-field:focus,.rounded textarea.sform-field:focus{border-color:#007bff;box-shadow:0 0 0 2px rgba(0,123,255,.25);outline:0}.basic .sform-field.captcha:focus,.basic .sform-field.is-invalid.captcha:focus,.basic .sform-field.is-invalid.question:focus,.basic .sform-field.question:focus{box-shadow:none}.basic div.captcha.is-invalid.focus,.basic input.sform-field.is-invalid:focus,.basic textarea.sform-field.is-invalid:focus,.rounded div.captcha.is-invalid.focus,.rounded input.sform-field.is-invalid:focus,.rounded textarea.sform-field.is-invalid:focus{border-color:#dc3545;box-shadow:0 0 0 2px rgba(220,53,69,.25)}.rounded .sform-field.captcha:focus,.rounded .sform-field.is-invalid.captcha:focus,.rounded .sform-field.is-invalid.question:focus,.rounded .sform-field.question:focus{box-shadow:none}.minimal div.captcha.focus,.minimal input.sform-field:focus,.minimal textarea.sform-field:focus{border-color:#0090d5;outline:0;box-shadow:none}.transparent div.captcha.focus,.transparent input.sform-field:focus,.transparent textarea.sform-field:focus{border-color:#0d6efd;background-color:#e8f0fe;outline:0;box-shadow:none}.transparent .sform-field.captcha:focus,.transparent .sform-field.is-invalid.captcha:focus,.transparent .sform-field.is-invalid.question:focus,.transparent .sform-field.question:focus{background-color:transparent;box-shadow:none}.transparent div.captcha.is-invalid.focus,.transparent input.sform-field.is-invalid:focus,.transparent textarea.sform-field.is-invalid:focus{border-color:#dc3545;background-color:#f1b1b7}.highlighted div.captcha.focus,.highlighted input.sform-field:focus,.highlighted textarea.sform-field:focus{border:none;background-color:rgba(13,110,253,.5);outline:0;box-shadow:none}.highlighted div.captcha.is-invalid.focus,.highlighted input.sform-field.is-invalid:focus,.highlighted textarea.sform-field.is-invalid:focus{background-color:#f1abb2}.error-des{line-height:1;color:#dc3545;font-size:14px;height:14px;margin-top:5px;margin-bottom:5px}.error-des span{display:none}.sform-field.is-invalid+.error-des span{display:block}.msgoutside{padding:0 0 5px 0;position:relative;outline:0}.msgoutside span{display:block;visibility:hidden;text-align:center;font-size:16px;padding:7.5px 12.5px}.default .msgoutside span,.highlighted .msgoutside span,.transparent .msgoutside span{border-radius:5px;background-color:#dc3545;color:#fff}.basic .msgoutside span{border-radius:0;background-color:#f8d7da;color:#721c24}.rounded .msgoutside span{border-radius:5px;background-color:#dc3545;color:#fff;opacity:.75}.minimal .msgoutside span{border-radius:5px;background-color:#f8d7da;color:#dc3545}.noscript{position:absolute;top:0;width:100%}.msgoutside.top{margin-bottom:20px}.form.confirmation{text-align:center;padding-top:50px;outline:0}.form.confirmation>img,.form.confirmation>p>img{margin:30px auto;width:250px}.sform-confirmation{position:relative;outline:0}.sform.spinner{height:44px;line-height:44px;width:120px;padding:3px 0}.minimal .sform.spinner,.transparent .sform.spinner{height:46px;line-height:46px}.sform.spinner.left{margin:0 auto 0 0}.sform.spinner.right{margin:0 0 0 auto}.sform.spinner.center{margin:0 auto}.sform.spinner>div{width:18px;height:18px;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.2s infinite ease-in-out both;animation:sk-bouncedelay 1.2s infinite ease-in-out both;margin:0 3px}.default .sform.spinner>div,.highlighted .sform.spinner>div,.minimal .sform.spinner>div{background-color:#0090d5}.basic .sform.spinner>div{background-color:#0069d9}.rounded .sform.spinner>div{background-color:#6c757d}.transparent .sform.spinner>div{background-color:#0d6efd}.sform.spinner .bounce1{-webkit-animation-delay:-.4s;animation-delay:-.4s}.sform.spinner .bounce2{-webkit-animation-delay:-.3s;animation-delay:-.3s}.sform.spinner .bounce3{-webkit-animation-delay:-.2s;animation-delay:-.2s}.sform.spinner .bounce4{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;clear:right}.row .captcha-error{width:100%;padding-left:135px}.col-sm-10{position:relative;width:100%;min-height:1px}.checkbox.col-sm-10,.msgoutside.col-sm-10,.nolabel.col-sm-10,.submit-wrap.col-sm-10{float:right}.row.checkbox{float:right;width:calc(100% - 135px)}label.sform.col-sm-2{letter-spacing:-.05em}@media (min-width:576px){.col-sm-10{-ms-flex:0 0 calc(100% - 135px);flex:0 0 calc(100% - 135px);max-width:calc(100% - 135px)}.col-sm-2{-ms-flex:135px;flex:135px;max-width:135px;line-height:41px;padding-right:15px}}@media (max-width:575px){.col-sm-10{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.col-sm-2{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}}@media (max-width:1023px){.email.half,.name.half{width:100%;float:left}.lastname.half,.phone.half{width:100%;float:right}}.sform-bottom.rtl,.sform-introduction.rtl,form.sform.rtl{direction:rtl}.rtl .sform-field-group label span{display:inline-block;padding-right:5px;padding-left:0}.rtl .lastname.half,.rtl .phone.half{float:left}.rtl .email.half,.rtl .name.half{float:right}.rtl .row{clear:left}.rtl .checkbox.col-sm-10,.rtl .nolabel.col-sm-10{float:left}.rtl .checkmark{right:0}.rtl label.sform.checkbox:before{right:0}.rtl.basic label.sform.checkbox{padding-right:35px;padding-left:0}.rtl.rounded label.sform.checkbox{padding-right:72px;padding-left:0}.rtl.basic input.sform-field,.rtl.basic textarea.sform-field,.rtl.rounded input.sform-field,.rtl.rounded textarea.sform-field{padding:10px 16px 10px 32px}.rtl.basic div.captcha.is-invalid,.rtl.basic input.sform-field.is-invalid,.rtl.rounded div.captcha.is-invalid,.rtl.rounded input.sform-field.is-invalid{background-position:left 5px center}.rtl.basic textarea.sform-field.is-invalid,.rtl.rounded textarea.sform-field.is-invalid{background-position:top 14px left 5px}.rtl .sform-field.question{text-align:left;padding-left:0}.rtl .sform-field.captcha{padding-right:5px}.rtl.basic input.sform-field.question,.rtl.rounded input.sform-field.question{padding-right:0;padding-left:0}.rtl.basic input.sform-field.captcha,.rtl.rounded input.sform-field.captcha{padding-right:5px;padding-left:32px}.rtl .captcha-error.row{padding-right:135px}.rtl .error-des span{text-align:right}.rtl .msgoutside,.rtl .submit-wrap{float:left;width:100%}.rtl .sform-field-group .col-sm-2{padding-right:0}.rtl label.checkbox span{padding-left:0;padding-right:0}.rtl label.checkbox span.required-symbol{padding-right:5px}.rtl .sform-field-group label span.d-none{display:none}.rtl label.checkbox{margin-right:0;padding-right:50px;padding-left:0}.rtl .sform-field-group label{text-align:right}.rtl .row.checkbox{float:left}.form-wrap.success{background-color:inherit!important}
  • simpleform/trunk/public/css/public.css

    r2618058 r2664049  
    2929
    3030/* General form fields */
    31 input.sform-field { width: 100%; margin-bottom: 0; outline: none; font-size: inherit; color: inherit; font-weight: 400; line-height: normal; }
    32 textarea.sform-field { width: 100%; height: auto; outline: none; line-height: 1.5; font-size: inherit; color: inherit; font-weight: 400; }
     31input.sform-field { width: 100%; margin-bottom: 0; outline: none; font-size: inherit; color: inherit; font-weight: 400; line-height: normal; box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing: border-box; }
     32textarea.sform-field { width: 100%; height: auto; outline: none; line-height: 1.5; font-size: inherit; color: inherit; font-weight: 400; box-sizing: border-box; -webkit-box-sizing:border-box; -moz-box-sizing: border-box; }
    3333.half { clear: none; }
    3434.name.half, .email.half { width: 47.5%; float: left; }
     
    103103.submit-wrap button.sform { outline: none; font-size: inherit; text-transform: uppercase; font-weight: 600; line-height: 1.25; text-decoration: none; box-shadow: none; padding: 10px 16px; }
    104104.submit-wrap button.sform:hover { box-shadow: none; }
    105 .default .submit-wrap button.sform { border-width: 1px; border-color: #0090D5; border-style: solid; border-radius: 25px; background-color: #0090D5; color: #FFF; }
     105.default .submit-wrap button.sform { border-width: 1px; border-color: #0090D5; border-style: solid; border-radius: 25px; background-color: #0090D5; color: #FFF; cursor: pointer; }
    106106.default .submit-wrap button.sform:hover { color: #0090D5; background-color: #FFF; }
    107107.basic .submit-wrap button.sform { border-width: 1px; border-color: #007bff; border-style: solid; border-radius: 0; background-color: #007bff; color: #FFF; }
  • simpleform/trunk/simpleform.php

    r2618058 r2664049  
    66 * Plugin URI:        https://wpsform.com
    77 * Description:       Create a basic contact form for your website. Lightweight and very simple to manage, SimpleForm is immediately ready to use.
    8  * Version:           2.0.9
     8 * Version:           2.1
    99 * Requires at least: 5.2
    1010 * Requires PHP:      5.6
     
    1414 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
    1515 * Text Domain:       simpleform
    16  * Domain Path:       /languages
    1716 *
    1817 */
     
    2726 
    2827define( 'SIMPLEFORM_NAME', 'SimpleForm' );
    29 define( 'SIMPLEFORM_VERSION', '2.0.9' );
    30 define( 'SIMPLEFORM_DB_VERSION', '2.0.5' );
     28define( 'SIMPLEFORM_VERSION', '2.1' );
     29define( 'SIMPLEFORM_DB_VERSION', '2.1' );
    3130define( 'SIMPLEFORM_PATH', plugin_dir_path( __FILE__ ) );
    3231define( 'SIMPLEFORM_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.