Plugin Directory

Changeset 2364772


Ignore:
Timestamp:
08/19/2020 10:40:29 AM (6 years ago)
Author:
prosolution
Message:

1.5.18

  • New setting to sort by Skillgroup at adminsite / application form, step Expertise
Location:
prosolution-wp-client/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • prosolution-wp-client/trunk/README.txt

    r2361008 r2364772  
    66Tested up to: 4.9.5
    77Requires PHP: 5.6
    8 Stable tag: 1.5.17
     8Stable tag: 1.5.18
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6767== Changelog ==
    6868
     69= 1.5.18 =
     70* New setting to sort by Skillgroup at adminsite / application form, step Expertise
     71
    6972= 1.5.17 =
    7073* Fixed order skill group by new column "skillgroup_orderno"
  • prosolution-wp-client/trunk/admin/class-prosolwpclient-admin.php

    r2351523 r2364772  
    386386                $response_data = wp_remote_get( $urlval . '/go/api/system/list/maritalstatus', array('headers'=>$header_info));
    387387            }
    388 
     388           
    389389            if ( $is_api_setup && !is_wp_error( $response_data ) ) {
    390390                if( is_object($response_data['body']) ){
     
    810810                        ),
    811811                        'expertise_act'  => array('name'=>'expertise_act','type'=>'hidden','default'=>'1'),
     812                        'expertise_skillgroup_sort'  => array('name'=>'expertise_skillgroup_sort','type'=>'hidden','default'=>'1','class'=>'hidden'),
    812813                                               
    813814                        'sidedishes'  => array(
  • prosolution-wp-client/trunk/includes/class-prosolwpclient-activator.php

    r2361008 r2364772  
    223223                          name varchar(50) NOT NULL,
    224224                          professiongroups varchar(100) NOT NULL,
    225                           skillgroup_orderno varchar(100) NOT NULL,
    226225                          PRIMARY KEY (skillgroupId)
    227226                        ) $charset_collate; ";
  • prosolution-wp-client/trunk/includes/class-prosolwpclient-table-helper.php

    r2361008 r2364772  
    372372                }
    373373                if ( $table_name == 'skillgroup' ) {
    374                    
    375374                    $id_arr                 = $response_data->id;
    376375                    $name_arr               = $response_data->name;
    377376                    $professiongroups_arr   = $response_data->professiongroupidlist;
    378                     $skillgroup_orderno_arr = $response_data->skillgroup_orderno;
    379377
    380378                    foreach ( $id_arr as $index => $skillgroup_id ) {
     
    384382                                'skillgroupId'       => $skillgroup_id,
    385383                                'name'               => isset( $name_arr[ $index ] ) ? $name_arr[ $index ] : '',
    386                                 'professiongroups'   => isset( $professiongroups_arr[ $index ] ) ? $professiongroups_arr[ $index ] : '',
    387                                 'skillgroup_orderno' => isset( $skillgroup_orderno_arr[ $index ] ) ? $skillgroup_orderno_arr[ $index ] : ''
    388                             ),
    389                             array(
    390                                 '%s',
     384                                'professiongroups'   => isset( $professiongroups_arr[ $index ] ) ? $professiongroups_arr[ $index ] : ''
     385                            ),
     386                            array(
    391387                                '%s',
    392388                                '%s',
  • prosolution-wp-client/trunk/includes/class-setting.php

    r2351523 r2364772  
    108108
    109109            function proSol_admin_init() {
    110                 //delete_option('prosolwpclient_applicationform'); //for remove option manually
     110                //delete_option('prosolwpclient_joblist'); //for remove option manually
    111111                //register settings sections
    112112                foreach ( $this->settings_sections as $section ) {
     
    375375                    $maxlength_html = 'data-rule-maxlength="' . $max . '"';
    376376                }
    377                 if(array_key_exists('field_list',$array_value)){ //exclude expertise and sidedishes
    378                     $fields_app_form = sprintf( '<p><i>'.esc_html__('Set Following fields:','prosolwpclient').'</i></p>
    379                         <table><tr><th>'.esc_html__('Fields','prosolwpclient').'</th><th>'.esc_html__('Show / Hide','prosolwpclient').'</th><th>'.esc_html__('Mandatory','prosolwpclient').'</th></tr>'
    380                     );
    381                     foreach($array_value['field_list'] as $fieldcol) {
    382                         //default value checkbox
    383                         $checkedcol2 = $array_value[$fieldcol.'_man'] == '1' ? 'checked ' : '';
    384                         $checkedcol1 = '';
    385                         if($array_value[$fieldcol.'_act'] == '1') {
    386                             $checkedcol1 = 'checked';
    387                         }else{
    388                             $checkedcol2 .= ' disabled';
     377                if(array_key_exists('field_list',$array_value)){ //exclude sidedishes
     378                    if($array_value['field_list'][0] == 'skillgroup'){
     379                        $sel_orderno = '';
     380                        $sel_name = '';
     381                        $defval_skillgroup_sort = $array_value['skillgroup_sort'];                     
     382                        if($defval_skillgroup_sort == '0'){
     383                            $sel_orderno = 'selected = "selected"';
     384                        } else {
     385                            $sel_name = 'selected = "selected"';
    389386                        }
    390                         //custom default value chkbox
    391                         if($array_value['gender_act'] == '1'){
    392                             $checkedcol3 = $array_value['diverse_act'] == '1' ? 'checked' : '';
    393                         } else{
    394                             $checkedcol3 = 'disabled';
    395                         }                       
    396 
    397                         //label for recruitment fields
    398                         if(substr($fieldcol,0,6) == 'Title_' ){
    399                             $col_label = $array_value[$fieldcol.'_cflabel'];
    400                         } else {
    401                             $col_label = $fieldcol;
     387                        $fields_app_form = sprintf( '<p><i>'.esc_html__('Set Following fields:','prosolwpclient').'</i></p>
     388                            <ul>
     389                                <li>'.esc_html__('Skillgroup sort by:','prosolwpclient').'
     390                                &nbsp;<select class="%1$s-text prosolwpclient-chosen-select" id="%2$s[%3$s_skillgroup_sort]" name="%2$s[%3$s_skillgroup_sort]"/>
     391                                    <option value="0" %4$s>'.esc_html__('Order number','prosolwpclient').'</option>
     392                                    <option value="1" %5$s>'.esc_html__('Name list','prosolwpclient').'</option>
     393                                </select></li>
     394                            </ul>'
     395                        , $size, $args['section'], $args['id'], $sel_orderno, $sel_name );
     396                    } else{
     397                        $fields_app_form = sprintf( '<p><i>'.esc_html__('Set Following fields:','prosolwpclient').'</i></p>
     398                            <table><tr><th>'.esc_html__('Fields','prosolwpclient').'</th><th>'.esc_html__('Show / Hide','prosolwpclient').'</th><th>'.esc_html__('Mandatory','prosolwpclient').'</th></tr>'
     399                        );
     400                        foreach($array_value['field_list'] as $fieldcol) {
     401                            //default value checkbox
     402                            $checkedcol2 = $array_value[$fieldcol.'_man'] == '1' ? 'checked ' : '';
     403                            $checkedcol1 = '';
     404                            if($array_value[$fieldcol.'_act'] == '1') {
     405                                $checkedcol1 = 'checked';
     406                            }else{
     407                                $checkedcol2 .= ' disabled';
     408                            }
     409                            //custom default value chkbox
     410                            if($array_value['gender_act'] == '1'){
     411                                $checkedcol3 = $array_value['diverse_act'] == '1' ? 'checked' : '';
     412                            } else{
     413                                $checkedcol3 = 'disabled';
     414                            }                       
     415
     416                            //label for recruitment fields
     417                            if(substr($fieldcol,0,6) == 'Title_' ){
     418                                $col_label = $array_value[$fieldcol.'_cflabel'];
     419                            } else {
     420                                $col_label = $fieldcol;
     421                            }
     422                           
     423                            //style for personaldata
     424                            $padtop = $fieldcol == 'gender' ? "54.5px" : "0px";
     425                            $widcol = $args['id'] == 'personaldata' ? "width: 15%;" : "";
     426
     427                            //style checkbox for diverse
     428                            $wrdclr_diverse = $array_value['gender_act'] == '1' ? 'color:black' : 'color:gray';
     429                           
     430
     431                            $fields_app_form .=  sprintf(  '<tr>
     432                                <td style="padding:0 0 %8$s 10px">'.esc_html__($col_label,'prosolwpclient').'</td>
     433                                <td style="%9$s padding:0 0 %8$s 10px"><input type="checkbox" id="%1$s[%2$s_%3$s_view1]" name="%1$s[%2$s_%3$s_view1]" %4$s /></td>
     434                                <td style="%9$s padding:0 0 %8$s 10px"><input type="checkbox" id="%1$s[%2$s_%3$s_view2]" name="%1$s[%2$s_%3$s_view2]" %5$s /></td>
     435                                <input type="hidden" id="%1$s[%2$s_%3$s_act]" name="%1$s[%2$s_%3$s_act]" value="%6$s" />
     436                                <input type="hidden" id="%1$s[%2$s_%3$s_man]" name="%1$s[%2$s_%3$s_man]" value="%7$s" />
     437                                ', $args['section'], $args['id'], $fieldcol, $checkedcol1, $checkedcol2, $array_value[$fieldcol.'_act'], $array_value[$fieldcol.'_man'],$padtop,$widcol);
     438                            if($fieldcol == 'gender'){ //checkbox for diverse
     439                                $fields_app_form .=  sprintf( '
     440                                    <td style="padding:0 0 0 10px; %6$s" align="left" class="diverse_style"><input type="checkbox" id="%1$s[%2$s_%3$s_view3]" name="%1$s[%2$s_%3$s_view3]" %4$s />'
     441                                    .esc_html__('Activate Gender "Diverse"','prosolwpclient').'
     442                                    <br><br><span><i>'.esc_html__('Please make sure that a salutation for gender "Diverse" is set in WorkExpert','prosolwpclient').'</i></span>
     443                                    </td>                               
     444                                    <input type="hidden" id="%1$s[%2$s_diverse_act]" name="%1$s[%2$s_diverse_act]" value="%5$s" />
     445                                ', $args['section'], $args['id'], $fieldcol, $checkedcol3, $array_value['diverse_act'], $wrdclr_diverse ); 
     446                            }
     447                            $fields_app_form .= sprintf( '</tr>' );
    402448                        }
    403                        
    404                         //style for personaldata
    405                         $padtop = $fieldcol == 'gender' ? "54.5px" : "0px";
    406                         $widcol = $args['id'] == 'personaldata' ? "width: 15%;" : "";
    407 
    408                         //style checkbox for diverse
    409                         $wrdclr_diverse = $array_value['gender_act'] == '1' ? 'color:black' : 'color:gray';
    410                        
    411 
    412                         $fields_app_form .=  sprintf(  '<tr>
    413                             <td style="padding:0 0 %8$s 10px">'.esc_html__($col_label,'prosolwpclient').'</td>
    414                             <td style="%9$s padding:0 0 %8$s 10px"><input type="checkbox" id="%1$s[%2$s_%3$s_view1]" name="%1$s[%2$s_%3$s_view1]" %4$s /></td>
    415                             <td style="%9$s padding:0 0 %8$s 10px"><input type="checkbox" id="%1$s[%2$s_%3$s_view2]" name="%1$s[%2$s_%3$s_view2]" %5$s /></td>
    416                             <input type="hidden" id="%1$s[%2$s_%3$s_act]" name="%1$s[%2$s_%3$s_act]" value="%6$s" />
    417                             <input type="hidden" id="%1$s[%2$s_%3$s_man]" name="%1$s[%2$s_%3$s_man]" value="%7$s" />
    418                             ', $args['section'], $args['id'], $fieldcol, $checkedcol1, $checkedcol2, $array_value[$fieldcol.'_act'], $array_value[$fieldcol.'_man'],$padtop,$widcol);
    419                         if($fieldcol == 'gender'){ //checkbox for diverse
    420                             $fields_app_form .=  sprintf( '
    421                                 <td style="padding:0 0 0 10px; %6$s" align="left" class="diverse_style"><input type="checkbox" id="%1$s[%2$s_%3$s_view3]" name="%1$s[%2$s_%3$s_view3]" %4$s />'
    422                                 .esc_html__('Activate Gender "Diverse"','prosolwpclient').'
    423                                 <br><br><span><i>'.esc_html__('Please make sure that a salutation for gender "Diverse" is set in WorkExpert','prosolwpclient').'</i></span>
    424                                 </td>                               
    425                                 <input type="hidden" id="%1$s[%2$s_diverse_act]" name="%1$s[%2$s_diverse_act]" value="%5$s" />
    426                             ', $args['section'], $args['id'], $fieldcol, $checkedcol3, $array_value['diverse_act'], $wrdclr_diverse ); 
    427                         }
    428                         $fields_app_form .= sprintf( '</tr>' );
     449                        $fields_app_form .= sprintf( '</table>' );
    429450                    }
    430                     $fields_app_form .= sprintf( '</table>' );
    431                 }
    432                
     451                   
     452                } 
     453
    433454                $warning_text='';
    434455                if($args['id'] == 'others') $warning_text = sprintf('<div class="warningtext hidden">'.esc_html__('Please add minimum 1 field in activated step','prosolwpclient').'</div>');
     
    874895                $fields_section['education']=array('postcode','country','level','description');
    875896                $fields_section['workexperience']=array('job','gendesc','company','postcode','country','federal','experience','contract','employment');
     897                $fields_section['expertise']=array('skillgroup');
    876898                $fields_section['others']=array('source','apply','message');
    877899
     
    884906                        $output['label']=$options[ $option ];
    885907                        $output[ 'activated' ]=$options[ $option.'_act' ];
    886                         if( $option == 'personaldata' || $option == 'education' || $option == 'workexperience' || $option == 'others' ){
     908                        if( $option == 'personaldata' || $option == 'education' || $option == 'workexperience' || $option == 'others' || $option == 'expertise'){
    887909                            $output['field_list']=$fields_section[$option];
    888910                            foreach($fields_section[$option] as $field_app_form){
    889                                 $output[$field_app_form.'_act']=$options[ $option.'_'.$field_app_form.'_act' ];
    890                                 $output[$field_app_form.'_man']=$options[ $option.'_'.$field_app_form.'_man' ];
    891 
     911                                if($field_app_form == 'skillgroup' ){ //exclusive for expertise -> skillgroup
     912                                    $output[$field_app_form.'_sort']=$options[ $option.'_'.$field_app_form.'_sort' ];
     913                                } else{
     914                                    $output[$field_app_form.'_act']=$options[ $option.'_'.$field_app_form.'_act' ];
     915                                    $output[$field_app_form.'_man']=$options[ $option.'_'.$field_app_form.'_man' ];
     916                                }
     917                               
    892918                                if($isrec['enable_recruitment'] == 'on' && substr($field_app_form,0,6) == 'Title_'){
    893919                                    //get label for new recruitment
     
    901927                                }   
    902928                            }
    903 
    904929                            //add custom setting
    905930                            if($option == 'personaldata')$output['diverse_act']=$options['personaldata_diverse_act'];
     931                           
    906932                        }
    907933                    } else if( $section == 'prosolwpclient_privacypolicy'){
  • prosolution-wp-client/trunk/includes/single-table-list/class-prosolwpclient-skillgroup-list.php

    r2361008 r2364772  
    6666        {
    6767            return stripslashes($item['professiongroups']);
    68         }
    69 
    70          /**
    71          * Callback for collumn 'skillgroup_orderno'
    72          *
    73          * @param array $item
    74          *
    75          * @return string
    76          */
    77 
    78         function column_skillgroup_orderno($item)
    79         {
    80             return stripslashes($item['skillgroup_orderno']);
    8168        }
    8269       
     
    134121                    return $item[$column_name];
    135122                case 'professiongroups':
    136                     return $item[$column_name];
    137                 case 'skillgroup_orderno':
    138                     return $item[$column_name];   
     123                    return $item[$column_name];
    139124                default:
    140125                    return print_r($item, true); //Show the whole array for troubleshooting purposes
     
    152137'skillgroupId'     => esc_html__('Skillgroup Id', 'prosolwpclient'),
    153138'name'             => esc_html__('Name', 'prosolwpclient'),
    154 'professiongroups' => esc_html__('Profession Groups', 'prosolwpclient'),
    155 'skillgroup_orderno' => esc_html__('skillgroup Orderno', 'prosolwpclient'),
     139'professiongroups' => esc_html__('Profession Groups', 'prosolwpclient')
    156140
    157141            );
     
    166150                'skillgroupId'     => array('skillgroupId', false),     //true means it's already sorted
    167151                'name'             => array('name', false),
    168                 'professiongroups' => array('professiongroups', false),     //true means it's already sorted
    169                 'skillgroup_orderno' => array('skillgroup_orderno', true),     //true means it's already sorted               
     152                'professiongroups' => array('professiongroups', false)    //true means it's already sorted           
    170153            );
    171154
     
    241224
    242225
    243             $order = (isset($_REQUEST['order']) && $_REQUEST['order'] != '') ? $_REQUEST['order'] : 'asc';
    244             $orderby = (isset($_REQUEST['orderby']) && $_REQUEST['orderby'] != '') ? $_REQUEST['orderby'] : 'name';
     226            $order = (isset($_REQUEST['order']) && $_REQUEST['order'] != '') ? $_REQUEST['order'] : '';
     227            $orderby = (isset($_REQUEST['orderby']) && $_REQUEST['orderby'] != '') ? $_REQUEST['orderby'] : '';
    245228
    246229            $search = (isset($_REQUEST['s']) && $_REQUEST['s'] != '') ? sanitize_text_field($_REQUEST['s']) : '';
     
    284267         * @return array|null|object
    285268         */
    286         function proSol_getData($search = '', $orderby = 'name', $order = 'asc', $perpage = 20, $page = 1)
     269        function proSol_getData($search = '', $orderby = '', $order = '', $perpage = 20, $page = 1)
    287270        {
    288271
     
    292275
    293276
    294             $sql_select = "SELECT skillgroupId,name,professiongroups,skillgroup_orderno FROM $table_ps_skillgroup";
     277            $sql_select = "SELECT skillgroupId,name,professiongroups FROM $table_ps_skillgroup";
    295278
    296279
     
    315298            $limit_sql .= ' ' . $perpage;
    316299
    317 
    318             $sortingOrder = " ORDER BY $orderby $order ";
     300            if($order == ''){
     301                $sortingOrder = "";
     302            } else{
     303                $sortingOrder = " ORDER BY $orderby $order ";
     304            }           
    319305
    320306
    321307            $data = $wpdb->get_results("$sql_select  WHERE  $where_sql $sortingOrder  $limit_sql", 'ARRAY_A');
    322 
    323308
    324309            return $data;
     
    333318         * @return array|null|object
    334319         */
    335         function proSol_getDataCount($search = '', $orderby = 'name', $order = 'asc')
     320        function proSol_getDataCount($search = '', $orderby = '', $order = '')
    336321        {
    337322
  • prosolution-wp-client/trunk/languages/prosolwpclient-de_DE.po

    r2357146 r2364772  
    44"Language: de_DE\n"
    55"Plural-Forms: nplurals=2; plural=n != 1;\n"
    6 "PO-Revision-Date: 2020-08-11 14:13+0700\n"
     6"PO-Revision-Date: 2020-08-19 17:08+0700\n"
    77"X-Generator: Poedit 2.2\n"
    88"Project-Id-Version: ProSolution WP Client\n"
     
    1414"Content-Transfer-Encoding: 8bit\n"
    1515
     16#: includes\class-setting.php:398
     17msgid "Name list"
     18msgstr "Alphabetisch"
     19
     20#: includes\class-setting.php:397
     21msgid "Order number"
     22msgstr "Reihenfolge aus Woex"
     23
     24#: includes\class-setting.php:395
     25msgid "Skillgroup sort by:"
     26msgstr "Sortierung der Kenntnissgruppen:"
     27
    1628#: public\templates\singlefieldset\prosolwpclientjobapplicationexpertiseinfo.php:51
    1729msgid "No Value"
     
    657669#: public/class-prosolwpclient-public.php:459
    658670msgid "Title could not be more than 35 characters"
    659 msgstr ""
    660 "Titel darf nicht mehr als 35 Zeichen umfassen.\n"
     671msgstr "Titel darf nicht mehr als 35 Zeichen umfassen.\n"
    661672"- Description could not be more than 150 characters - Beschreibung darf nicht mehr als 150 Zeichen umfassen"
    662673
     
    20342045msgid "ProSolution"
    20352046msgstr "ProSolution"
     2047
  • prosolution-wp-client/trunk/languages/prosolwpclient-es_ES.po

    r2357146 r2364772  
    44"Language: es_ES\n"
    55"Plural-Forms: nplurals=2; plural=n != 1;\n"
    6 "PO-Revision-Date: 2020-08-10 14:56+0700\n"
     6"PO-Revision-Date: 2020-08-19 17:11+0700\n"
    77"X-Generator: Poedit 2.2\n"
    88"Project-Id-Version: ProSolution WP Client\n"
     
    1313"Content-Type: text/plain; charset=UTF-8\n"
    1414"Content-Transfer-Encoding: 8bit\n"
     15
     16#: includes\class-setting.php:398
     17msgid "Name list"
     18msgstr "Lista de nombres"
     19
     20#: includes\class-setting.php:397
     21msgid "Order number"
     22msgstr "Número de pedido"
     23
     24#: includes\class-setting.php:395
     25msgid "Skillgroup sort by:"
     26msgstr "Clasificación del grupo de habilidades por:"
    1527
    1628#: public\templates\singlefieldset\prosolwpclientjobapplicationexpertiseinfo.php:51
  • prosolution-wp-client/trunk/languages/prosolwpclient.pot

    r2357146 r2364772  
    1212"Content-Type: text/plain; charset=ISO-8859-1\n"
    1313"Content-Transfer-Encoding: 8bit\n"
     14
     15#: includes\class-setting.php:398
     16msgid "Name list"
     17msgstr ""
     18
     19#: includes\class-setting.php:397
     20msgid "Order number"
     21msgstr ""
     22
     23#: includes\class-setting.php:395
     24msgid "Skillgroup sort by:"
     25msgstr ""
    1426
    1527#: public\templates\singlefieldset\prosolwpclientjobapplicationexpertiseinfo.php:51
  • prosolution-wp-client/trunk/prosolwpclient.php

    r2361008 r2364772  
    1717     * Plugin URI:        https://prosolution.com/produkte-und-services/workexpert.html
    1818     * Description:       WordPress client for ProSolution
    19      * Version:           1.5.17
     19     * Version:           1.5.18
    2020     * Author:            ProSolution
    2121     * Author URI:        https://www.prosolution.com
     
    3939
    4040    defined('PROSOLWPCLIENT_PLUGIN_NAME') or define('PROSOLWPCLIENT_PLUGIN_NAME', 'prosolwpclient');
    41     defined('PROSOLWPCLIENT_PLUGIN_VERSION') or define('PROSOLWPCLIENT_PLUGIN_VERSION', '1.5.17');
     41    defined('PROSOLWPCLIENT_PLUGIN_VERSION') or define('PROSOLWPCLIENT_PLUGIN_VERSION', '1.5.18');
    4242    defined('PROSOLWPCLIENT_BASE_NAME') or define('PROSOLWPCLIENT_BASE_NAME', plugin_basename(__FILE__));
    4343    defined('PROSOLWPCLIENT_ROOT_PATH') or define('PROSOLWPCLIENT_ROOT_PATH', plugin_dir_path(__FILE__));
  • prosolution-wp-client/trunk/public/templates/singlefieldset/prosolwpclientjobapplicationexpertiseinfo.php

    r2361008 r2364772  
    7272                global $wpdb;
    7373                $table_ps_skill_group = $wpdb->prefix . 'skillgroup';
    74                 $skill_group_arr = $wpdb->get_results( "SELECT * FROM $table_ps_skill_group ORDER BY skillgroup_orderno ASC, Name ASC");
     74                $order_by_skillgroup = '';
     75                if($step_label['expertise_skillgroup_sort'] == '1'){
     76                    $order_by_skillgroup = ' ORDER BY Name ASC';
     77                }           
     78                $skill_group_arr = $wpdb->get_results( "SELECT * FROM $table_ps_skill_group $order_by_skillgroup ");
    7579                foreach ($skill_group_arr as $value) {
    7680            ?>
Note: See TracChangeset for help on using the changeset viewer.