Plugin Directory

Changeset 3361909


Ignore:
Timestamp:
09/15/2025 03:43:17 PM (5 months ago)
Author:
suaudeau
Message:

V5.1

Location:
mon-laboratoire/trunk
Files:
8 added
4 deleted
23 edited

Legend:

Unmodified
Added
Removed
  • mon-laboratoire/trunk/Admin/Edit_Members/class-edit-members-advanced.php

    r3355231 r3361909  
    55use MonLabo\Admin\Import\Import_Main;
    66use MonLabo\Admin\Messages;
    7 use MonLabo\Admin\Forms_Processing\Forms_Processing_Advanced;
     7use MonLabo\Admin\Forms\Forms_Processing_Advanced;
    88use MonLabo\Frontend\Person_Or_Structure_View;
    99
     
    119119                return '';
    120120        }
    121         $retval = $this->_html_forms->begin_form( $form_id );
     121        $retval = $this->_forms_view->begin_form( $form_id );
    122122        //Establish list of export lines
    123123        $list_of_items = $this->_access_data->get_info_for_all( $type_of_items );
     
    126126        }
    127127        $nb = count( $list_of_items );
    128         $retval .= $this->_html_forms->end_form(
     128        $retval .= $this->_forms_view->end_form(
    129129            $form_id,
    130130            $button_text . ' (' . $nb . ')',
     
    146146    private function _items_without_page_form( string $form_id, string $type_of_items ) : string {
    147147        $button_text = __( 'Create missing pages', 'mon-laboratoire' );
    148         $retval = $this->_html_forms->begin_form( $form_id );
     148        $retval = $this->_forms_view->begin_form( $form_id );
    149149        //Establish list of members without page
    150150        $list_of_items = $this->_access_data->get_info_for_all( $type_of_items );
     
    173173            $retval .= '<ul><li>' . implode( '</li><li>', $links ) . '</li></ul>';
    174174        }
    175         $retval .= $this->_html_forms->silent_transmit_ids( $form_id, array_keys( $items_without_page ) );
     175        $retval .= $this->_forms_view->silent_transmit_ids( $form_id, array_keys( $items_without_page ) );
    176176        $nb = count( $items_without_page );
    177         $retval .= $this->_html_forms->end_form(
     177        $retval .= $this->_forms_view->end_form(
    178178            $form_id,
    179179            $button_text . ' (' . $nb . ')',
     
    195195    private function _items_without_translated_page_form( string $form_id, string $type_of_items ) : string {
    196196        $button_text = __( 'Create missing pages translations', 'mon-laboratoire' );
    197         $retval = $this->_html_forms->begin_form( $form_id );
     197        $retval = $this->_forms_view->begin_form( $form_id );
    198198        //Establish list of members without translated page
    199199        $list_of_items = $this->_access_data->get_info_for_all( $type_of_items );
     
    240240            $retval .= '<ul><li>' . implode( '</li><li>', $links ) . '</li></ul>';
    241241        }
    242         $retval .= $this->_html_forms->silent_transmit_ids( $form_id, $list_of_untranslated_pages_id );
     242        $retval .= $this->_forms_view->silent_transmit_ids( $form_id, $list_of_untranslated_pages_id );
    243243        $nb = count( $items_without_translated_page );
    244         $retval .= $this->_html_forms->end_form(
     244        $retval .= $this->_forms_view->end_form(
    245245            $form_id,
    246246            $button_text . ' (' . $nb . ')',
     
    262262    private function _items_with_invalid_page_form( string $form_id, string $type_of_items ) : string {
    263263        $button_text = __( 'Removes invalid page numbers', 'mon-laboratoire' );
    264         $retval = $this->_html_forms->begin_form( $form_id );
     264        $retval = $this->_forms_view->begin_form( $form_id );
    265265        //Establish list of members without page
    266266        $list_of_items = $this->_access_data->get_info_for_all( $type_of_items );
     
    293293            $retval .= '<ul><li>' . implode( '</li><li>', $links ) . '</li></ul>';
    294294        }
    295         $retval .= $this->_html_forms->silent_transmit_ids( $form_id, array_keys( $items_with_invalid_page ) );
     295        $retval .= $this->_forms_view->silent_transmit_ids( $form_id, array_keys( $items_with_invalid_page ) );
    296296        $nb = count( $items_with_invalid_page );
    297         $retval .= $this->_html_forms->end_form(
     297        $retval .= $this->_forms_view->end_form(
    298298                $form_id,
    299299                $button_text . ' (' . $nb . ')',
     
    313313     */
    314314    private function _alumni_with_no_draft_page_form( string $form_id ) : string {
    315         $retval = $this->_html_forms->begin_form( $form_id );
     315        $retval = $this->_forms_view->begin_form( $form_id );
    316316        //Establish list of alumni with published page
    317317        $list_of_alumni = $this->_access_data->get_info_for_all( 'alumni' );
     
    342342            $retval .= '<ul>' . $temp_retval . '</ul>';
    343343        }
    344         $retval .= $this->_html_forms->silent_transmit_ids( $form_id, array_keys( $page_list ) );
     344        $retval .= $this->_forms_view->silent_transmit_ids( $form_id, array_keys( $page_list ) );
    345345        $nb = count( $page_list );
    346         $retval .= $this->_html_forms->end_form(
     346        $retval .= $this->_forms_view->end_form(
    347347                $form_id,
    348348                __( 'Switch to draft alumni pages', 'mon-laboratoire' ) . ' (' . $nb . ')',
     
    364364    private function _items_with_bad_parent_page_form( string $form_id, string $type_of_items ) : string {
    365365        $button_text = __( 'Correct wrong parent pages', 'mon-laboratoire' );
    366         $retval = $this->_html_forms->begin_form( $form_id );
     366        $retval = $this->_forms_view->begin_form( $form_id );
    367367        //Establish list of members without page
    368368        $list_of_items = $this->_access_data->get_info_for_all( $type_of_items );
     
    388388            $retval .= '<ul>' . $temp_retval . '</ul>';
    389389        }
    390         $retval .= $this->_html_forms->silent_transmit_ids( $form_id, array_keys( $page_list ) );
    391         $retval .= $this->_html_forms->silent_transmit_text( $form_id, strval( $parent ) );
     390        $retval .= $this->_forms_view->silent_transmit_ids( $form_id, array_keys( $page_list ) );
     391        $retval .= $this->_forms_view->silent_transmit_text( $form_id, strval( $parent ) );
    392392        $nb = count( $page_list );
    393         $retval .= $this->_html_forms->end_form(
     393        $retval .= $this->_forms_view->end_form(
    394394                $form_id,
    395395                $button_text . ' (' . $nb . ')',
  • mon-laboratoire/trunk/Admin/Edit_Members/class-edit-members-generic.php

    r3355231 r3361909  
    55use MonLabo\Lib\Access_Data\{Access_Data};
    66use MonLabo\Frontend\{Html};
    7 use MonLabo\Admin\{Html_Forms, Messages};
     7use MonLabo\Admin\{Messages};
     8use MonLabo\Admin\Forms\{Forms_View};
    89use MonLabo\Lib\Person_Or_Structure\Person_Or_Structure;
    910
     
    3132     *
    3233     * @access protected
    33      * @var Html_Forms
    34      */
    35     protected $_html_forms;
     34     * @var Forms_View
     35     */
     36    protected $_forms_view;
    3637
    3738    /**
     
    5758     */
    5859    public function __construct() {
    59         $this->_html_forms = new Html_Forms();
     60        $this->_forms_view = new Forms_View();
    6061        $this->_access_data = new Access_Data();
    6162        $this->_html = new Html();
     
    7475        $nonce = wp_nonce_field( "edit_{$item_type}_form", "edit_{$item_type}_form_wpnonce", true, false );
    7576        if ( $creation_mode ) {
    76             return $nonce . $this->_html_forms->submit_button(
     77            return $nonce . $this->_forms_view->submit_button(
    7778                __( 'Create', 'mon-laboratoire' ),
    7879                "submit_new_{$item_type}",
     
    8182            );
    8283        }
    83         $retval = $nonce . $this->_html_forms->submit_button(
     84        $retval = $nonce . $this->_forms_view->submit_button(
    8485            __( 'Modify', 'mon-laboratoire' ),
    8586            "submit_edit_{$item_type}",
     
    8889            'warning'
    8990        );
    90         return $retval . ' ' . $this->_html_forms->submit_button(
     91        return $retval . ' ' . $this->_forms_view->submit_button(
    9192            __( 'Delete', 'mon-laboratoire' ),
    9293            "submit_delete_{$item_type}",
     
    119120            case 'informations':
    120121                $retval .= '<fieldset>' . $this->_get_fieldset_legend( $fieldset_type );
    121                 $retval .= $this->_html_forms->hidden_field( 'submit_id', $item_object->info->id );
    122                 $retval .= $this->_html_forms->hidden_field( 'action', '', 'action' );
     122                $retval .= $this->_forms_view->hidden_field( 'submit_id', $item_object->info->id );
     123                $retval .= $this->_forms_view->hidden_field( 'action', '', 'action' );
    123124
    124125                if ( ! $item_object->is_empty() ) {
    125126                    $retval .= 'Id : ' . $item_object->info->id . '<br />';
    126127                }
    127                 $retval .= $this->_html_forms->field( 'name_fr', true, __( 'Name in French', 'mon-laboratoire' ), $comment->get( 'name_fr' ),
     128                $retval .= $this->_forms_view->field( 'name_fr', true, __( 'Name in French', 'mon-laboratoire' ), $comment->get( 'name_fr' ),
    128129                    $item_object->info->name_fr );
    129                 $retval .= $this->_html_forms->field( 'name_en', true, __( 'Name in English', 'mon-laboratoire' ), $comment->get( 'name_en' ),
     130                $retval .= $this->_forms_view->field( 'name_en', true, __( 'Name in English', 'mon-laboratoire' ), $comment->get( 'name_en' ),
    130131                    $item_object->info->name_en );
    131132                break;
     
    136137                $retval .= $messages->warning_if_necessary_unconfigured_parent( $item_type );
    137138                $retval .= '<fieldset class="">' . $this->_get_fieldset_legend( $fieldset_type );
    138                 $retval .= $this->_html_forms->field( $fieldname, false, __( 'Page ID or ext. URL.', 'mon-laboratoire' ),
     139                $retval .= $this->_forms_view->field( $fieldname, false, __( 'Page ID or ext. URL.', 'mon-laboratoire' ),
    139140                    $comment->get( 'wp_post_ids' ), $item_object->info->wp_post_ids );
    140141                break;
     
    142143            case 'apparence':
    143144                $retval .= '<fieldset class="clear">' . $this->_get_fieldset_legend( $fieldset_type );
    144                 $retval .= $this->_html_forms->field( 'logo', false, __( 'Logo', 'mon-laboratoire' ),
     145                $retval .= $this->_forms_view->field( 'logo', false, __( 'Logo', 'mon-laboratoire' ),
    145146                    $comment->get( 'logo' ), $item_object->info->logo );
    146147                break;
     
    154155                        $field = 'hal_publi_' . $field1 . '_id';
    155156                        $placeholder = ( 'person' === $item_type ) ? __( 'IdHAL', 'mon-laboratoire' ) : __( 'struct. Id', 'mon-laboratoire' );
    156                         $retval .= $this->_html_forms->field( $field, false,  $placeholder, $comment->get( $field ), $item_object->info->{$field} );
     157                        $retval .= $this->_forms_view->field( $field, false,  $placeholder, $comment->get( $field ), $item_object->info->{$field} );
    157158                    }
    158159                    if ( in_array( $options->publication_server_type, ['DescartesPubli', 'both'], true ) ) {
    159160                        $field = 'descartes_publi_' . $field1 . '_id';
    160                         $retval .= $this->_html_forms->field( $field, false, __( 'Descartes Publi Id', 'mon-laboratoire' ),
     161                        $retval .= $this->_forms_view->field( $field, false, __( 'Descartes Publi Id', 'mon-laboratoire' ),
    161162                            $comment->get( $field ), $item_object->info->{$field} );
    162163                    }
     
    221222        );
    222223        $retval .= '<fieldset>' . $this->_get_fieldset_legend( 'selection' );
    223         $retval .= $this->_html_forms->select( 'item', $select_values, true, $legend, '', strval( $initial_value ), $onchange );
     224        $retval .= $this->_forms_view->select( 'item', $select_values, true, $legend, '', strval( $initial_value ), $onchange );
    224225        $retval .= '</fieldset></div></form><hr />';
    225226        $retval .= sprintf(
  • mon-laboratoire/trunk/Admin/Edit_Members/class-edit-members.php

    r3355231 r3361909  
    44use MonLabo\Lib\{App, Translate, Options};
    55use MonLabo\Lib\Person_Or_Structure\{Person, Team, Unit, Thematic};
    6 use MonLabo\Admin\Forms_Processing\{Forms_Processing};
     6use MonLabo\Admin\Forms\{Forms_Processing};
    77use MonLabo\Frontend\Person_Or_Structure_View;
    88
     
    6969        // Identity section
    7070        $retval .= '<fieldset class="clear">' . $this->_get_fieldset_legend( 'identity' );
    71         $retval .= $this->_html_forms->hidden_field( 'submit_id', $member->info->id );
    72         $retval .= $this->_html_forms->hidden_field( 'action', '', 'action' );
     71        $retval .= $this->_forms_view->hidden_field( 'submit_id', $member->info->id );
     72        $retval .= $this->_forms_view->hidden_field( 'action', '', 'action' );
    7373
    7474        if ( ! $member->is_empty() ) {
     
    8080        $tiles_array['disabled'] = '--------';
    8181        $tiles_array['edit'] = __( 'Edit / New', 'mon-laboratoire' );
    82         $retval .= $this->_html_forms->select(
     82        $retval .= $this->_forms_view->select(
    8383            'title',
    8484            $tiles_array,
     
    9191
    9292        // Basic information fields
    93         $retval .= $this->_html_forms->field( 'first_name', true, _x( 'First name', 'personne', 'mon-laboratoire' ), $comment->get( 'first_name' ),
     93        $retval .= $this->_forms_view->field( 'first_name', true, _x( 'First name', 'personne', 'mon-laboratoire' ), $comment->get( 'first_name' ),
    9494            $member->info->first_name );
    95         $retval .= $this->_html_forms->field( 'last_name', true, _x( 'Name', 'personne', 'mon-laboratoire' ), $comment->get( 'last_name' ),
     95        $retval .= $this->_forms_view->field( 'last_name', true, _x( 'Name', 'personne', 'mon-laboratoire' ), $comment->get( 'last_name' ),
    9696            $member->info->last_name );
    97         $retval .= $this->_html_forms->field( 'image', false, __( 'Personal photo', 'mon-laboratoire' ), $comment->get( 'image' ), $member->info->image );
     97        $retval .= $this->_forms_view->field( 'image', false, __( 'Personal photo', 'mon-laboratoire' ), $comment->get( 'image' ), $member->info->image );
    9898
    9999        // Title edit field
    100100        $retval .= '<br /><div id="edit-person-title-field">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
    101         $retval .= $this->_html_forms->field( 'title_edit', false,
     101        $retval .= $this->_forms_view->field( 'title_edit', false,
    102102            _x( 'Title', 'personne', 'mon-laboratoire' ), $comment->get( 'title_edit' ),
    103103            $member->info->title
     
    150150                $initial_text_director = array( '0' => $text_director );
    151151            }
    152             $retval .= $this->_html_forms->checkboxes( 'is_director', array( 0 => $text_director ), true, __( 'Direction?', 'mon-laboratoire' ), '', $initial_text_director );
     152            $retval .= $this->_forms_view->checkboxes( 'is_director', array( 0 => $text_director ), true, __( 'Direction?', 'mon-laboratoire' ), '', $initial_text_director );
    153153        }
    154154
     
    156156        $retval .= '<br />';
    157157        $member->info->category = mb_strtolower( $member->info->category, 'UTF-8' ); //On converti la catégorie en minuscule ( pour une compatibilité avec les anciennes versions de MonLabo )
    158         $retval .= $this->_html_forms->select( 'category', App::PERSONS_CATEGORIES, true, _x( 'Category and function', 'personne', 'mon-laboratoire' ), $comment->get( 'category' ),
     158        $retval .= $this->_forms_view->select( 'category', App::PERSONS_CATEGORIES, true, _x( 'Category and function', 'personne', 'mon-laboratoire' ), $comment->get( 'category' ),
    159159                                                    $member->info->category );
    160         $retval .= $this->_html_forms->select(
     160        $retval .= $this->_forms_view->select(
    161161                        'fonction',
    162162                        $this->_access_data->get_multilingual_functions_by_category(),
     
    174174        $all_teams_name = $this->_access_data->get_teams_name( 'fr' );
    175175        $teams_name = $member->is_empty() ? array() : $this->_access_data->get_teams_name_for_a_person( $member->info->id, 'fr' );
    176         $retval .= $this->_html_forms->checkboxes( 'teams', $all_teams_name, true, __( 'Teams', 'mon-laboratoire' ), $comment->get( 'teams' ),
     176        $retval .= $this->_forms_view->checkboxes( 'teams', $all_teams_name, true, __( 'Teams', 'mon-laboratoire' ), $comment->get( 'teams' ),
    177177        $teams_name );
    178178
     
    188188        }
    189189        $retval .= '<div id="' . $id_mentors_field . '">';
    190         $retval .= $this->_html_forms->select_multiple(
     190        $retval .= $this->_forms_view->select_multiple(
    191191            'mentors',
    192192            array( 'Actifs' => $members_name_actif , 'Alumni' => $members_name_alumni ),
     
    213213        }
    214214        $retval .= '<div id="' . $id_students_field . '">';
    215         $retval .= $this->_html_forms->select_multiple(
     215        $retval .= $this->_forms_view->select_multiple(
    216216            'students',
    217217            array( 'Actifs' => $members_name_actif , 'Alumni' => $members_name_alumni ),
     
    236236        $comment = new Edit_Members_Comment( 'person' );
    237237        $retval = '<fieldset>' . $this->_get_fieldset_legend( 'coordinates_p' );
    238         $retval .= $this->_html_forms->field( 'mail', false, __( 'E-mail(s)', 'mon-laboratoire' ), $comment->get( 'mail' ),
     238        $retval .= $this->_forms_view->field( 'mail', false, __( 'E-mail(s)', 'mon-laboratoire' ), $comment->get( 'mail' ),
    239239            $member->info->mail );
    240         $retval .= $this->_html_forms->field( 'room', false, __( 'Door', 'mon-laboratoire' ), $comment->get( 'room' ),
     240        $retval .= $this->_forms_view->field( 'room', false, __( 'Door', 'mon-laboratoire' ), $comment->get( 'room' ),
    241241            $member->info->room );
    242         $retval .= $this->_html_forms->field( 'external_url', false, __( 'Personal external website', 'mon-laboratoire' ) , $comment->get( 'external_url' ),
     242        $retval .= $this->_forms_view->field( 'external_url', false, __( 'Personal external website', 'mon-laboratoire' ) , $comment->get( 'external_url' ),
    243243            $member->info->external_url );
    244         $retval .= $this->_html_forms->field( 'phone', false, __( 'Phone extension number', 'mon-laboratoire' ), $comment->get( 'phone' ),
     244        $retval .= $this->_forms_view->field( 'phone', false, __( 'Phone extension number', 'mon-laboratoire' ), $comment->get( 'phone' ),
    245245            $member->info->phone );
    246246        $retval .= '<br />';
    247         $retval .= $this->_html_forms->field( 'address_alt', false, __( 'Alternative address', 'mon-laboratoire' ), $comment->get( 'address_alt' ),
     247        $retval .= $this->_forms_view->field( 'address_alt', false, __( 'Alternative address', 'mon-laboratoire' ), $comment->get( 'address_alt' ),
    248248            $member->info->address_alt );
    249249        $retval .= '</fieldset>';
     
    261261        $comment = new Edit_Members_Comment( 'person' );
    262262        $retval = '<fieldset>' . $this->_get_fieldset_legend( 'situation_p' );
    263         $retval .= $this->_html_forms->select( 'status', array( 'actif'=>__( 'active', 'mon-laboratoire' ), 'alumni'=>__( 'former member', 'mon-laboratoire' ) ), true, _x( 'Status', 'personne', 'mon-laboratoire' ),
     263        $retval .= $this->_forms_view->select( 'status', array( 'actif'=>__( 'active', 'mon-laboratoire' ), 'alumni'=>__( 'former member', 'mon-laboratoire' ) ), true, _x( 'Status', 'personne', 'mon-laboratoire' ),
    264264            $comment->get( 'status' ), $member->info->status );
    265265
    266266        $retval .= "<div id='MonLabo-date-departure-form'>"
    267                     . $this->_html_forms->field( 'date_departure', false, __( 'Departure date from the unit', 'mon-laboratoire' ),
     267                    . $this->_forms_view->field( 'date_departure', false, __( 'Departure date from the unit', 'mon-laboratoire' ),
    268268                                                $comment->get( 'date_departure' ), $member->info->date_departure )
    269                     . $this->_html_forms->select( 'pages_to_draft', array( 'oui'=>__( 'yes', 'mon-laboratoire' ), 'non'=>__( 'no', 'mon-laboratoire' ) ),
     269                    . $this->_forms_view->select( 'pages_to_draft', array( 'oui'=>__( 'yes', 'mon-laboratoire' ), 'non'=>__( 'no', 'mon-laboratoire' ) ),
    270270                                                true, __( 'Convert pages to draft?', 'mon-laboratoire' ), '', 'non' )
    271271                    . '</div>';
    272         $retval .= $this->_html_forms->select( 'visible', array( 'oui'=>__( 'yes', 'mon-laboratoire' ), 'non'=>__( 'no', 'mon-laboratoire' ) ), true, __( 'Visible person?', 'mon-laboratoire' ),
     272        $retval .= $this->_forms_view->select( 'visible', array( 'oui'=>__( 'yes', 'mon-laboratoire' ), 'non'=>__( 'no', 'mon-laboratoire' ) ), true, __( 'Visible person?', 'mon-laboratoire' ),
    273273            $comment->get( 'visible' ), $member->info->visible );
    274274
     
    297297        for ( $i=1; $i <= $nb_fields; $i++ ) {
    298298            $nom_variable = 'custom' . $i;
    299             $retval .= $this->_html_forms->field( $nom_variable, false, $nom_variable,
     299            $retval .= $this->_forms_view->field( $nom_variable, false, $nom_variable,
    300300                                        'custom_' . $options3['MonLabo_custom_field' . $i . '_title'], $member->info->{$nom_variable} );
    301301        }
     
    338338        // Appearance with color field
    339339        $appearance_end = '<div class="input-group"><label for="">' . __( 'Color', 'mon-laboratoire' ) . ' : </label>';
    340         $appearance_end .= $this->_html_forms->field( 'color', false, __( 'Color', 'mon-laboratoire' ), $comment->get( 'color' ), $team->info->color );
     340        $appearance_end .= $this->_forms_view->field( 'color', false, __( 'Color', 'mon-laboratoire' ), $comment->get( 'color' ), $team->info->color );
    341341        $appearance_end .= '</div>';
    342342        $retval .= $this->_generate_generic_fieldset( 'apparence', 'team', $team, $appearance_end );
     
    357357            $id_unit_initval = App::MAIN_STRUCT_NO_UNIT;
    358358        }
    359         $retval .= $this->_html_forms->radio_buttons( 'id_unit', $units_name, true, __( 'Structure', 'mon-laboratoire' ), $comment->get( 'id_unit' ), $units_name[ $id_unit_initval ] );
     359        $retval .= $this->_forms_view->radio_buttons( 'id_unit', $units_name, true, __( 'Structure', 'mon-laboratoire' ), $comment->get( 'id_unit' ), $units_name[ $id_unit_initval ] );
    360360        if ( $options->uses['thematics'] ) {
    361361            $all_thematics_name = $this->_access_data->get_thematics_name( 'fr' );
    362362            $thematics_id = $this->_access_data->get_thematics_id_for_a_team( $team->info->id );
    363363            $translate = new Translate();
    364             $retval .= $this->_html_forms->select_multiple( 'thematics', $all_thematics_name, false,  $translate->tr__( 'Thematics' ),
     364            $retval .= $this->_forms_view->select_multiple( 'thematics', $all_thematics_name, false,  $translate->tr__( 'Thematics' ),
    365365                $comment->get( 'thematics' ), $thematics_id );
    366366        }
     
    389389            //$alumni_id = $this->_access_data->get_persons_id_for_a_team( $team->info->id, 'alumni' );
    390390        }
    391         $retval .= $this->_html_forms->select_multiple( 'persons', $all_persons_struct, false, __( 'Persons', 'mon-laboratoire' ), $comment->get( 'members' ), $persons_id );
    392         $retval .= $this->_html_forms->select_multiple( 'leaders', $members_struct, false, __( 'Team leaders', 'mon-laboratoire' ), $comment->get( 'leaders' ), $leaders_id );
    393         //$retval .= $this->_html_forms->select_multiple( 'alumni', $all_persons_struct, false, __( 'Alumni', 'mon-laboratoire' ), $comment->get( 'alumni' ), $alumni_id );
     391        $retval .= $this->_forms_view->select_multiple( 'persons', $all_persons_struct, false, __( 'Persons', 'mon-laboratoire' ), $comment->get( 'members' ), $persons_id );
     392        $retval .= $this->_forms_view->select_multiple( 'leaders', $members_struct, false, __( 'Team leaders', 'mon-laboratoire' ), $comment->get( 'leaders' ), $leaders_id );
     393        //$retval .= $this->_forms_view->select_multiple( 'alumni', $all_persons_struct, false, __( 'Alumni', 'mon-laboratoire' ), $comment->get( 'alumni' ), $alumni_id );
    394394        $retval .= '</fieldset>';
    395395
     
    463463
    464464        // Information section with additional fields
    465         $end_of_fieldset = '<br />' . $this->_html_forms->field( 'affiliations', true, 'Affiliations',
     465        $end_of_fieldset = '<br />' . $this->_forms_view->field( 'affiliations', true, 'Affiliations',
    466466            $comment->get( 'affiliations' ), $unit->info->affiliations );
    467         $end_of_fieldset .= $this->_html_forms->field( 'code', false, _x( 'Code', 'unité', 'mon-laboratoire' ), $comment->get( 'code' ), $unit->info->code );
     467        $end_of_fieldset .= $this->_forms_view->field( 'code', false, _x( 'Code', 'unité', 'mon-laboratoire' ), $comment->get( 'code' ), $unit->info->code );
    468468        $end_of_fieldset .= '<br />';
    469469        $members_name_actif = $item_view->persons_names( $this->_access_data->get_persons_info( 'actif' ), 'simple_text' );
    470470        $members_name_alumni = $item_view->persons_names( $this->_access_data->get_persons_info( 'alumni' ), 'simple_text' );
    471         $end_of_fieldset .= $this->_html_forms->select_multiple(
     471        $end_of_fieldset .= $this->_forms_view->select_multiple(
    472472            'directors',
    473473            array( 'Actifs' => $members_name_actif , 'Alumni' => $members_name_alumni ),
     
    486486        // Alternate coordinates
    487487        $retval .= '<fieldset>' . $this->_get_fieldset_legend( 'alt_coord' );
    488         $retval .= $this->_html_forms->field( 'address_alt', false, __( 'Alternative address', 'mon-laboratoire' ), $comment->get( 'address_alt' ),
     488        $retval .= $this->_forms_view->field( 'address_alt', false, __( 'Alternative address', 'mon-laboratoire' ), $comment->get( 'address_alt' ),
    489489            $unit->info->address_alt );
    490         $retval .= $this->_html_forms->field( 'contact_alt', false, __( 'Alternate contact', 'mon-laboratoire' ), $comment->get( 'contact_alt' ),
     490        $retval .= $this->_forms_view->field( 'contact_alt', false, __( 'Alternate contact', 'mon-laboratoire' ), $comment->get( 'contact_alt' ),
    491491            $unit->info->contact_alt );
    492492        $retval .= '</fieldset>';
     
    535535        if ( 'hal' === $options->publication_server_type ) {
    536536            $retval .= '<fieldset>' . $this->_get_fieldset_legend( 'publications' );
    537             $retval .= '<br />' . $this->_html_forms->field( 'hal_publi_struct_id', false, __( 'struct. Id', 'mon-laboratoire' ),
     537            $retval .= '<br />' . $this->_forms_view->field( 'hal_publi_struct_id', false, __( 'struct. Id', 'mon-laboratoire' ),
    538538                $comment->get( 'hal_publi_struct_id' ), $options1['MonLabo_hal_publi_struct_id'] );
    539539            $retval .= '</fieldset>';
     
    547547        $values = array( 'Actifs' => $members_name_actif , 'Alumni' => $members_name_alumni );
    548548        $directors_id = $this->_access_data->get_directors_id_for_an_unit( App::MAIN_STRUCT_NO_UNIT, 'all' );
    549         $retval .= $this->_html_forms->select_multiple( 'directors', $values, false, __( 'Directors', 'mon-laboratoire' ),
     549        $retval .= $this->_forms_view->select_multiple( 'directors', $values, false, __( 'Directors', 'mon-laboratoire' ),
    550550            $comment->get( 'directors' ), $directors_id );
    551551        $retval .= '</fieldset>';
     
    555555
    556556        // Validation
    557         $retval .= $this->_html_forms->submit_button( __( 'Modify', 'mon-laboratoire' ), 'submit_edit_mainstruct', '', 'edit', 'warning' );
     557        $retval .= $this->_forms_view->submit_button( __( 'Modify', 'mon-laboratoire' ), 'submit_edit_mainstruct', '', 'edit', 'warning' );
    558558        $retval .= '</div></form>';
    559559
     
    584584            }
    585585            $required = $config['required'] ?? false;
    586             $retval .= $this->_html_forms->field( $field, $required, $config['label'], $comment->get( $field ), $options1["MonLabo_{$field}"] );
     586            $retval .= $this->_forms_view->field( $field, $required, $config['label'], $comment->get( $field ), $options1["MonLabo_{$field}"] );
    587587        }
    588588        return $retval . '</fieldset>';
     
    599599        $comment = new Edit_Members_Comment( 'person' );
    600600        return '<div id="edit-functions-fields">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' .
    601             $this->_html_forms->field(
     601            $this->_forms_view->field(
    602602                'function_en',
    603603                true,
     
    606606                $member->info->function_en
    607607            ) .
    608             $this->_html_forms->field(
     608            $this->_forms_view->field(
    609609                'function_fr',
    610610                true,
     
    637637            $type,
    638638            __( '+ External persons', 'mon-laboratoire' ),
    639             $this->_html_forms->field( $property, false, $text, $comment->get( $property ), $member->info->{$property}, $css_id )
     639            $this->_forms_view->field( $property, false, $text, $comment->get( $property ), $member->info->{$property}, $css_id )
    640640        );
    641641    }
  • mon-laboratoire/trunk/Admin/Import/class-import-main.php

    r3355231 r3361909  
    44use MonLabo\Frontend\Html;
    55use MonLabo\Lib\Options;
    6 use MonLabo\Admin\{Html_Forms,Csv};
    7 use MonLabo\Admin\Forms_Processing\Forms_Processing_Generic;
     6use MonLabo\Admin\{Csv};
     7use MonLabo\Admin\Forms\Forms_Processing_Generic;
     8use MonLabo\Admin\Forms\{Forms_View};
    89
    910defined( 'ABSPATH' ) or die( 'No direct script access allowed' );
     
    5556     */
    5657    private function _input_one_file( string $form_name, string $label, string $description ): string {
    57         $html_forms = new Html_Forms();
     58        $forms_view = new Forms_View();
    5859        $retval  = '<div class="input-group">';
    5960        $retval .= '<label for="' . esc_attr( $form_name ) . '">' . $label . '</label>';
    6061        $retval .= '<input type="file" name="submit_' . esc_attr( $form_name ) . '" id="' . esc_attr( $form_name ) . '" accept=".csv">';
    61         $retval .= $html_forms->description( $description );
     62        $retval .= $forms_view->description( $description );
    6263        $retval .= '</div>';
    6364   
     
    7576     */
    7677    public function render_main_form(): string {
    77         $html_forms = new Html_Forms();
     78        $forms_view = new Forms_View();
    7879        $html = new Html();
    7980
     
    8485        }
    8586
    86         $retval  = $html_forms->begin_form( 'import_cvs_files' );
     87        $retval  = $forms_view->begin_form( 'import_cvs_files' );
    8788
    8889        // Persons import section.
     
    128129        );
    129130
    130         $retval .= '<br />' . $html_forms->end_form(
     131        $retval .= '<br />' . $forms_view->end_form(
    131132            'import_cvs_files',
    132133            __( 'Import persons, teams or teams members table from CVS files', 'mon-laboratoire' ),
  • mon-laboratoire/trunk/Admin/Import/class-import.php

    r3355231 r3361909  
    44use MonLabo\Lib\Access_Data\{Access_Data};
    55use MonLabo\Frontend\{Html, Person_Or_Structure_View};
    6 use MonLabo\Admin\{Html_Forms,Messages};
     6use MonLabo\Admin\{Messages};
     7use MonLabo\Admin\Forms\{Forms_View};
    78use MonLabo\Lib\Person_Or_Structure\{Person, Team, Person_Or_Structure};
    89
     
    128129     */
    129130    private function _retrieve_action_list() {
    130         $html_forms = new Html_Forms();
    131         $html_forms->get_silent_transmited_ids(
     131        $forms_view = new Forms_View();
     132        $forms_view->get_silent_transmited_ids(
    132133            'persons_to_delete_submit_ids',
    133134            $this->_action_list['person']['id_to_delete']
    134135        );
    135         $html_forms->get_silent_transmited_array_of_struct(
     136        $forms_view->get_silent_transmited_array_of_struct(
    136137            'persons_to_modify_submit',
    137138            $this->_action_list['person']['item_to_modify']
    138139        );
    139         $html_forms->get_silent_transmited_array_of_struct(
     140        $forms_view->get_silent_transmited_array_of_struct(
    140141            'persons_to_create_submit',
    141142            $this->_action_list['person']['item_to_create']
    142143        );
    143         $html_forms->get_silent_transmited_ids(
     144        $forms_view->get_silent_transmited_ids(
    144145            'teams_to_delete_submit_ids',
    145146            $this->_action_list['team']['id_to_delete']
    146147        );
    147         $html_forms->get_silent_transmited_array_of_struct(
     148        $forms_view->get_silent_transmited_array_of_struct(
    148149            'teams_to_modify_submit',
    149150            $this->_action_list['team']['item_to_modify']
    150151        );
    151         $html_forms->get_silent_transmited_array_of_struct(
     152        $forms_view->get_silent_transmited_array_of_struct(
    152153            'teams_to_create_submit',
    153154            $this->_action_list['team']['item_to_create']
    154155        );
    155         $html_forms->get_silent_transmited_array_of_struct(
     156        $forms_view->get_silent_transmited_array_of_struct(
    156157            'teams_members_submit',
    157158            $this->_action_list['teams_members']['item_to_create']
     
    403404            }
    404405            $message_txt .= '</ul>';
    405             $html_forms = new Html_Forms();
    406             $message_txt .= $html_forms->begin_form( 'confirm_post_import' );
    407             $message_txt .= $html_forms->silent_transmit_ids( 'new_persons_ids', $new_persons_ids );
    408             $message_txt .= $html_forms->silent_transmit_ids( 'new_teams_ids', $new_teams_ids );
    409             $message_txt .= $html_forms->submit_button(
     406            $forms_view = new Forms_View();
     407            $message_txt .= $forms_view->begin_form( 'confirm_post_import' );
     408            $message_txt .= $forms_view->silent_transmit_ids( 'new_persons_ids', $new_persons_ids );
     409            $message_txt .= $forms_view->silent_transmit_ids( 'new_teams_ids', $new_teams_ids );
     410            $message_txt .= $forms_view->submit_button(
    410411                __( 'Cancel', 'mon-laboratoire' ),
    411412                'MonLaboHideDivButton',
     
    414415                'secondary'
    415416            );
    416             $message_txt .= ' ' . $html_forms->end_form(
     417            $message_txt .= ' ' . $forms_view->end_form(
    417418                'confirm_post_import',
    418419                __( 'Create missing pages for new items', 'mon-laboratoire' ) . ' (' . strval( $creation_count ) . ')',
  • mon-laboratoire/trunk/Admin/Import/class-post-import.php

    r3355231 r3361909  
    11<?php
    22namespace MonLabo\Admin\Import;
    3 use MonLabo\Admin\Html_Forms;
    4 use MonLabo\Admin\Forms_Processing\Forms_Processing_Advanced;
     3use MonLabo\Admin\Forms\{Forms_View};
     4use MonLabo\Admin\Forms\Forms_Processing_Advanced;
    55
    66defined( 'ABSPATH' ) or die( 'No direct script access allowed' );
     
    3333    public function processing() : string {
    3434        $retval = '';
    35         $html_forms = new Html_Forms();
     35        $forms_view = new Forms_View();
    3636       
    3737        // Retrieve list of new persons and teams.
    3838        $new_persons_ids = array();
    3939        $new_teams_ids = array();
    40         $html_forms->get_silent_transmited_ids( 'new_persons_ids_submit_ids', $new_persons_ids );
    41         $html_forms->get_silent_transmited_ids( 'new_teams_ids_submit_ids', $new_teams_ids );
     40        $forms_view->get_silent_transmited_ids( 'new_persons_ids_submit_ids', $new_persons_ids );
     41        $forms_view->get_silent_transmited_ids( 'new_teams_ids_submit_ids', $new_teams_ids );
    4242
    4343        // Process page creation.
  • mon-laboratoire/trunk/Admin/Import/class-pre-import.php

    r3355231 r3361909  
    44use MonLabo\Lib\Access_Data\Access_Data;
    55use MonLabo\Frontend\{Html, Person_Or_Structure_View};
    6 use MonLabo\Admin\{Html_Forms, Messages};
     6use MonLabo\Admin\{Messages};
     7use MonLabo\Admin\Forms\{Forms_View};
    78
    89defined( 'ABSPATH' ) or die( 'No direct script access allowed' );
     
    500501            return $retval;
    501502        }
    502         $htmlForms = new Html_Forms();
     503        $htmlForms = new Forms_View();
    503504        $this->_fill_action_list( 'person' );
    504505        $this->_fill_action_list( 'team' );
     
    570571     */
    571572    private function _silent_transmit_action_list() : string {
    572         $htmlForms = new Html_Forms();
     573        $htmlForms = new Forms_View();
    573574        $retval = '';
    574575        $retval .= $htmlForms->silent_transmit_ids(
  • mon-laboratoire/trunk/Admin/class-admin-init-pages.php

    r3355231 r3361909  
    359359        $privacy = Privacy::getInstance();
    360360        $page = Admin_Page::init( 'MonLaboPagePrivacy', 'MonLabo_settings_group11' );
    361         $page->add_simple_html( '<p>' . __( 'This page is managing data privacy of persons. Please fill carrefully these fields to comply with the GDPR and individuals\' consent to dissemination.', 'mon-laboratoire' ) . '</p>' );
     361        $page->add_simple_html( '<p>' . __( 'This page is managing data privacy of persons. Please fill carrefully these fields to comply with the GDPR, individuals\' consent to dissemination and phishing precautions.', 'mon-laboratoire' ) . '</p>' );
     362
     363        $page->add_section(
     364            'MonLabo_pluginPage_section_data_privacy_common',
     365            $this->_html->dashicon( 'admin-generic' ) . __( 'Trusted visitors who can view all personal data', 'mon-laboratoire' )
     366        );
     367        $page->add_simple_html( '<p>' . __( 'Define here the trusted visitors who will be able to view personal data (for example, from your institution\'s IP addresses).', 'mon-laboratoire' ) . '</p>' );
     368        $page->add_section( 'MonLabo_pluginPage_section_data_privacy_common2', '' );
     369        $page->add_field( 'radio',   'MonLabo_trusted_visitors', __( 'Trusted visitors', 'mon-laboratoire' ), ' ' );
     370        $page->show_fields( $privacy->is_display_trusted_IP_form() );
     371        $page->add_field(
     372            'text_field',   
     373            'MonLabo_confidence_IPs',
     374            __( 'Ranges of trusted IP addresses', 'mon-laboratoire' ),
     375            __( 'Can be empty. Ex: 192.168.0.0/16,172.20.50.0/24 (Each range is defined by IP address/subnet mask. For several network ranges, separate them with commas.)', 'mon-laboratoire' )
     376        );
     377        $page->show_fields( true );
    362378
    363379        $page->add_simple_html( '<fieldset id="group" class="MonLabo-fieldset">' );
    364380        $page->add_section(
    365381            'MonLabo_pluginPage_section_data_privacy_email',
    366             $this->_html->dashicon( 'email' ) . __( 'Person\'s emails', 'mon-laboratoire' )
    367         );
    368         $page->add_field(
    369             'checkbox2',
    370             'MonLabo_hide_persons_email',
    371              __( 'Filter emails', 'mon-laboratoire' ),
    372             __( 'Check this box to hide emails on the website.', 'mon-laboratoire' )
    373         );
     382            $this->_html->dashicon( 'admin-users' ) . __( 'Personal data', 'mon-laboratoire' )
     383        );
     384
    374385        $page->enable_fields( true );
    375         $page->show_fields( $privacy->is_filter_email() );
    376         $page->add_field( 'radio',   'MonLabo_email_privacy', '', ' ' );
    377         $page->show_fields( $privacy->is_email_replaced_by_form() );
     386        $page->add_field( 'radio',   'MonLabo_email_privacy', $this->_html->dashicon( 'email' ) . __( 'Email', 'mon-laboratoire' ), ' ' );
     387        $page->show_fields( $privacy->is_display_email_test() );
    378388        $page->add_field( 'email_field', 'MonLabo_data_privacy_test_email', __( 'Test destination email', 'mon-laboratoire' ) );
    379389        $page->add_field( 'button_test_send_email', 'MonLabo_do_test_email', '', '' );
    380390        $page->show_fields( true );
    381         $page->add_simple_html( '</fieldset>' );
    382         //$page->add_section( 'MonLabo_pluginPage_section_data_privacy2', __( 'Data privacy of persons', 'mon-laboratoire' ));
     391        $page->add_field( 'radio',   'MonLabo_room_privacy',   $this->_html->dashicon( 'location' ) . __( 'Room or office', 'mon-laboratoire' ), ' ' );
    383392   
    384         $page->add_simple_html( '<fieldset id="group" class="MonLabo-fieldset">' );
    385         $page->add_section(
    386             'MonLabo_pluginPage_section_data_privacy_room',
    387             $this->_html->dashicon( 'admin-home' ) . __( 'Person\'s rooms or offices', 'mon-laboratoire' )
    388         );
    389         $page->add_field(
    390             'checkbox2',
    391             'MonLabo_hide_persons_room',
    392             __( 'Filter rooms', 'mon-laboratoire' ),
    393             __( 'Check this box to hide rooms on the website.', 'mon-laboratoire' )
    394         );
    395         $page->show_fields( $privacy->is_filter_room() );
    396         $page->add_field( 'radio',   'MonLabo_room_privacy',  '', ' ' );
    397         $page->show_fields( true );
    398         $page->add_simple_html( '</fieldset>' );
    399 
    400         $page->add_simple_html( '<fieldset id="group" class="MonLabo-fieldset">' );
    401         $page->add_section(
    402             'MonLabo_pluginPage_section_data_privacy_phone',
    403             $this->_html->dashicon( 'phone' ) . __( 'Person\'s phones', 'mon-laboratoire' )
    404         );
    405         $page->add_field(
    406             'checkbox2',
    407             'MonLabo_hide_persons_phone',
    408             __( 'Filter phones', 'mon-laboratoire' ),
    409             __( 'Check this box to hide phones on the website.', 'mon-laboratoire' )
    410         );
    411         $page->show_fields( $privacy->is_filter_phone() );
    412         $page->add_field( 'radio',   'MonLabo_phone_privacy',  '', ' ' );
     393        $page->add_section( 'MonLabo_pluginPage_section_data_privacy2','&nbsp;');
     394
     395        $page->add_field( 'radio',   'MonLabo_phone_privacy',  $this->_html->dashicon( 'phone' ) . __( 'Phone', 'mon-laboratoire' ), ' ' );
    413396        $page->show_fields( $privacy->is_display_switchboard_fields() );
    414397        $page->add_field( 'text_field', 'MonLabo_switchboard_number', __( 'Switchboard number', 'mon-laboratoire' ), __( 'Ex: +33 1 00 00 00 00', 'mon-laboratoire' ) );
    415398        $page->add_field( 'two_text_fields',  'MonLabo_switchboard_nature', __( 'Type of switchboard number to be indicated', 'mon-laboratoire' ) . ' (en/fr)', '', '', 'MonLabo_switchboard_nature' );
    416399        $page->show_fields( true );
    417         $page->add_simple_html( '</fieldset>' );
    418 
    419         $page->add_simple_html( '<fieldset id="group" class="MonLabo-fieldset">' );
    420         $page->add_section(
    421             'MonLabo_pluginPage_section_data_privacy_photo',
    422             $this->_html->dashicon( 'camera' ) . __( 'Personal pictures', 'mon-laboratoire' )
    423         );
    424         $page->add_field(
    425             'checkbox2',
    426             'MonLabo_hide_persons_photo',
    427             __( 'Filter person\'s photo', 'mon-laboratoire' ),
    428             __( 'Check this box to hide personal pictures on the website.', 'mon-laboratoire' )
    429         );
    430         $page->show_fields( $privacy->is_filter_photo() );
    431         $page->add_field( 'radio',   'MonLabo_photo_privacy', '', ' ' );
     400        $page->add_field( 'radio',   'MonLabo_photo_privacy', $this->_html->dashicon( 'businessperson' ) . __( 'Photo', 'mon-laboratoire' ), ' ' );
    432401        $page->show_fields( true );
    433402        $page->add_simple_html( '</fieldset>' );
    434 
    435         $page->show_fields( $privacy->is_display_trusted_range_ip_field() );
    436         $page->add_section(
    437             'MonLabo_pluginPage_section_data_privacy_common',
    438             $this->_html->dashicon( 'admin-generic' ) . __( 'Common parameters', 'mon-laboratoire' )
    439         );
    440         $page->add_field(
    441             'text_field',   
    442             'MonLabo_confidence_IPs',
    443             __( 'Ranges of trusted IP addresses', 'mon-laboratoire' ),
    444             __( 'Ex: 192.168.0.0/16,172.20.50.0/24 (Each range is defined by IP address/subnet mask. For several network ranges, separate them with commas.)', 'mon-laboratoire' )
    445         );
    446         $page->show_fields( true );
    447403    }
    448404
  • mon-laboratoire/trunk/Admin/class-admin-page.php

    r3355231 r3361909  
    33
    44use MonLabo\Lib\App;
     5use MonLabo\Admin\Forms\Options_Forms_View;
    56
    67defined( 'ABSPATH' ) or die( 'No direct script access allowed' );
     
    5152
    5253    /**
    53      * Instance of Settings_Fields class for managing form fields.
    54      *
    55      * @var Settings_Fields
    56      * @access private
    57      */
    58     private $_adminSettingsField = null;
     54     * Instance of Options_Forms_View class for managing form fields.
     55     *
     56     * @var Options_Forms_View
     57     * @access private
     58     */
     59    private $_optionsFormsView = null;
    5960
    6061    /**
     
    8182     */
    8283    private function __construct() {
    83         $this->_adminSettingsField = new Settings_Fields();
     84        $this->_optionsFormsView = new Options_Forms_View();
    8485    }
    8586
     
    201202        $titletext = ( $this->_hide_fields === true ) ? '<span class="MonLabo_hide">' . $title . '</span>' : $title;
    202203        // Add the field using Settings API
    203         $this->_adminSettingsField->add(
     204        $this->_optionsFormsView->add(
    204205            $type,
    205206            $titletext /*$this->_disable_display ? '' : $titletext*/,
  • mon-laboratoire/trunk/Admin/class-admin.php

    r3355231 r3361909  
    33
    44use MonLabo\Lib\Person_Or_Structure\{Person, Team, Unit};
    5 use MonLabo\Admin\Forms_Processing\{Forms_Processing};
     5use MonLabo\Admin\Forms\{Forms_Processing};
     6use MonLabo\Admin\Forms\{Wp_Post_Forms_View};
    67use MonLabo\Frontend\{Contact_Webservices};
    78
     
    161162        $page_number = $forms_processing->get_POST_number( 'page_number' );
    162163        $type = $forms_processing->get_POST_simple_string( 'type' );
    163         $html_forms = new Html_Forms();
    164         $text = $html_forms->update_page_infobox( $item_id, $page_number, $wp_post_id, $type );
     164        $multipost_forms_view = new Wp_Post_Forms_View();
     165        $text = $multipost_forms_view->update_page_infobox( $item_id, $page_number, $wp_post_id, $type );
    165166        $response = array(
    166167            'type'  => 'success',
  • mon-laboratoire/trunk/Admin/js/MonLabo-admin.js

    r3355231 r3361909  
    131131    function ajaxLoadPostThumbnailNow( pageNumber, selectName ) {
    132132        var divId, wpPostId, radioStatus, type, itemId;
    133 
    134133        // Set default values
    135         pageNumber = pageNumber || '__no_change__';
     134        if (pageNumber === '') {
     135            pageNumber = '__no_change__';
     136        }
    136137        selectName = selectName || '';
    137138
     
    613614                                + ',.MonLabo_data_privacy_test_email span.MonLabo_hide' /*test mail title*/
    614615                                + ',.MonLabo_test_send_email';                          /*test mail button*/
    615             if (
    616                 $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_email]"]' ).is( ':checked' ) &&
    617                 ( 'form' === emailPrivacyVal || 'form_local_show' === emailPrivacyVal )
    618             ) {
     616            if ( 'form_local_show' === emailPrivacyVal ) {
    619617                $( objectsToToggle ).show();
    620618            } else {
     
    636634                                + ',.MonLabo_switchboard_nature span.MonLabo_hide'   /*switchboard nature title*/
    637635                                + ',.MonLabo_switchboard_nature table.MonLabo_hide'; /*switchboard nature */
    638             if (
    639                 $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_phone]"]' ).is( ':checked' ) &&
    640                 ( 'switchboard_local_show' === phonePrivacyVal || 'switchboard' === phonePrivacyVal )
    641             ) {
     636            if ( 'switchboard_local_show' === phonePrivacyVal ) {
    642637                $( objectsToToggle ).show();
    643638            } else {
     
    652647         */
    653648        function toggleIpOptions() {
    654             var emailPrivacyVal = $( 'input[name="MonLabo_settings_group11[MonLabo_email_privacy]"]:checked' ).val(),
    655                 roomPrivacyVal = $( 'input[name="MonLabo_settings_group11[MonLabo_room_privacy]"]:checked' ).val(),
    656                 phonePrivacyVal = $( 'input[name="MonLabo_settings_group11[MonLabo_phone_privacy]"]:checked' ).val(),
    657                 photoPrivacyVal = $( 'input[name="MonLabo_settings_group11[MonLabo_photo_privacy]"]:checked' ).val(),
    658                 emailPrivacyIpCondition = $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_email]"]' ).is( ':checked' ) && ( 'local_show' === emailPrivacyVal || 'form_local_show' === emailPrivacyVal ),
    659                 roomPrivacyIpCondition = $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_room]"]' ).is( ':checked' ) && ( 'local_show' === roomPrivacyVal ),
    660                 phonePrivacyIpCondition = $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_phone]"]' ).is( ':checked' ) && ( 'local_show' === phonePrivacyVal || 'switchboard_local_show' === phonePrivacyVal ),
    661                 photoPrivacyIpCondition = $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_photo]"]' ).is( ':checked' ) && ( 'local_show' === photoPrivacyVal ),
    662                 objectsToToggle = '.MonLabo_confidence_IPs'                     /*IP form*/
    663                                 + ',.MonLabo_confidence_IPs span.MonLabo_hide'; /*IP title*/
    664 
    665             if ( emailPrivacyIpCondition || roomPrivacyIpCondition || phonePrivacyIpCondition || photoPrivacyIpCondition ) {
     649            var trustedVisitorVal = $( 'input[name="MonLabo_settings_group11[MonLabo_trusted_visitors]"]:checked' ).val(),
     650                objectsToToggle = '.MonLabo_confidence_IPs'                     //IP form
     651                                + ',.MonLabo_confidence_IPs span.MonLabo_hide'; //IP title
     652            if ( 'trust_ip_zone' === trustedVisitorVal ) {
    666653                $( objectsToToggle ).show();
    667654            } else {
     
    669656            }   
    670657        }
    671 
    672         // Bind events for privacy options
    673         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_email]"]' ).on( 'change', { field: 'MonLabo_email_privacy' }, toggleClosestInputGroup11 );
    674         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_email]"]' ).on( 'change', toggleEmailOptions );
    675         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_room]"]' ).on( 'change', { field: 'MonLabo_room_privacy' }, toggleClosestInputGroup11 );
    676         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_phone]"]' ).on( 'change', { field: 'MonLabo_phone_privacy' }, toggleClosestInputGroup11 );
    677         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_photo]"]' ).on( 'change', { field: 'MonLabo_photo_privacy' }, toggleClosestInputGroup11 );
    678 
    679         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_phone]"]' ).on( 'change', toggleSwitchboardOptions );
    680658        $( 'input[name="MonLabo_settings_group11[MonLabo_phone_privacy]"]' ).on( 'change', toggleSwitchboardOptions );
    681 
    682         $( 'input[name="MonLabo_settings_group11[MonLabo_email_privacy]"]' ).on( 'change', toggleIpOptions );
     659        $( 'input[name="MonLabo_settings_group11[MonLabo_trusted_visitors]"]' ).on( 'change', toggleIpOptions );
    683660        $( 'input[name="MonLabo_settings_group11[MonLabo_email_privacy]"]' ).on( 'change', toggleEmailOptions );
    684         $( 'input[name="MonLabo_settings_group11[MonLabo_room_privacy]"]' ).on( 'change', toggleIpOptions );
    685         $( 'input[name="MonLabo_settings_group11[MonLabo_phone_privacy]"]' ).on( 'change', toggleIpOptions );
    686         $( 'input[name="MonLabo_settings_group11[MonLabo_photo_privacy]"]' ).on( 'change', toggleIpOptions );
    687         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_email]"]' ).on( 'change', toggleIpOptions );
    688         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_room]"]' ).on( 'change', toggleIpOptions );
    689         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_phone]"]' ).on( 'change', toggleIpOptions );
    690         $( 'input[name="MonLabo_settings_group11[MonLabo_hide_persons_photo]"]' ).on( 'change', toggleIpOptions );
    691661    }
    692662
  • mon-laboratoire/trunk/Frontend/Contact_Form/class-contact-form-processing.php

    r3355504 r3361909  
    22namespace MonLabo\Frontend\Contact_Form;
    33
    4 use MonLabo\Lib\Lib;
     4use MonLabo\Lib\{Lib,Translate};
    55
    66defined( 'ABSPATH' ) or die( 'No direct script access allowed' );
     
    3737
    3838    /**
     39     * Instance of Translate helper.
     40     *
     41     * @access protected
     42     * @var Translate
     43    */
     44    protected $_translate;
     45
     46    /**
    3947     * Constructor.
    4048     *
     49     * @param string $language  Display language code.
    4150     * @param array<string,mixed> $post_data Data for form processing.
    4251     */
    43     public function __construct( array $post_data = array() ) {
     52    public function __construct( string $language = '', array $post_data = array() ) {
     53        $this->_translate = new Translate( $language );
    4454        if ( empty( $post_data ) ) {
    4555            if ( ! empty( $_POST ) ) {
     
    183193            return '';
    184194        }
    185         $contact_form_view = new Contact_Form_View();
     195        $contact_form_view = new Contact_Form_View( $this->_translate->get_lang() );
    186196        return $contact_form_view->contact_form( $person_id );
    187197    }
     
    231241            return '';
    232242        }
    233         $contact_form_view = new Contact_Form_View();
     243        $contact_form_view = new Contact_Form_View( $this->_translate->get_lang() );
    234244       
    235245        if( ! $contact_form_view->verify_math_captcha( $this->post ) ){
     
    266276            return __( 'ERROR : The email could not be sent.', 'mon-laboratoire' );
    267277        }
    268         return sprintf( __( 'Mail sent to %s.', 'mon-laboratoire' ) , esc_attr( $person_first_name . ' ' . $person_last_name ) );
     278        return sprintf(
     279            $this->_translate->tr__( 'Mail sent to' ) . ' %s.',
     280            esc_attr( $person_first_name . ' ' . $person_last_name )
     281        );
    269282    }
    270283}
  • mon-laboratoire/trunk/Frontend/Contact_Form/class-contact-form-view.php

    r3355231 r3361909  
    33
    44use MonLabo\Frontend\Person_Or_Structure_View;
     5use MonLabo\Lib\{Translate};
    56
    67defined( 'ABSPATH' ) or die( 'No direct script access allowed' );
     
    2526
    2627    /**
     28     * Instance of Translate helper.
     29     *
     30     * @access protected
     31     * @var Translate
     32    */
     33    protected $_translate;
     34
     35    /**
     36     * Initialize the class and set its properties.
     37     *
     38     * @param string $language  Display language code.
     39     * @access public
     40     */
     41    public function __construct( string $language = '' ) {
     42        $this->_translate = new Translate( $language );
     43    }
     44
     45    /**
    2746     * Gets the button for calling contact form for replacing email in privacy filtering conditions.
    2847     *
     
    3352     */
    3453    public function call_button( $person_info, $mode = 'button' ) : string {
    35         $contact_form_processing = new Contact_Form_Processing();
     54        $contact_form_processing = new Contact_Form_Processing( $this->_translate->get_lang() );
    3655        $output = $contact_form_processing->form_call_mail_processing( $person_info->id );
    3756        if ( ! empty( $output ) ) {
     
    6281            "submit_{$item_type}",
    6382            $class2,
    64             __( 'Write email', 'mon-laboratoire' )
     83            $this->_translate->tr__( 'Write email' )
    6584        );
    6685       
     
    7796    public function contact_form( int $person_id ) : string {
    7897        $output = '';
    79         // $contact_form_processing = new Contact_Form_Processing();
    80         // $output = $contact_form_processing->form_call_mail_processing( $person_id );
    81        
    8298        $output .= '<form method="post" action="#" class="MonLaboMailForm">';
    8399        $output .= sprintf( '<input type="hidden" name="person_id" value="%d" />', $person_id );
     
    86102        //$output .= '<label for="mail">' . __( 'Your email', 'mon-laboratoire' ) . '</label>';
    87103        $output .= '<input type="email" id="mail" name="MonLao_MailFrom" placeholder="';
    88         $output .= __( 'Your email', 'mon-laboratoire' ) . '">';
     104        $output .= $this->_translate->tr__( 'Your email' ) . '">';
    89105
    90106        // Subject field
    91107        $output .= '<input type="text" id="subject" name="MonLabo_MailSubject" placeholder="';
    92         $output .= __( 'Subject of your message', 'mon-laboratoire' ) . '">';
     108        $output .= $this->_translate->tr__( 'Subject of your message' ) . '">';
    93109
    94110        // Message content
    95111        //$output .= '<label for="content">' . __( 'Content...', 'mon-laboratoire' ) . '</label>';
    96112        $output .= '<textarea id="subject" name="MonLabo_MailContent" placeholder="';
    97         $output .= __( 'Write something...', 'mon-laboratoire' );
     113        $output .= $this->_translate->tr__( 'Write something' ) . '...';
    98114        $output .= '" style="height:200px"></textarea>';
    99115       
     
    107123            '<button id="%s" class="MonLaboMailForm btn btn-oldstyle">%s</button>',
    108124            "submit_{$item_type}",
    109             __( 'Send email', 'mon-laboratoire' )
     125            $this->_translate->tr__( 'Send email' )
    110126        );
    111127       
     
    131147            . '</div>',
    132148            $math_question,
    133             __( 'Answer', 'mon-laboratoire' ),
     149            $this->_translate->tr__( 'Answer' ),
    134150            $num1,
    135151            $num2
  • mon-laboratoire/trunk/Frontend/Shortcodes/class-generic-view.php

    r3355231 r3361909  
    244244        }
    245245        if ( $privacy->is_email_replaced_by_form() ){
    246             $contact_form_view = new Contact_Form_View();
     246            $contact_form_view = new Contact_Form_View( $this->_translate->get_lang() );
    247247            if ( $is_contact_form_embeded ) {
    248248                return $contact_form_view->call_button( $person_info, 'button' );
  • mon-laboratoire/trunk/Lib/class-app.php

    r3355231 r3361909  
    188188        'MonLabo_custom_text_Supervisors_fr'        => 'Encadrant⋅e⋅s',
    189189        'MonLabo_custom_text_Write_email_en'        => 'Write email',
    190         'MonLabo_custom_text_Write_email_fr'        => 'Écrire un courriel',       
     190        'MonLabo_custom_text_Write_email_fr'        => 'Écrire un courriel',
     191        'MonLabo_custom_text_Send_email_en'         => 'Send email',
     192        'MonLabo_custom_text_Send_email_fr'         => 'Envoyer le courriel',
     193        'MonLabo_custom_text_Your_email_en'         => 'Your email',
     194        'MonLabo_custom_text_Your_email_fr'         => 'Votre courriel',
     195        'MonLabo_custom_text_Subject_of_your_message_en'    => 'Subject of your message',
     196        'MonLabo_custom_text_Subject_of_your_message_fr'    => 'Objet de votre message',
     197        'MonLabo_custom_text_Write_something_en'    => 'Write something',
     198        'MonLabo_custom_text_Write_something_fr'    => 'Écrire quelquchose',
     199        'MonLabo_custom_text_Answer_en'             => 'Answer',
     200        'MonLabo_custom_text_Answer_fr'             => 'Réponse',
     201        'MonLabo_custom_text_Mail_sent_to_en'       => 'Mail sent to',
     202        'MonLabo_custom_text_Mail_sent_to_fr'       => 'Courriel envoyé à',
    191203    );
    192204
     
    248260     * Option 11 values
    249261     */
     262    const PRIVACY_SHOW                      = 'show';
    250263    const PRIVACY_HIDE                      = 'hide';
    251     const PRIVACY_FORM                      = 'form';
    252264    const PRIVACY_LOCAL_SHOW                = 'local_show';
    253265    const PRIVACY_FORM_LOCAL_SHOW           = 'form_local_show';
    254     const PRIVACY_SWITCHBOARD               = 'switchboard';
    255266    const PRIVACY_SWITCHBOARD_LOCAL_SHOW    = 'switchboard_local_show';
     267    const PRIVACY_TRUST_EVERYBODY           = 'no_trust_zone';
     268    const PRIVACY_TRUST_LOGGED_IN_USERS     = 'trust_logged_in_users';
     269    const PRIVACY_TRUST_IP_ZONE             = 'trust_ip_zone';
     270
    256271
    257272    /**
    258273     * Default options for privacy settings
    259274     *
    260      * @var non-empty-array{MonLabo_hide_persons_email:string}
     275     * @var non-empty-array<string,string>
    261276     */
    262277    const OPTIONS11_DEFAULT = array(
    263         'MonLabo_hide_persons_email'        => '0',
    264         'MonLabo_hide_persons_room'         => '0',
    265         'MonLabo_hide_persons_phone'        => '0',
    266         'MonLabo_hide_persons_photo'        => '0',
    267         'MonLabo_email_privacy'             => self::PRIVACY_HIDE,
    268         'MonLabo_room_privacy'              => self::PRIVACY_HIDE,
    269         'MonLabo_phone_privacy'             => self::PRIVACY_HIDE,
    270         'MonLabo_photo_privacy'             => self::PRIVACY_HIDE,
     278        'MonLabo_trusted_visitors'          => 'no_trust_zone',
     279        'MonLabo_email_privacy'             => self::PRIVACY_SHOW,
     280        'MonLabo_room_privacy'              => self::PRIVACY_SHOW,
     281        'MonLabo_phone_privacy'             => self::PRIVACY_SHOW,
     282        'MonLabo_photo_privacy'             => self::PRIVACY_SHOW,
    271283        'MonLabo_confidence_IPs'            => '',
    272284        'MonLabo_switchboard_number'        => '',
  • mon-laboratoire/trunk/Lib/class-db.php

    r3355376 r3361909  
    2626 *  fill_options_with_custom_values_if_empty( array $options_DEFAULT )
    2727 *  function fill_options_with_default_values_if_empty()
     28 *  _convert_version_string_into_float( string $version_string ): float
    2829 *  migrate()
    2930 *  migrate_to_version_3_1()
     
    416417
    417418    /**
     419     * Convert text version of software into float
     420     * Convert "XX.YY.ZZ" into X.YYZZ
     421     *
     422     * @param string $version_string
     423     * @return float
     424     * @access private
     425     */
     426    private function _convert_version_string_into_float( string $version_string ): float {
     427        $parts = explode( '.', $version_string );
     428        return
     429            round(
     430                floatval(
     431                    10000 * ( (int)$parts[0] )
     432                    + 100 * (int)( $parts[1] ?? 0 )
     433                    + (int)( $parts[2] ?? 0 ) )
     434                    / 10000,
     435                4
     436            );
     437    }
     438
     439
     440    /**
    418441     * Test if database needs updates, and do if necessary
    419442     *
     
    427450            if  (  '0' === $options->activated_version ) {
    428451                //Enter here only if MonLabo_activated_version does not exist => new db
    429                 $plugin_version = \MONLABO_VERSION;
    430                 $options->set( 'activated_version', $plugin_version );
     452                $plugin_version = $this->_convert_version_string_into_float( \MONLABO_VERSION );
     453                $options->set( 'activated_version', \MONLABO_VERSION );
    431454            } else {
    432                 $plugin_version = floatval( $options->activated_version ); //To compare
     455                $plugin_version = $this->_convert_version_string_into_float( $options->activated_version ); //To compare
    433456            }
    434457            if ( $plugin_version < 3.1 ) {
     
    447470            if ( $plugin_version < 4.8 ) {
    448471                $this->migrate_to_version_4_8();
     472            }
     473            if ( $plugin_version < 5.1 ) {
     474                $this->migrate_to_version_5_1();
    449475            }   
    450476            $options->set( 'activated_version', \MONLABO_VERSION );
     
    699725
    700726    /**
     727     * Migrate options from version 5.0 to 5.1
     728     *
     729     * @return Db For method chaining
     730     */
     731    public function migrate_to_version_5_1() : self {
     732        $options11 = get_option( 'MonLabo_settings_group11' );
     733        if ( empty( $options11 ) ) {
     734            $options11 = App::OPTIONS11_DEFAULT;
     735            update_option( 'MonLabo_settings_group11', $options11 );
     736            return $this;
     737        }
     738        if( empty( $options11['MonLabo_hide_persons_email'] )
     739            and empty( $options11['MonLabo_hide_persons_room'] ) 
     740            and empty( $options11['MonLabo_hide_persons_phone'] ) 
     741            and empty( $options11['MonLabo_hide_persons_photo'] ) 
     742        ) {
     743            $options11['MonLabo_trusted_visitors'] = 'no_trust_zone';
     744        }
     745        if( empty( $options11['MonLabo_hide_persons_email'] ) ) {
     746            $options11['MonLabo_email_privacy'] = 'show';
     747        } else {
     748            switch ( $options11['MonLabo_email_privacy'] ) {
     749                //case 'hide': // no change
     750                case 'form':
     751                    $options11['MonLabo_email_privacy'] = 'form_local_show';
     752                    break;
     753                case 'local_show':
     754                case 'form_local_show':
     755                    if ( ! empty( $options11['MonLabo_confidence_IPs'] ) ) {
     756                        $options11['MonLabo_trusted_visitors'] = 'trust_ip_zone';
     757                    }
     758                    break;             
     759            }
     760        }
     761        if( empty( $options11['MonLabo_hide_persons_room'] ) ) {
     762            $options11['MonLabo_room_privacy'] = 'show';
     763        } else {
     764            switch ( $options11['MonLabo_hide_persons_room'] ) {
     765                //case 'hide': // no change
     766                case 'local_show':
     767                    if ( ! empty( $options11['MonLabo_confidence_IPs'] ) ) {
     768                        $options11['MonLabo_trusted_visitors'] = 'trust_ip_zone';
     769                    }
     770                    break;             
     771            }
     772        }
     773        if( empty( $options11['MonLabo_hide_persons_phone'] ) ) {
     774            $options11['MonLabo_phone_privacy'] = 'show';
     775        } else {
     776            switch ( $options11['MonLabo_hide_persons_phone'] ) {
     777                //case 'hide': // no change
     778                case 'switchboard':
     779                    $options11['MonLabo_hide_persons_phone'] = 'switchboard_local_show';
     780                    break;
     781                case 'local_show':
     782                case 'switchboard_local_show':
     783                    if ( ! empty( $options11['MonLabo_confidence_IPs'] ) ) {
     784                        $options11['MonLabo_trusted_visitors'] = 'trust_ip_zone';
     785                    }
     786                    break;             
     787            }
     788        }
     789        if( empty( $options11['MonLabo_hide_persons_photo'] ) ) {
     790            $options11['MonLabo_photo_privacy'] = 'show';
     791        } else {
     792            switch ( $options11['MonLabo_hide_persons_photo'] ) {
     793                //case 'hide': // no change
     794                case 'local_show':
     795                    if ( ! empty( $options11['MonLabo_confidence_IPs'] ) ) {
     796                        $options11['MonLabo_trusted_visitors'] = 'trust_ip_zone';
     797                    }
     798                    break;             
     799            }
     800        }
     801        if ( empty( $options11['MonLabo_trusted_visitors'] ) ) {
     802            $options11['MonLabo_trusted_visitors'] = 'no_trust_zone';
     803        }
     804        unset( $options11['MonLabo_hide_persons_email'] );
     805        unset( $options11['MonLabo_hide_persons_room'] );
     806        unset( $options11['MonLabo_hide_persons_phone'] );
     807        unset( $options11['MonLabo_hide_persons_photo'] );
     808        update_option( 'MonLabo_settings_group11', $options11 );
     809        return $this;
     810    }
     811
     812
     813    /**
    701814     * Delete all options
    702815     *
  • mon-laboratoire/trunk/Lib/class-privacy.php

    r3355231 r3361909  
    1515 * Methods:
    1616 *   __construct()
    17  *   is_filter_email()
    18  *   is_filter_room()
    19  *   is_filter_phone()
    20  *   is_filter_photo()
     17 *   _is_hide_generic( string $privacy_option )
    2118 *   is_hide_email()
    2219 *   is_hide_room()
    2320 *   is_hide_phone()
    2421 *   is_hide_photo()
    25  *   _is_hide_param( string $checkbox_field, string $radio_field )
    2622 *   _calculate_trust_status()
    27  *   is_display_trusted_range_ip_field()
    2823 *   is_display_switchboard_fields()
    2924 *   is_phone_replaced_with_switchboard()
     
    6358    private function __construct() {
    6459        $this->_options = get_option( 'MonLabo_settings_group11' );
    65         if ( $this->is_display_trusted_range_ip_field() ) {
    66             $this->_is_trusted_user = $this->_calculate_trust_status();
    67         }
    68     }
    69 
    70     /**
    71      * Checks if email filtering is enabled.
    72      *
    73      * @return bool True if email filtering is enabled, false otherwise.
    74      */
    75     public function is_filter_email(): bool {
    76         return ! empty( $this->_options['MonLabo_hide_persons_email'] );
    77     }
    78 
    79     /**
    80      * Checks if room filtering is enabled.
    81      *
    82      * @return bool True if room filtering is enabled, false otherwise.
    83      */
    84     public function is_filter_room(): bool {
    85         return ! empty( $this->_options['MonLabo_hide_persons_room'] );
    86     }
    87 
    88     /**
    89      * Checks if phone filtering is enabled.
    90      *
    91      * @return bool True if phone filtering is enabled, false otherwise.
    92      */
    93     public function is_filter_phone(): bool {
    94         return ! empty( $this->_options['MonLabo_hide_persons_phone'] );
    95     }
    96 
    97     /**
    98      * Checks if photo filtering is enabled.
    99      *
    100      * @return bool True if photo filtering is enabled, false otherwise.
    101      */
    102     public function is_filter_photo(): bool {
    103         return ! empty( $this->_options['MonLabo_hide_persons_photo'] );
    104     }
     60        $this->_is_trusted_user = $this->_calculate_trust_status();
     61    }
     62
     63    /**
     64     * Generic function for is_hide_email(), is_hide_room(), is_hide_phone() and is_hide_photo()
     65     *
     66     * @param string $privacy_option Name of the privacy option
     67     * @return bool True if item should be hidden, false otherwise.
     68     */
     69    public function _is_hide_generic( string $privacy_option ): bool {
     70        if (
     71            ! isset( $this->_options[ $privacy_option ] )
     72            || App::PRIVACY_SHOW === $this->_options[ $privacy_option ]
     73        ) {
     74            return false;
     75        }
     76        if ( App::PRIVACY_HIDE === $this->_options[ $privacy_option ] ) {
     77            return true;
     78        }
     79        return ! $this->_is_trusted_user;
     80    }
     81
    10582
    10683    /**
     
    11087     */
    11188    public function is_hide_email(): bool {
    112         return $this->_is_hide_param( 'MonLabo_hide_persons_email', 'MonLabo_email_privacy' );
     89        return $this->_is_hide_generic( 'MonLabo_email_privacy' );
    11390    }
    11491
     
    11996     */
    12097    public function is_hide_room(): bool {
    121         return $this->_is_hide_param( 'MonLabo_hide_persons_room', 'MonLabo_room_privacy' );
     98        return $this->_is_hide_generic( 'MonLabo_room_privacy' );
    12299    }
    123100
     
    128105     */
    129106    public function is_hide_phone(): bool {
    130         return $this->_is_hide_param( 'MonLabo_hide_persons_phone', 'MonLabo_phone_privacy' );
     107        return $this->_is_hide_generic( 'MonLabo_phone_privacy' );
    131108    }
    132109
     
    137114     */
    138115    public function is_hide_photo(): bool {
    139         return $this->_is_hide_param( 'MonLabo_hide_persons_photo', 'MonLabo_photo_privacy' );
    140     }
    141 
    142     /**
    143      * Internal helper to check if a parameter should be hidden based on settings.
    144      *
    145      * @param string $checkbox_field The checkbox field name in options.
    146      * @param string $radio_field   The radio field name in options.
    147      * @return bool True if the parameter should be hidden, false otherwise.
    148      * @access private
    149      */
    150     private function _is_hide_param( string $checkbox_field, string $radio_field ): bool {
    151         return ! empty( $this->_options[ $checkbox_field ] )
    152                 && (
    153                     in_array(
    154                         $this->_options[ $radio_field ] ?? App::PRIVACY_HIDE,
    155                         array( App::PRIVACY_HIDE, App::PRIVACY_FORM, App::PRIVACY_SWITCHBOARD )
    156                     )
    157                     || ! $this->_is_trusted_user
    158                 );
     116        return $this->_is_hide_generic( 'MonLabo_photo_privacy' );
    159117    }
    160118
     
    168126     */
    169127    private function _calculate_trust_status(): bool {
     128        if (
     129            ! isset( $this->_options['MonLabo_trusted_visitors'] )
     130            || App::PRIVACY_TRUST_EVERYBODY === $this->_options['MonLabo_trusted_visitors']
     131        ) {
     132            return true;
     133        }
     134
    170135        // First: test if user logged-in
    171136        if ( is_user_logged_in() ) {
     
    198163        return false;
    199164    }
    200 
    201     /**
    202      * Determines if trusted IP range field should be displayed.
    203      *
    204      * @return bool True if the trusted IP range field should be displayed.
    205      */
    206     public function is_display_trusted_range_ip_field() : bool {
    207         $display = false;
    208         $fields = array(
    209             'MonLabo_hide_persons_email' => 'MonLabo_email_privacy',
    210             'MonLabo_hide_persons_room'  => 'MonLabo_room_privacy',
    211             'MonLabo_hide_persons_phone' => 'MonLabo_phone_privacy',
    212             'MonLabo_hide_persons_photo' => 'MonLabo_photo_privacy',
    213         );
    214         foreach ( $fields as $checkbox_field => $radio_field ) {
    215             $display += ! empty( $this->_options[ $checkbox_field ] )
    216                         && ! empty( $this->_options[ $radio_field ] )
    217                         && in_array(
    218                             $this->_options[ $radio_field ],
    219                             array( App::PRIVACY_LOCAL_SHOW, App::PRIVACY_FORM_LOCAL_SHOW, App::PRIVACY_SWITCHBOARD_LOCAL_SHOW )
    220                         );
    221         }
    222         return (bool) $display;
    223     }
    224165   
    225166    /**
     
    229170     */
    230171    public function is_display_switchboard_fields() : bool {
    231         if ( empty( $this->_options['MonLabo_hide_persons_phone'] ) || empty( $this->_options['MonLabo_phone_privacy'] ) ) {
    232             return false;
    233         }
    234         if (    App::PRIVACY_SWITCHBOARD === $this->_options['MonLabo_phone_privacy']
    235                 || App::PRIVACY_SWITCHBOARD_LOCAL_SHOW === $this->_options['MonLabo_phone_privacy']
     172        if( ! isset( $this->_options['MonLabo_phone_privacy'] ) ) {
     173            return false;
     174        }
     175        if (    App::PRIVACY_SWITCHBOARD_LOCAL_SHOW === $this->_options['MonLabo_phone_privacy']
    236176            ) {
    237177            return true;
     
    240180    }
    241181
     182       
     183    /**
     184     * Determines if switcboard and nature fields should be displayed.
     185     *
     186     * @return bool True if fields have to be displayed
     187     */
     188    public function is_display_email_test() : bool {
     189        if( ! isset( $this->_options['MonLabo_email_privacy'] ) ) {
     190            return false;
     191        }
     192        if (    App::PRIVACY_FORM_LOCAL_SHOW === $this->_options['MonLabo_email_privacy']
     193            ) {
     194            return true;
     195        }
     196        return false;
     197    }
     198
     199
     200    /**
     201     * Determines if switcboard and nature fields should be displayed.
     202     *
     203     * @return bool True if fields have to be displayed
     204     */
     205    public function is_display_trusted_IP_form() : bool {
     206        if( ! isset( $this->_options['MonLabo_trusted_visitors']  ) ) {
     207            return false;
     208        }
     209        if ( App::PRIVACY_TRUST_IP_ZONE === $this->_options['MonLabo_trusted_visitors'] ) {
     210            return true;
     211        }
     212        return false;
     213    }
    242214
    243215    /**
     
    247219     */
    248220    public function is_phone_replaced_with_switchboard() : bool {
    249         if ( empty( $this->_options['MonLabo_hide_persons_phone'] ) || empty( $this->_options['MonLabo_phone_privacy'] ) ) {
     221        if( ! isset( $this->_options['MonLabo_phone_privacy'] ) ) {
    250222            return false;
    251223        }
    252224        if (
    253             App::PRIVACY_SWITCHBOARD === $this->_options['MonLabo_phone_privacy']
    254             || (
    255                 App::PRIVACY_SWITCHBOARD_LOCAL_SHOW === $this->_options['MonLabo_phone_privacy']
    256                 && ! $this->_is_trusted_user
    257                 )
     225            App::PRIVACY_SWITCHBOARD_LOCAL_SHOW === $this->_options['MonLabo_phone_privacy']
     226            && ! $this->_is_trusted_user
    258227        ) {
    259228            return true;
     
    268237     */
    269238    public function is_email_replaced_by_form() : bool {
    270         if ( empty( $this->_options['MonLabo_hide_persons_email'] ) || empty( $this->_options['MonLabo_email_privacy'] ) ) {
     239        if( ! isset( $this->_options['MonLabo_email_privacy'] ) ) {
    271240            return false;
    272241        }
    273242        if (
    274             App::PRIVACY_FORM === $this->_options['MonLabo_email_privacy']
    275             || (
    276                 App::PRIVACY_FORM_LOCAL_SHOW === $this->_options['MonLabo_email_privacy']
    277                 && ! $this->_is_trusted_user
    278                 )
     243            App::PRIVACY_FORM_LOCAL_SHOW === $this->_options['MonLabo_email_privacy']
     244            && ! $this->_is_trusted_user
    279245        ) {
    280246            return true;
  • mon-laboratoire/trunk/languages/mon-laboratoire-fr_FR.po

    r3355231 r3361909  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2020-10-08 18:05+0000\n"
    6 "PO-Revision-Date: 2025-08-29 16:10+0000\n"
     6"PO-Revision-Date: 2025-09-12 16:08+0000\n"
    77"Last-Translator: \n"
    8 "Language-Team: French (France)\n"
     8"Language-Team: Français\n"
    99"Language: fr_FR\n"
    1010"Plural-Forms: nplurals=2; plural=n > 1;\n"
     
    1919msgstr " page(s) dans le cache."
    2020
    21 #: Admin/MonLabo-doc.php:513
     21#: Admin/MonLabo-doc.php:511
    2222#, php-format
    2323msgid "%s Displaying teams by list %s"
    2424msgstr "%s Affichage des équipes par liste %s"
    2525
    26 #: Admin/MonLabo-doc.php:533
     26#: Admin/MonLabo-doc.php:531
    2727#, php-format
    2828#| msgid ""
     
    3939msgstr "(co)directeur ou (co)directrice de l’unité"
    4040
    41 #: Admin/MonLabo-doc.php:471 Admin/MonLabo-doc.php:524
     41#: Admin/MonLabo-doc.php:469 Admin/MonLabo-doc.php:522
    4242msgid "(disabled)"
    4343msgstr "(désactivé)"
     
    7575msgstr "--- Pas de changement ---"
    7676
    77 #: Admin/MonLabo-doc.php:493
     77#: Admin/MonLabo-doc.php:491
    7878#, php-format
    7979msgid ""
     
    243243msgstr "Alumni :"
    244244
    245 #: Admin/class-settings-fields.php:240 Admin/class-settings-fields.php:249
    246 #: Admin/class-settings-fields.php:259
     245#: Admin/class-settings-fields.php:249 Admin/class-settings-fields.php:258
     246#: Admin/class-settings-fields.php:268
    247247msgid "Always hide"
    248248msgstr "Toujours cacher"
    249249
    250 #: Admin/MonLabo-doc.php:558
     250#: Admin/class-settings-fields.php:248 Admin/class-settings-fields.php:257
     251#: Admin/class-settings-fields.php:267
     252msgid "Always show"
     253msgstr "Toujours afficher"
     254
     255#: Admin/MonLabo-doc.php:556
    251256msgid "Announcements MonLabo"
    252257msgstr "Annonces MonLabo"
     
    318323msgstr "Durée du cache"
    319324
    320 #: Admin/class-settings-fields.php:594
     325#: Admin/class-settings-fields.php:603
    321326msgid "Cache emptied!"
    322327msgstr "Cache vidé !"
     328
     329#: Admin/class-admin-init-pages.php:375
     330#| msgid ""
     331#| "Ex: 192.168.0.0/16,172.20.50.0/24 (Each range is defined by IP "
     332#| "address/subnet mask. For several network ranges, separate them with "
     333#| "commas.)"
     334msgid ""
     335"Can be empty. Ex: 192.168.0.0/16,172.20.50.0/24 (Each range is defined by IP "
     336"address/subnet mask. For several network ranges, separate them with commas.)"
     337msgstr ""
     338"Champs vide possible. Ex : 192.168.0.0/16,172.20.50.0/24 (Chaque plage est "
     339"définie par une adresse IP/un masque de sous-réseau. Pour plusieurs plages "
     340"de réseaux, séparez-les par des virgules)."
    323341
    324342#: Admin/Import/class-import.php:410 Admin/Import/class-pre-import.php:545
     
    330348msgstr "Action annulée"
    331349
    332 #: Admin/class-admin-init-pages.php:527
     350#: Admin/class-admin-init-pages.php:513
    333351msgid "Categories"
    334352msgstr "Catégories"
     
    345363"savez ce que fous faites!"
    346364
    347 #: Admin/class-admin-init-pages.php:372
    348 msgid "Check this box to hide emails on the website."
    349 msgstr "Cocher cette option pour cacher les courriels sur le site public."
    350 
    351 #: Admin/class-admin-init-pages.php:428
    352 msgid "Check this box to hide personal pictures on the website."
    353 msgstr ""
    354 "Cocher cette option pour cacher les photos personnelles sur le site public."
    355 
    356 #: Admin/class-admin-init-pages.php:409
    357 msgid "Check this box to hide phones on the website."
    358 msgstr ""
    359 "Cocher cette option pour cacher les numéros de téléphone sur le site public."
    360 
    361 #: Admin/class-admin-init-pages.php:393
    362 msgid "Check this box to hide rooms on the website."
    363 msgstr ""
    364 "Cocher cette option pour cacher les numéros de bureau sur le site public."
    365 
    366365#: Admin/class-html-forms.php:936
    367366msgid "Choose"
     
    369368
    370369#: Admin/class-html-forms.php:1220 Admin/class-html-forms.php:1269
    371 #: Admin/class-settings-fields.php:507
     370#: Admin/class-settings-fields.php:516
    372371msgid "Choose a picture"
    373372msgstr "Choisir une image"
    374373
    375374#: Admin/class-html-forms.php:1219 Admin/class-html-forms.php:1268
    376 #: Admin/class-settings-fields.php:506
     375#: Admin/class-settings-fields.php:515
    377376#| msgid "Chose media"
    378377msgid "Choose media"
     
    383382msgstr "Effacer le cache"
    384383
    385 #: Admin/class-settings-fields.php:605
     384#: Admin/class-settings-fields.php:623
    386385msgid "Clear publications cache"
    387386msgstr "Efface le cache de publications"
     
    413412msgstr "Couleur des liens et des contours photo"
    414413
    415 #: Admin/class-admin-init-pages.php:438
    416 msgid "Common parameters"
    417 msgstr "Paramètres communs"
    418 
    419414#: Admin/Edit_Members/class-edit-members-generic.php:194
    420415msgid "Composition:"
    421416msgstr "Composition:"
    422417
    423 #: Admin/class-settings-fields.php:242 Admin/class-settings-fields.php:251
    424 #: Admin/class-settings-fields.php:260
    425 msgid "Conditional display (for logged-in users or trusted IP addresses)"
    426 msgstr ""
    427 "Affichage sous conditions (pour les utilisateurs connectés ou les adresses "
    428 "IP de confiance)"
    429 
    430 #: Admin/class-settings-fields.php:243
    431 msgid "Conditional display otherwise contact form"
    432 msgstr "Affichage sous conditions ou sinon formulaire"
    433 
    434 #: Admin/class-settings-fields.php:252
    435 msgid "Conditional display otherwise switchboard number"
    436 msgstr "Affichage sous conditions ou sinon numéro de standard"
    437 
    438 #: class-mon-laboratoire.php:221
     418#: class-mon-laboratoire.php:222
    439419msgid "Configuration"
    440420msgstr "Configuration"
     
    464444"(0) 1 42 86 20 80</em>)."
    465445
    466 #: Admin/MonLabo-doc.php:565
     446#: Admin/MonLabo-doc.php:563
    467447msgid "Contributions for version 5.0:"
    468448msgstr "Contributions pour la version 5.0 :"
    469449
    470 #: Admin/MonLabo-doc.php:564
     450#: Admin/MonLabo-doc.php:562
    471451msgid "Contributions for versions 0.6 up to 1.6:"
    472452msgstr "Contributions pour les versions 0.6 à 1.6 :"
    473453
    474 #: Admin/MonLabo-doc.php:562
     454#: Admin/MonLabo-doc.php:560
    475455msgid "Contributors:"
    476456msgstr "Contributrices et contributeurs :"
     
    514494msgstr "Création ou remplacement réussi de %s élément(s)."
    515495
    516 #: Admin/MonLabo-doc.php:563
     496#: Admin/MonLabo-doc.php:561
    517497msgid "Creator and maintainer:"
    518498msgstr "Créateur et mainteneur :"
     
    522502msgstr "Site actuel"
    523503
    524 #: Admin/class-settings-fields.php:275
     504#: Admin/class-settings-fields.php:284
    525505msgid "currently"
    526506msgstr "actuellement"
     
    562542msgstr "Image par défaut"
    563543
    564 #: Admin/class-admin-init-pages.php:495
     544#: Admin/class-admin-init-pages.php:481
    565545msgid "Default title before the list of publications"
    566546msgstr "Titre par défaut devant la liste des publications"
    567547
    568 #: Admin/class-admin-init-pages.php:526
     548#: Admin/class-admin-init-pages.php:512
    569549msgid "Default title for current members"
    570550msgstr "Titre par défaut pour les membres courants"
    571551
    572 #: Admin/class-admin-init-pages.php:525
     552#: Admin/class-admin-init-pages.php:511
    573553msgid "Default title for list of direction members"
    574554msgstr "Titre par défaut pour les membres de la direction"
    575555
    576 #: Admin/class-admin-init-pages.php:524
     556#: Admin/class-admin-init-pages.php:510
    577557msgid "Default title for list of team leaders"
    578558msgstr "Titre par défaut pour les chefs d’équipe"
    579559
    580 #: Admin/class-settings-fields.php:277
     560#: Admin/class-admin-init-pages.php:367
     561#| msgid ""
     562#| "Define here the trusted visitor that will be shown personal data (for "
     563#| "example, from your institution's IP addresses)."
     564msgid ""
     565"Define here the trusted visitors who will be able to view personal data (for "
     566"example, from your institution's IP addresses)."
     567msgstr ""
     568"Définissez ici les visiteurs de confiance qui pourront afficher les données "
     569"personnelles (par exemple, à partir des adresses IP de votre institution)."
     570
     571#: Admin/class-settings-fields.php:286
    581572msgid "defined by Polylang"
    582573msgstr "définie par Polylang"
     
    635626msgstr "Directeurs"
    636627
    637 #: Admin/MonLabo-doc.php:560
     628#: Admin/MonLabo-doc.php:558
    638629msgid "discussions of the plugin users"
    639630msgstr "discussions des utilisateurs de l’extension"
     
    647638msgstr "Langue d’affichage"
    648639
    649 #: Admin/class-admin-init-pages.php:463 Admin/class-admin-init-pages.php:493
     640#: Admin/class-admin-init-pages.php:449 Admin/class-admin-init-pages.php:479
    650641msgid "Display of publications"
    651642msgstr "Affichage des publications"
    652643
    653 #: Admin/MonLabo-doc.php:501
     644#: Admin/MonLabo-doc.php:499
    654645#, php-format
    655646#| msgid ""
     
    667658"%8$s </li></ul>"
    668659
    669 #: Admin/MonLabo-doc.php:527
     660#: Admin/MonLabo-doc.php:525
    670661#, php-format
    671662msgid ""
     
    739730msgstr "Édite les personnels et les structures"
    740731
    741 #: Admin/class-admin.php:195
     732#: Admin/class-admin.php:197
    742733msgid "Edit this person"
    743734msgstr "Édite cette personne"
    744735
    745 #: Admin/class-admin.php:200
     736#: Admin/class-admin.php:202
    746737msgid "Edit this team"
    747738msgstr "Édite cette équipe"
    748739
    749 #: Admin/class-admin.php:204
     740#: Admin/class-admin.php:206
    750741msgid "Edit this unit"
    751742msgstr "Édite cette unité"
    752743
    753 #: Admin/MonLabo-doc.php:549 Admin/class-admin-table-view.php:111
     744#: Admin/class-admin-table-view.php:111 Admin/MonLabo-doc.php:547
     745#: Admin/class-admin-init-pages.php:393
    754746msgid "Email"
    755747msgstr "Courriel"
     
    763755msgstr "Emploi, fonction de la personne en français"
    764756
    765 #: Admin/class-settings-fields.php:265 Admin/class-settings-fields.php:432
     757#: Admin/class-settings-fields.php:274 Admin/class-settings-fields.php:441
    766758msgid "English"
    767759msgstr "Anglais"
     
    771763msgstr "Nom anglais du groupe d’équipes"
    772764
    773 #: Admin/class-settings-fields.php:412
     765#: Admin/class-settings-fields.php:421
    774766msgid "English plural"
    775767msgstr "anglais pluriel"
    776768
    777 #: Admin/class-settings-fields.php:410
     769#: Admin/class-settings-fields.php:419
    778770msgid "English singular"
    779771msgstr "anglais singulier"
    780772
    781 #: Frontend/Contact_Form/class-contact-form-processing.php:257
     773#: Frontend/Contact_Form/class-contact-form-processing.php:266
    782774msgid "ERROR : The email could not be sent."
    783775msgstr "ERREUR : Le courriel n'a pas pu être envoyé."
    784776
    785 #: Admin/class-settings-fields.php:642
     777#: Admin/class-settings-fields.php:660
    786778msgid ""
    787779"ERROR : The email could not be sent. Possible reason: your host may have "
     
    795787msgstr "Erreur dans l’exportation"
    796788
    797 #: Frontend/Contact_Form/class-contact-form-processing.php:234
     789#: Frontend/Contact_Form/class-contact-form-processing.php:236
    798790msgid "ERROR: Bad Capcha."
    799791msgstr "ERREUR : Mauvais Capcha."
    800792
    801 #: Admin/class-admin-init-pages.php:414
     793#: Admin/class-settings-fields.php:240
     794msgid "Everybody"
     795msgstr "Tout le monde"
     796
     797#: Admin/class-admin-init-pages.php:419
    802798msgid "Ex: +33 1 00 00 00 00"
    803799msgstr "Ex: +33 1 00 00 00 00"
    804800
    805 #: Admin/class-admin-init-pages.php:444
    806 msgid ""
    807 "Ex: 192.168.0.0/16,172.20.50.0/24 (Each range is defined by IP "
    808 "address/subnet mask. For several network ranges, separate them with commas.)"
    809 msgstr ""
    810 "Ex : 192.168.0.0/16,172.20.50.0/24 (Chaque plage est définie par une adresse "
    811 "IP/un masque de sous-réseau. Pour plusieurs plages de réseaux, séparez-les "
    812 "par des virgules)."
    813 
    814 #: Admin/MonLabo-doc.php:558
     801#: Admin/MonLabo-doc.php:556
    815802msgid "ex: new versions"
    816803msgstr "ex: nouvelles versions"
     
    870857msgstr "Fonctionnalités"
    871858
    872 #: Admin/class-admin-init-pages.php:574
     859#: Admin/class-admin-init-pages.php:560
    873860msgid "Field title #%u"
    874861msgstr "Titre du champs n°%u"
    875 
    876 #: Admin/class-admin-init-pages.php:371
    877 msgid "Filter emails"
    878 msgstr "Filtrer les emails"
    879 
    880 #: Admin/class-admin-init-pages.php:427
    881 msgid "Filter person's photo"
    882 msgstr "Filtrer les photos des personnes"
    883 
    884 #: Admin/class-admin-init-pages.php:408
    885 msgid "Filter phones"
    886 msgstr "Filtrer les numéros de téléphone"
    887 
    888 #: Admin/class-admin-init-pages.php:392
    889 msgid "Filter rooms"
    890 msgstr "FIltrer les pièces"
    891862
    892863#: Admin/class-admin-init-pages.php:132
     
    907878msgstr "ancien membre"
    908879
    909 #: Admin/class-settings-fields.php:266 Admin/class-settings-fields.php:433
     880#: Admin/class-settings-fields.php:275 Admin/class-settings-fields.php:442
    910881msgid "French"
    911882msgstr "Français"
     
    915886msgstr "Nom français du groupe d’équipes"
    916887
    917 #: Admin/class-settings-fields.php:413
     888#: Admin/class-settings-fields.php:422
    918889msgid "French plural"
    919890msgstr "français pluriel"
    920891
    921 #: Admin/class-settings-fields.php:411
     892#: Admin/class-settings-fields.php:420
    922893msgid "French singular"
    923894msgstr "français singulier"
     
    943914msgstr "Generate default parent page (\"Unités\")"
    944915
    945 #: Admin/MonLabo-doc.php:555
     916#: Admin/MonLabo-doc.php:553
    946917msgid "Get informed"
    947918msgstr "Informez-vous"
     
    1004975msgstr "Aide pour l’importation de teams_members"
    1005976
    1006 #: Admin/MonLabo-doc.php:546
     977#: Admin/MonLabo-doc.php:544
    1007978msgid "Help us by reporting that you are a user"
    1008979msgstr "Aidez-nous en signalant que vous êtes utilisateur"
    1009980
    1010 #: Admin/class-settings-fields.php:267
     981#: Admin/class-settings-fields.php:276
    1011982msgid "here"
    1012983msgstr "ici"
     
    11261097msgstr "Structures d’affiliation du laboratoire"
    11271098
    1128 #: Admin/class-settings-fields.php:271
     1099#: Admin/class-settings-fields.php:280
    11291100#, php-format
    11301101msgid "Language configured %1$s in WordPress %2$s or by a translation plugin"
     
    11481119msgstr "lien"
    11491120
    1150 #: Admin/class-admin-init-pages.php:508
     1121#: Admin/class-admin-init-pages.php:494
    11511122msgid "Link to contact form"
    11521123msgstr "Lien vers le formulaire de contact"
     
    11641135msgstr "Liens"
    11651136
    1166 #: Admin/class-admin-init-pages.php:512
     1137#: Admin/class-admin-init-pages.php:498
    11671138msgid "Links to an external site"
    11681139msgstr "Liens vers un site extérieur"
     
    11711142msgid "List of groups to which the team belongs (multiple selection)"
    11721143msgstr "Liste des groupes auxquels appartient l’équipe (sélection multiple)"
     1144
     1145#: Admin/class-settings-fields.php:241
     1146msgid "Logged-in users"
     1147msgstr "Utilisateurs connectés"
     1148
     1149#: Admin/class-settings-fields.php:242
     1150msgid "Logged-in users and visitors from trusted IP addresses"
     1151msgstr ""
     1152"Utilisateurs connectés et visiteurs provenant d'adresses IP de confiance"
    11731153
    11741154#: Admin/class-admin-table-view.php:202 Admin/class-admin-table-view.php:277
     
    12031183msgstr "logo HAL"
    12041184
    1205 #: Admin/class-settings-fields.php:645
    1206 #: Frontend/Contact_Form/class-contact-form-processing.php:259
     1185#: Admin/class-settings-fields.php:663
     1186#: Frontend/Contact_Form/class-contact-form-processing.php:268
    12071187#, php-format
    12081188msgid "Mail sent to %s."
     
    12171197msgstr "Page principale"
    12181198
    1219 #: Admin/class-admin-menu.php:182 Admin/class-admin-table-view.php:240
     1199#: Admin/class-admin-table-view.php:240 Admin/class-admin-menu.php:182
    12201200#: Admin/Edit_Members/class-edit-members.php:353
    12211201msgid "Main structure"
     
    12311211msgstr "Membre"
    12321212
    1233 #: Admin/class-admin-init-pages.php:465 Admin/class-admin-init-pages.php:521
     1213#: Admin/class-admin-init-pages.php:451 Admin/class-admin-init-pages.php:507
    12341214msgid "Members list"
    12351215msgstr "Liste de personnels"
     
    12431223msgstr "Tuteurs"
    12441224
    1245 #: Admin/class-admin-init-pages.php:516
     1225#: Admin/class-admin-init-pages.php:502
    12461226msgid "Mentors and supervised students"
    12471227msgstr "Mentors et étudiants supervisés"
    12481228
    1249 #: Admin/MonLabo-doc.php:487
     1229#: Admin/MonLabo-doc.php:485
    12501230msgid "Mini documentation"
    12511231msgstr "Mini documentation"
     
    12711251msgstr "Mon Laboratoire"
    12721252
    1273 #: Admin/MonLabo-doc.php:560
     1253#: Admin/MonLabo-doc.php:558
    12741254msgid "MonLabo mailing list"
    12751255msgstr "Liste MonLabo"
    12761256
    1277 #: Admin/class-settings-fields.php:268
     1257#: Admin/class-settings-fields.php:277
    12781258msgid "Multilingual, using the Polylang translation plugin"
    12791259msgstr "Multilingue, par l’extension de traduction Polylang"
     
    13051285msgstr "Nom du laboratoire en français"
    13061286
    1307 #: Admin/class-admin-init-pages.php:488
     1287#: Admin/class-admin-init-pages.php:474
    13081288msgid "Name of the grouping"
    13091289msgstr "Nom du regroupement"
     
    13391319msgstr "NOM,ADRESSE_WEB"
    13401320
    1341 #: Admin/class-admin-init-pages.php:485
     1321#: Admin/class-admin-init-pages.php:471
    13421322#| msgid "Name of the groups of teams (thematic, research group, axis...)"
    13431323msgid "Names of the groups of teams (thematic, research group, axis...)"
     
    14141394msgstr "Actifs"
    14151395
    1416 #: Admin/class-admin-init-pages.php:554
     1396#: Admin/class-admin-init-pages.php:540
    14171397msgid "Number of custom fields (1 to 10)"
    14181398msgstr "Nombre champs personnalisés (de 1 à 10)"
     
    14401420msgstr "Une personne par ligne."
    14411421
    1442 #: class-mon-laboratoire.php:221
     1422#: Admin/class-settings-fields.php:250 Admin/class-settings-fields.php:259
     1423#: Admin/class-settings-fields.php:269
     1424msgid "Only show to trusted visitors"
     1425msgstr "N'afficher qu'aux visiteurs de confiance"
     1426
     1427#: Admin/class-settings-fields.php:251
     1428msgid "Only show to trusted visitors, replace with contact form for others"
     1429msgstr ""
     1430"N'afficher qu'aux visiteurs de confiance, remplacer par un formulaire de "
     1431"contact pour les autres"
     1432
     1433#: Admin/class-settings-fields.php:260
     1434msgid "Only show to trusted visitors, replace with switchboard for others"
     1435msgstr ""
     1436"N'afficher qu'aux visiteurs de confiance, remplacer par le numéro du "
     1437"standard pour les autres"
     1438
     1439#: class-mon-laboratoire.php:222
    14431440msgid "Open the configuration page for this plugin"
    14441441msgstr "Ouvre la page de configuration pour cette extension"
     
    14491446msgstr "Aucun"
    14501447
    1451 #: Admin/MonLabo-doc.php:549 Admin/class-html-forms.php:647
    1452 #: Admin/class-html-forms.php:1116 Admin/class-html-forms.php:1320
     1448#: Admin/class-html-forms.php:647 Admin/class-html-forms.php:1116
     1449#: Admin/class-html-forms.php:1320 Admin/MonLabo-doc.php:547
    14531450msgid "optional"
    14541451msgstr "facultatif"
     
    14811478msgstr "Page %s crée."
    14821479
    1483 #: Admin/class-settings-fields.php:702
     1480#: Admin/class-settings-fields.php:720
    14841481msgid "Page created!"
    14851482msgstr "Page créée&nbsp;!"
     
    14941491msgstr "Page de %1$s crée (%2$s - %3$s)"
    14951492
    1496 #: Admin/class-admin-menu.php:323 Admin/class-admin-table-view.php:106
    1497 #: Admin/class-admin-table-view.php:202 Admin/class-admin-table-view.php:276
    1498 #: Admin/class-admin-table-view.php:332
     1493#: Admin/class-admin-table-view.php:106 Admin/class-admin-table-view.php:202
     1494#: Admin/class-admin-table-view.php:276 Admin/class-admin-table-view.php:332
     1495#: Admin/class-admin-menu.php:323
    14991496msgid "Pages"
    15001497msgstr "Pages"
     
    15571554msgstr "Identifiant ParisDescartes (peut servir d’identifiant de connexion)"
    15581555
    1559 #: Admin/class-admin-init-pages.php:464 Admin/class-admin-init-pages.php:501
     1556#: Admin/class-admin-init-pages.php:450 Admin/class-admin-init-pages.php:487
    15601557msgid "Person panel"
    15611558msgstr "Panneau personnel"
    1562 
    1563 #: Admin/class-admin-init-pages.php:366
    1564 msgid "Person's emails"
    1565 msgstr "Courriels des personnes"
    1566 
    1567 #: Admin/class-admin-init-pages.php:403
    1568 msgid "Person's phones"
    1569 msgstr "Numéros de téléphone des personnes"
    1570 
    1571 #: Admin/class-admin-init-pages.php:387
    1572 msgid "Person's rooms or offices"
    1573 msgstr "Bureaux des personnes"
    15741559
    15751560#: Admin/class-html-forms.php:457
     
    15811566msgstr "Bandeau personnel (perso panel)"
    15821567
     1568#: Admin/class-admin-init-pages.php:382
     1569msgid "Personal data"
     1570msgstr "Données personnelles"
     1571
    15831572#: Admin/Edit_Members/class-edit-members.php:242
    15841573msgid "Personal external website"
     
    15891578msgstr "Photo personnelle"
    15901579
    1591 #: Admin/class-admin-init-pages.php:335 Admin/class-admin-init-pages.php:422
     1580#: Admin/class-admin-init-pages.php:335
    15921581msgid "Personal pictures"
    15931582msgstr "Photos personnelles"
    15941583
    1595 #: Admin/class-admin-init-pages.php:552
     1584#: Admin/class-admin-init-pages.php:538
    15961585msgid "Personalized fields for the personal table"
    15971586msgstr "Champs personnalisés pour la table des personnels"
     
    16661655msgstr "Titre"
    16671656
    1668 #: Admin/class-admin-menu.php:148 Admin/class-admin-table-view.php:395
    1669 #: Admin/class-admin-table-view.php:405 Admin/Import/class-import.php:396
     1657#: Admin/class-admin-table-view.php:395 Admin/class-admin-table-view.php:405
     1658#: Admin/class-admin-menu.php:148 Admin/Import/class-import.php:396
    16701659#: Admin/Edit_Members/class-edit-members-advanced.php:517
    16711660#: Admin/Edit_Members/class-edit-members-advanced.php:554
     
    16821671msgstr "Personnels et équipes"
    16831672
    1684 #: Admin/class-admin-table-view.php:112
     1673#: Admin/class-admin-table-view.php:112 Admin/class-admin-init-pages.php:417
    16851674msgid "Phone"
    16861675msgstr "Téléphone"
     
    16981687msgstr "Préfixe téléphonique de la structure<br />(ex: <em>+33 1 42 86 </em>)."
    16991688
    1700 #: Admin/class-admin-table-view.php:107
     1689#: Admin/class-admin-table-view.php:107 Admin/class-admin-init-pages.php:430
    17011690#: Admin/Edit_Members/class-edit-members-comment.php:102
    17021691msgid "Photo"
     
    17451734msgstr "Extension Mon-laboratoire&nbsp;:"
    17461735
    1747 #: Admin/class-settings-fields.php:268
     1736#: Admin/class-settings-fields.php:277
    17481737msgid "Polylang plugin status"
    17491738msgstr "État de l’extension Polylang"
     
    17531742msgstr "Adresse éventuelle de remplacement de celle de la structure."
    17541743
    1755 #: Admin/class-settings-fields.php:643
     1744#: Admin/class-settings-fields.php:661
    17561745msgid ""
    17571746"Possible solution : Try to install a plugin for reconfiguring wp_mail() "
     
    17691758msgstr "Préfixe :"
    17701759
    1771 #: Admin/MonLabo-doc.php:491
     1760#: Admin/MonLabo-doc.php:489
    17721761msgid "Presentation of functionalities in video"
    17731762msgstr "Présentation des fonctionnalités en vidéo:"
     
    17931782msgstr "Publications&nbsp;:"
    17941783
    1795 #: Admin/class-admin-init-pages.php:443
     1784#: Admin/class-admin-init-pages.php:374
    17961785#| msgid "Range of trusted IP addresses"
    17971786msgid "Ranges of trusted IP addresses"
     
    18071796msgstr "Supprime les numéros de page non valides"
    18081797
    1809 #: Admin/class-settings-fields.php:241
    1810 msgid "Replace with a contact form"
    1811 msgstr "Remplacer avec un formulaire de contact"
    1812 
    1813 #: Admin/class-settings-fields.php:250
    1814 msgid "Replace with a switchboard number"
    1815 msgstr "Remplacer avec un numéro de standard téléphonique"
    1816 
    1817 #: Admin/class-admin-init-pages.php:510 Admin/class-admin-table-view.php:113
     1798#: Admin/class-admin-table-view.php:113 Admin/class-admin-init-pages.php:496
    18181799msgid "Room"
    18191800msgstr "Bureau"
     1801
     1802#: Admin/class-admin-init-pages.php:406
     1803msgid "Room or office"
     1804msgstr "Bureau ou pièce"
    18201805
    18211806#: Admin/class-admin-init-pages.php:336
     
    18351820msgstr "Envoyer le courriel"
    18361821
    1837 #: Admin/class-settings-fields.php:652
     1822#: Admin/class-settings-fields.php:670
    18381823msgid "Send test email"
    18391824msgstr "Envoyer le courriel de test"
     
    18431828msgstr "Unités multiples"
    18441829
    1845 #: Admin/MonLabo-doc.php:495
     1830#: Admin/MonLabo-doc.php:493
    18461831msgid "Shortcodes"
    18471832msgstr "Shotcodes"
    18481833
    1849 #: Admin/class-admin-init-pages.php:475 Admin/class-admin-table-view.php:394
     1834#: Admin/class-admin-table-view.php:394 Admin/class-admin-init-pages.php:461
    18501835#: Admin/Edit_Members/class-edit-members-advanced.php:471
    18511836msgid "Shortcuts:"
     
    18891874msgstr "Objet de votre message"
    18901875
    1891 #: Admin/MonLabo-doc.php:558 Admin/MonLabo-doc.php:560
     1876#: Admin/MonLabo-doc.php:556 Admin/MonLabo-doc.php:558
    18921877msgid "Subscribe now"
    18931878msgstr "S’abonner"
     
    18981883msgstr "Basculer en brouillon les pages des alumni"
    18991884
    1900 #: Admin/class-admin-init-pages.php:414
     1885#: Admin/class-admin-init-pages.php:419
    19011886msgid "Switchboard number"
    19021887msgstr "Numéro de standard téléphonique"
     
    19161901"[team_panel])"
    19171902
    1918 #: Admin/class-admin-init-pages.php:120 Admin/class-admin-init-pages.php:462
     1903#: Admin/class-admin-init-pages.php:120 Admin/class-admin-init-pages.php:448
    19191904msgid "Team groups"
    19201905msgstr "Groupes d’équipes"
     
    19411926msgstr "Équipe(s)&nbsp;:"
    19421927
    1943 #: Admin/class-admin-menu.php:155 Admin/class-admin-table-view.php:122
    1944 #: Admin/class-admin-table-view.php:279 Admin/class-admin-table-view.php:396
    1945 #: Admin/class-admin-table-view.php:412 Admin/Import/class-import.php:401
     1928#: Admin/class-admin-table-view.php:122 Admin/class-admin-table-view.php:279
     1929#: Admin/class-admin-table-view.php:396 Admin/class-admin-table-view.php:412
     1930#: Admin/class-admin-menu.php:155 Admin/Import/class-import.php:401
    19461931#: Admin/Edit_Members/class-edit-members-advanced.php:521
    19471932#: Admin/Edit_Members/class-edit-members-advanced.php:586
     
    19581943"soit pas utilisé)"
    19591944
    1960 #: Admin/MonLabo-doc.php:553
     1945#: Admin/MonLabo-doc.php:551
    19611946msgid "Tell the authors that you are using the plugin on"
    19621947msgstr "Indiquez aux auteurs que vous utilisez l’extension sur"
    19631948
    1964 #: Admin/class-admin-init-pages.php:378
     1949#: Admin/class-admin-init-pages.php:395
    19651950msgid "Test destination email"
    19661951msgstr "Courriel de destination pour le test"
     
    20332018
    20342019#: Admin/class-admin-init-pages.php:361
     2020#| msgid ""
     2021#| "This page is managing data privacy of persons. Please fill carrefully "
     2022#| "these fields to comply with the GDPR and individuals' consent to "
     2023#| "dissemination."
    20352024msgid ""
    20362025"This page is managing data privacy of persons. Please fill carrefully these "
    2037 "fields to comply with the GDPR and individuals' consent to dissemination."
     2026"fields to comply with the GDPR, individuals' consent to dissemination and "
     2027"phishing precautions."
    20382028msgstr ""
    20392029"Cette page gère la confidentialité des données des personnes. Veuillez "
     
    20412031"consentement des personnes à la diffusion."
    20422032
    2043 #: Admin/MonLabo-doc.php:496
     2033#: Admin/MonLabo-doc.php:494
    20442034msgid ""
    20452035"This plugin adds the below shortcodes. These \"shortcodes\" are to be "
     
    20492039"sont à insérer dans les pages pour générer automatiquement des contenus."
    20502040
    2051 #: Admin/MonLabo-doc.php:488
     2041#: Admin/MonLabo-doc.php:486
    20522042msgid ""
    20532043"This WordPress plugin allows, on a unified interface, to manage the pages of "
     
    20862076msgstr "Traduction de pages de %1$s crées (%2$s)"
    20872077
    2088 #: Admin/class-admin-init-pages.php:415
     2078#: Admin/class-admin-init-pages.php:369
     2079msgid "Trusted visitors"
     2080msgstr "Visiteurs de confiance"
     2081
     2082#: Admin/class-admin-init-pages.php:365
     2083msgid "Trusted visitors who can view all personal data"
     2084msgstr "Visiteurs de confiance qui peuvent afficher les données personnelles"
     2085
     2086#: Admin/class-admin-init-pages.php:420
    20892087msgid "Type of switchboard number to be indicated"
    20902088msgstr "Type de numéro de standard"
     
    21102108msgstr "Unité(s)&nbsp;:"
    21112109
    2112 #: Admin/class-admin-menu.php:174 Admin/class-admin-table-view.php:401
    2113 #: Admin/class-admin-table-view.php:423
     2110#: Admin/class-admin-table-view.php:401 Admin/class-admin-table-view.php:423
     2111#: Admin/class-admin-menu.php:174
    21142112#: Admin/Edit_Members/class-edit-members-advanced.php:528
    21152113#: Admin/Edit_Members/class-edit-members-advanced.php:637
     
    21282126
    21292127#: Admin/class-html-forms.php:1221 Admin/class-html-forms.php:1270
    2130 #: Admin/class-settings-fields.php:508
     2128#: Admin/class-settings-fields.php:517
    21312129msgid "use this picture"
    21322130msgstr "utiliser cette image"
     
    21462144msgstr "Personnel visible&nbsp;?"
    21472145
    2148 #: Admin/class-settings-fields.php:267
     2146#: Admin/class-settings-fields.php:276
    21492147msgid "Visitor's browser language"
    21502148msgstr "Langue du navigateur du visiteur"
     
    21852183msgstr "oui"
    21862184
    2187 #: Admin/MonLabo-doc.php:547
     2185#: Admin/MonLabo-doc.php:545
    21882186#, php-format
    21892187msgid ""
     
    21962194"grandement service pour montrer que cette extension est utilisée."
    21972195
    2198 #: Admin/MonLabo-doc.php:556
     2196#: Admin/MonLabo-doc.php:554
    21992197msgid "You can also subscribe to the following mailing lists"
    22002198msgstr "Vous pouvez également vous inscrire aux listes de diffusion suivantes"
  • mon-laboratoire/trunk/languages/mon-laboratoire.pot

    r3355231 r3361909  
    44"Project-Id-Version: Mon Laboratoire\n"
    55"Report-Msgid-Bugs-To: \n"
    6 "POT-Creation-Date: 2025-08-29 16:03+0000\n"
     6"POT-Creation-Date: 2025-09-12 16:02+0000\n"
    77"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    88"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    2121msgstr ""
    2222
    23 #: Admin/MonLabo-doc.php:513
     23#: Admin/MonLabo-doc.php:511
    2424#, php-format
    2525msgid "%s Displaying teams by list %s"
    2626msgstr ""
    2727
    28 #: Admin/MonLabo-doc.php:533
     28#: Admin/MonLabo-doc.php:531
    2929#, php-format
    3030msgid ""
     
    3636msgstr ""
    3737
    38 #: Admin/MonLabo-doc.php:471 Admin/MonLabo-doc.php:524
     38#: Admin/MonLabo-doc.php:469 Admin/MonLabo-doc.php:522
    3939msgid "(disabled)"
    4040msgstr ""
     
    6969msgstr ""
    7070
    71 #: Admin/MonLabo-doc.php:493
     71#: Admin/MonLabo-doc.php:491
    7272#, php-format
    7373msgid ""
     
    200200msgstr ""
    201201
    202 #: Admin/class-settings-fields.php:240 Admin/class-settings-fields.php:249
    203 #: Admin/class-settings-fields.php:259
     202#: Admin/class-settings-fields.php:249 Admin/class-settings-fields.php:258
     203#: Admin/class-settings-fields.php:268
    204204msgid "Always hide"
    205205msgstr ""
    206206
    207 #: Admin/MonLabo-doc.php:558
     207#: Admin/class-settings-fields.php:248 Admin/class-settings-fields.php:257
     208#: Admin/class-settings-fields.php:267
     209msgid "Always show"
     210msgstr ""
     211
     212#: Admin/MonLabo-doc.php:556
    208213msgid "Announcements MonLabo"
    209214msgstr ""
     
    267272msgstr ""
    268273
    269 #: Admin/class-settings-fields.php:594
     274#: Admin/class-settings-fields.php:603
    270275msgid "Cache emptied!"
     276msgstr ""
     277
     278#: Admin/class-admin-init-pages.php:375
     279msgid ""
     280"Can be empty. Ex: 192.168.0.0/16,172.20.50.0/24 (Each range is defined by IP "
     281"address/subnet mask. For several network ranges, separate them with commas.)"
    271282msgstr ""
    272283
     
    279290msgstr ""
    280291
    281 #: Admin/class-admin-init-pages.php:527
     292#: Admin/class-admin-init-pages.php:513
    282293msgid "Categories"
    283294msgstr ""
     
    289300msgstr ""
    290301
    291 #: Admin/class-admin-init-pages.php:372
    292 msgid "Check this box to hide emails on the website."
    293 msgstr ""
    294 
    295 #: Admin/class-admin-init-pages.php:428
    296 msgid "Check this box to hide personal pictures on the website."
    297 msgstr ""
    298 
    299 #: Admin/class-admin-init-pages.php:409
    300 msgid "Check this box to hide phones on the website."
    301 msgstr ""
    302 
    303 #: Admin/class-admin-init-pages.php:393
    304 msgid "Check this box to hide rooms on the website."
    305 msgstr ""
    306 
    307302#: Admin/class-html-forms.php:936
    308303msgid "Choose"
     
    310305
    311306#: Admin/class-html-forms.php:1220 Admin/class-html-forms.php:1269
    312 #: Admin/class-settings-fields.php:507
     307#: Admin/class-settings-fields.php:516
    313308msgid "Choose a picture"
    314309msgstr ""
    315310
    316311#: Admin/class-html-forms.php:1219 Admin/class-html-forms.php:1268
    317 #: Admin/class-settings-fields.php:506
     312#: Admin/class-settings-fields.php:515
    318313msgid "Choose media"
    319314msgstr ""
     
    323318msgstr ""
    324319
    325 #: Admin/class-settings-fields.php:605
     320#: Admin/class-settings-fields.php:623
    326321msgid "Clear publications cache"
    327322msgstr ""
     
    353348msgstr ""
    354349
    355 #: Admin/class-admin-init-pages.php:438
    356 msgid "Common parameters"
    357 msgstr ""
    358 
    359350#: Admin/Edit_Members/class-edit-members-generic.php:194
    360351msgid "Composition:"
    361352msgstr ""
    362353
    363 #: Admin/class-settings-fields.php:242 Admin/class-settings-fields.php:251
    364 #: Admin/class-settings-fields.php:260
    365 msgid "Conditional display (for logged-in users or trusted IP addresses)"
    366 msgstr ""
    367 
    368 #: Admin/class-settings-fields.php:243
    369 msgid "Conditional display otherwise contact form"
    370 msgstr ""
    371 
    372 #: Admin/class-settings-fields.php:252
    373 msgid "Conditional display otherwise switchboard number"
    374 msgstr ""
    375 
    376 #: class-mon-laboratoire.php:221
     354#: class-mon-laboratoire.php:222
    377355msgid "Configuration"
    378356msgstr ""
     
    400378msgstr ""
    401379
    402 #: Admin/MonLabo-doc.php:565
     380#: Admin/MonLabo-doc.php:563
    403381msgid "Contributions for version 5.0:"
    404382msgstr ""
    405383
    406 #: Admin/MonLabo-doc.php:564
     384#: Admin/MonLabo-doc.php:562
    407385msgid "Contributions for versions 0.6 up to 1.6:"
    408386msgstr ""
    409387
    410 #: Admin/MonLabo-doc.php:562
     388#: Admin/MonLabo-doc.php:560
    411389msgid "Contributors:"
    412390msgstr ""
     
    450428msgstr ""
    451429
    452 #: Admin/MonLabo-doc.php:563
     430#: Admin/MonLabo-doc.php:561
    453431msgid "Creator and maintainer:"
    454432msgstr ""
     
    458436msgstr ""
    459437
    460 #: Admin/class-settings-fields.php:275
     438#: Admin/class-settings-fields.php:284
    461439msgid "currently"
    462440msgstr ""
     
    498476msgstr ""
    499477
    500 #: Admin/class-admin-init-pages.php:495
     478#: Admin/class-admin-init-pages.php:481
    501479msgid "Default title before the list of publications"
    502480msgstr ""
    503481
    504 #: Admin/class-admin-init-pages.php:526
     482#: Admin/class-admin-init-pages.php:512
    505483msgid "Default title for current members"
    506484msgstr ""
    507485
    508 #: Admin/class-admin-init-pages.php:525
     486#: Admin/class-admin-init-pages.php:511
    509487msgid "Default title for list of direction members"
    510488msgstr ""
    511489
    512 #: Admin/class-admin-init-pages.php:524
     490#: Admin/class-admin-init-pages.php:510
    513491msgid "Default title for list of team leaders"
    514492msgstr ""
    515493
    516 #: Admin/class-settings-fields.php:277
     494#: Admin/class-admin-init-pages.php:367
     495msgid ""
     496"Define here the trusted visitors who will be able to view personal data (for "
     497"example, from your institution's IP addresses)."
     498msgstr ""
     499
     500#: Admin/class-settings-fields.php:286
    517501msgid "defined by Polylang"
    518502msgstr ""
     
    567551msgstr ""
    568552
    569 #: Admin/MonLabo-doc.php:560
     553#: Admin/MonLabo-doc.php:558
    570554msgid "discussions of the plugin users"
    571555msgstr ""
     
    579563msgstr ""
    580564
    581 #: Admin/class-admin-init-pages.php:463 Admin/class-admin-init-pages.php:493
     565#: Admin/class-admin-init-pages.php:449 Admin/class-admin-init-pages.php:479
    582566msgid "Display of publications"
    583567msgstr ""
    584568
    585 #: Admin/MonLabo-doc.php:501
     569#: Admin/MonLabo-doc.php:499
    586570#, php-format
    587571msgid ""
     
    591575msgstr ""
    592576
    593 #: Admin/MonLabo-doc.php:527
     577#: Admin/MonLabo-doc.php:525
    594578#, php-format
    595579msgid ""
     
    655639msgstr ""
    656640
    657 #: Admin/class-admin.php:195
     641#: Admin/class-admin.php:197
    658642msgid "Edit this person"
    659643msgstr ""
    660644
    661 #: Admin/class-admin.php:200
     645#: Admin/class-admin.php:202
    662646msgid "Edit this team"
    663647msgstr ""
    664648
    665 #: Admin/class-admin.php:204
     649#: Admin/class-admin.php:206
    666650msgid "Edit this unit"
    667651msgstr ""
    668652
    669 #: Admin/MonLabo-doc.php:549 Admin/class-admin-table-view.php:111
     653#: Admin/class-admin-table-view.php:111 Admin/MonLabo-doc.php:547
     654#: Admin/class-admin-init-pages.php:393
    670655msgid "Email"
    671656msgstr ""
     
    679664msgstr ""
    680665
    681 #: Admin/class-settings-fields.php:265 Admin/class-settings-fields.php:432
     666#: Admin/class-settings-fields.php:274 Admin/class-settings-fields.php:441
    682667msgid "English"
    683668msgstr ""
     
    687672msgstr ""
    688673
    689 #: Admin/class-settings-fields.php:412
     674#: Admin/class-settings-fields.php:421
    690675msgid "English plural"
    691676msgstr ""
    692677
    693 #: Admin/class-settings-fields.php:410
     678#: Admin/class-settings-fields.php:419
    694679msgid "English singular"
    695680msgstr ""
    696681
    697 #: Frontend/Contact_Form/class-contact-form-processing.php:257
     682#: Frontend/Contact_Form/class-contact-form-processing.php:266
    698683msgid "ERROR : The email could not be sent."
    699684msgstr ""
    700685
    701 #: Admin/class-settings-fields.php:642
     686#: Admin/class-settings-fields.php:660
    702687msgid ""
    703688"ERROR : The email could not be sent. Possible reason: your host may have "
     
    709694msgstr ""
    710695
    711 #: Frontend/Contact_Form/class-contact-form-processing.php:234
     696#: Frontend/Contact_Form/class-contact-form-processing.php:236
    712697msgid "ERROR: Bad Capcha."
    713698msgstr ""
    714699
    715 #: Admin/class-admin-init-pages.php:414
     700#: Admin/class-settings-fields.php:240
     701msgid "Everybody"
     702msgstr ""
     703
     704#: Admin/class-admin-init-pages.php:419
    716705msgid "Ex: +33 1 00 00 00 00"
    717706msgstr ""
    718707
    719 #: Admin/class-admin-init-pages.php:444
    720 msgid ""
    721 "Ex: 192.168.0.0/16,172.20.50.0/24 (Each range is defined by IP "
    722 "address/subnet mask. For several network ranges, separate them with commas.)"
    723 msgstr ""
    724 
    725 #: Admin/MonLabo-doc.php:558
     708#: Admin/MonLabo-doc.php:556
    726709msgid "ex: new versions"
    727710msgstr ""
     
    779762msgstr ""
    780763
    781 #: Admin/class-admin-init-pages.php:574
     764#: Admin/class-admin-init-pages.php:560
    782765msgid "Field title #%u"
    783 msgstr ""
    784 
    785 #: Admin/class-admin-init-pages.php:371
    786 msgid "Filter emails"
    787 msgstr ""
    788 
    789 #: Admin/class-admin-init-pages.php:427
    790 msgid "Filter person's photo"
    791 msgstr ""
    792 
    793 #: Admin/class-admin-init-pages.php:408
    794 msgid "Filter phones"
    795 msgstr ""
    796 
    797 #: Admin/class-admin-init-pages.php:392
    798 msgid "Filter rooms"
    799766msgstr ""
    800767
     
    813780msgstr ""
    814781
    815 #: Admin/class-settings-fields.php:266 Admin/class-settings-fields.php:433
     782#: Admin/class-settings-fields.php:275 Admin/class-settings-fields.php:442
    816783msgid "French"
    817784msgstr ""
     
    821788msgstr ""
    822789
    823 #: Admin/class-settings-fields.php:413
     790#: Admin/class-settings-fields.php:422
    824791msgid "French plural"
    825792msgstr ""
    826793
    827 #: Admin/class-settings-fields.php:411
     794#: Admin/class-settings-fields.php:420
    828795msgid "French singular"
    829796msgstr ""
     
    849816msgstr ""
    850817
    851 #: Admin/MonLabo-doc.php:555
     818#: Admin/MonLabo-doc.php:553
    852819msgid "Get informed"
    853820msgstr ""
     
    893860msgstr ""
    894861
    895 #: Admin/MonLabo-doc.php:546
     862#: Admin/MonLabo-doc.php:544
    896863msgid "Help us by reporting that you are a user"
    897864msgstr ""
    898865
    899 #: Admin/class-settings-fields.php:267
     866#: Admin/class-settings-fields.php:276
    900867msgid "here"
    901868msgstr ""
     
    1004971msgstr ""
    1005972
    1006 #: Admin/class-settings-fields.php:271
     973#: Admin/class-settings-fields.php:280
    1007974#, php-format
    1008975msgid "Language configured %1$s in WordPress %2$s or by a translation plugin"
     
    1025992msgstr ""
    1026993
    1027 #: Admin/class-admin-init-pages.php:508
     994#: Admin/class-admin-init-pages.php:494
    1028995msgid "Link to contact form"
    1029996msgstr ""
     
    10411008msgstr ""
    10421009
    1043 #: Admin/class-admin-init-pages.php:512
     1010#: Admin/class-admin-init-pages.php:498
    10441011msgid "Links to an external site"
    10451012msgstr ""
     
    10471014#: Admin/Edit_Members/class-edit-members-comment.php:148
    10481015msgid "List of groups to which the team belongs (multiple selection)"
     1016msgstr ""
     1017
     1018#: Admin/class-settings-fields.php:241
     1019msgid "Logged-in users"
     1020msgstr ""
     1021
     1022#: Admin/class-settings-fields.php:242
     1023msgid "Logged-in users and visitors from trusted IP addresses"
    10491024msgstr ""
    10501025
     
    10791054msgstr ""
    10801055
    1081 #: Admin/class-settings-fields.php:645
    1082 #: Frontend/Contact_Form/class-contact-form-processing.php:259
     1056#: Admin/class-settings-fields.php:663
     1057#: Frontend/Contact_Form/class-contact-form-processing.php:268
    10831058#, php-format
    10841059msgid "Mail sent to %s."
     
    10931068msgstr ""
    10941069
    1095 #: Admin/class-admin-menu.php:182 Admin/class-admin-table-view.php:240
     1070#: Admin/class-admin-table-view.php:240 Admin/class-admin-menu.php:182
    10961071#: Admin/Edit_Members/class-edit-members.php:353
    10971072msgid "Main structure"
     
    11071082msgstr ""
    11081083
    1109 #: Admin/class-admin-init-pages.php:465 Admin/class-admin-init-pages.php:521
     1084#: Admin/class-admin-init-pages.php:451 Admin/class-admin-init-pages.php:507
    11101085msgid "Members list"
    11111086msgstr ""
     
    11191094msgstr ""
    11201095
    1121 #: Admin/class-admin-init-pages.php:516
     1096#: Admin/class-admin-init-pages.php:502
    11221097msgid "Mentors and supervised students"
    11231098msgstr ""
    11241099
    1125 #: Admin/MonLabo-doc.php:487
     1100#: Admin/MonLabo-doc.php:485
    11261101msgid "Mini documentation"
    11271102msgstr ""
     
    11471122msgstr ""
    11481123
    1149 #: Admin/MonLabo-doc.php:560
     1124#: Admin/MonLabo-doc.php:558
    11501125msgid "MonLabo mailing list"
    11511126msgstr ""
    11521127
    1153 #: Admin/class-settings-fields.php:268
     1128#: Admin/class-settings-fields.php:277
    11541129msgid "Multilingual, using the Polylang translation plugin"
    11551130msgstr ""
     
    11811156msgstr ""
    11821157
    1183 #: Admin/class-admin-init-pages.php:488
     1158#: Admin/class-admin-init-pages.php:474
    11841159msgid "Name of the grouping"
    11851160msgstr ""
     
    12121187msgstr ""
    12131188
    1214 #: Admin/class-admin-init-pages.php:485
     1189#: Admin/class-admin-init-pages.php:471
    12151190msgid "Names of the groups of teams (thematic, research group, axis...)"
    12161191msgstr ""
     
    12831258msgstr ""
    12841259
    1285 #: Admin/class-admin-init-pages.php:554
     1260#: Admin/class-admin-init-pages.php:540
    12861261msgid "Number of custom fields (1 to 10)"
    12871262msgstr ""
     
    13071282msgstr ""
    13081283
    1309 #: class-mon-laboratoire.php:221
     1284#: Admin/class-settings-fields.php:250 Admin/class-settings-fields.php:259
     1285#: Admin/class-settings-fields.php:269
     1286msgid "Only show to trusted visitors"
     1287msgstr ""
     1288
     1289#: Admin/class-settings-fields.php:251
     1290msgid "Only show to trusted visitors, replace with contact form for others"
     1291msgstr ""
     1292
     1293#: Admin/class-settings-fields.php:260
     1294msgid "Only show to trusted visitors, replace with switchboard for others"
     1295msgstr ""
     1296
     1297#: class-mon-laboratoire.php:222
    13101298msgid "Open the configuration page for this plugin"
    13111299msgstr ""
     
    13161304msgstr ""
    13171305
    1318 #: Admin/MonLabo-doc.php:549 Admin/class-html-forms.php:647
    1319 #: Admin/class-html-forms.php:1116 Admin/class-html-forms.php:1320
     1306#: Admin/class-html-forms.php:647 Admin/class-html-forms.php:1116
     1307#: Admin/class-html-forms.php:1320 Admin/MonLabo-doc.php:547
    13201308msgid "optional"
    13211309msgstr ""
     
    13471335msgstr ""
    13481336
    1349 #: Admin/class-settings-fields.php:702
     1337#: Admin/class-settings-fields.php:720
    13501338msgid "Page created!"
    13511339msgstr ""
     
    13601348msgstr ""
    13611349
    1362 #: Admin/class-admin-menu.php:323 Admin/class-admin-table-view.php:106
    1363 #: Admin/class-admin-table-view.php:202 Admin/class-admin-table-view.php:276
    1364 #: Admin/class-admin-table-view.php:332
     1350#: Admin/class-admin-table-view.php:106 Admin/class-admin-table-view.php:202
     1351#: Admin/class-admin-table-view.php:276 Admin/class-admin-table-view.php:332
     1352#: Admin/class-admin-menu.php:323
    13651353msgid "Pages"
    13661354msgstr ""
     
    14191407msgstr ""
    14201408
    1421 #: Admin/class-admin-init-pages.php:464 Admin/class-admin-init-pages.php:501
     1409#: Admin/class-admin-init-pages.php:450 Admin/class-admin-init-pages.php:487
    14221410msgid "Person panel"
    1423 msgstr ""
    1424 
    1425 #: Admin/class-admin-init-pages.php:366
    1426 msgid "Person's emails"
    1427 msgstr ""
    1428 
    1429 #: Admin/class-admin-init-pages.php:403
    1430 msgid "Person's phones"
    1431 msgstr ""
    1432 
    1433 #: Admin/class-admin-init-pages.php:387
    1434 msgid "Person's rooms or offices"
    14351411msgstr ""
    14361412
     
    14431419msgstr ""
    14441420
     1421#: Admin/class-admin-init-pages.php:382
     1422msgid "Personal data"
     1423msgstr ""
     1424
    14451425#: Admin/Edit_Members/class-edit-members.php:242
    14461426msgid "Personal external website"
     
    14511431msgstr ""
    14521432
    1453 #: Admin/class-admin-init-pages.php:335 Admin/class-admin-init-pages.php:422
     1433#: Admin/class-admin-init-pages.php:335
    14541434msgid "Personal pictures"
    14551435msgstr ""
    14561436
    1457 #: Admin/class-admin-init-pages.php:552
     1437#: Admin/class-admin-init-pages.php:538
    14581438msgid "Personalized fields for the personal table"
    14591439msgstr ""
     
    15281508msgstr ""
    15291509
    1530 #: Admin/class-admin-menu.php:148 Admin/class-admin-table-view.php:395
    1531 #: Admin/class-admin-table-view.php:405 Admin/Import/class-import.php:396
     1510#: Admin/class-admin-table-view.php:395 Admin/class-admin-table-view.php:405
     1511#: Admin/class-admin-menu.php:148 Admin/Import/class-import.php:396
    15321512#: Admin/Edit_Members/class-edit-members-advanced.php:517
    15331513#: Admin/Edit_Members/class-edit-members-advanced.php:554
     
    15441524msgstr ""
    15451525
    1546 #: Admin/class-admin-table-view.php:112
     1526#: Admin/class-admin-table-view.php:112 Admin/class-admin-init-pages.php:417
    15471527msgid "Phone"
    15481528msgstr ""
     
    15601540msgstr ""
    15611541
    1562 #: Admin/class-admin-table-view.php:107
     1542#: Admin/class-admin-table-view.php:107 Admin/class-admin-init-pages.php:430
    15631543#: Admin/Edit_Members/class-edit-members-comment.php:102
    15641544msgid "Photo"
     
    16051585msgstr ""
    16061586
    1607 #: Admin/class-settings-fields.php:268
     1587#: Admin/class-settings-fields.php:277
    16081588msgid "Polylang plugin status"
    16091589msgstr ""
     
    16131593msgstr ""
    16141594
    1615 #: Admin/class-settings-fields.php:643
     1595#: Admin/class-settings-fields.php:661
    16161596msgid ""
    16171597"Possible solution : Try to install a plugin for reconfiguring wp_mail() "
     
    16271607msgstr ""
    16281608
    1629 #: Admin/MonLabo-doc.php:491
     1609#: Admin/MonLabo-doc.php:489
    16301610msgid "Presentation of functionalities in video"
    16311611msgstr ""
     
    16511631msgstr ""
    16521632
    1653 #: Admin/class-admin-init-pages.php:443
     1633#: Admin/class-admin-init-pages.php:374
    16541634msgid "Ranges of trusted IP addresses"
    16551635msgstr ""
     
    16641644msgstr ""
    16651645
    1666 #: Admin/class-settings-fields.php:241
    1667 msgid "Replace with a contact form"
    1668 msgstr ""
    1669 
    1670 #: Admin/class-settings-fields.php:250
    1671 msgid "Replace with a switchboard number"
    1672 msgstr ""
    1673 
    1674 #: Admin/class-admin-init-pages.php:510 Admin/class-admin-table-view.php:113
     1646#: Admin/class-admin-table-view.php:113 Admin/class-admin-init-pages.php:496
    16751647msgid "Room"
     1648msgstr ""
     1649
     1650#: Admin/class-admin-init-pages.php:406
     1651msgid "Room or office"
    16761652msgstr ""
    16771653
     
    16921668msgstr ""
    16931669
    1694 #: Admin/class-settings-fields.php:652
     1670#: Admin/class-settings-fields.php:670
    16951671msgid "Send test email"
    16961672msgstr ""
     
    17001676msgstr ""
    17011677
    1702 #: Admin/MonLabo-doc.php:495
     1678#: Admin/MonLabo-doc.php:493
    17031679msgid "Shortcodes"
    17041680msgstr ""
    17051681
    1706 #: Admin/class-admin-init-pages.php:475 Admin/class-admin-table-view.php:394
     1682#: Admin/class-admin-table-view.php:394 Admin/class-admin-init-pages.php:461
    17071683#: Admin/Edit_Members/class-edit-members-advanced.php:471
    17081684msgid "Shortcuts:"
     
    17441720msgstr ""
    17451721
    1746 #: Admin/MonLabo-doc.php:558 Admin/MonLabo-doc.php:560
     1722#: Admin/MonLabo-doc.php:556 Admin/MonLabo-doc.php:558
    17471723msgid "Subscribe now"
    17481724msgstr ""
     
    17521728msgstr ""
    17531729
    1754 #: Admin/class-admin-init-pages.php:414
     1730#: Admin/class-admin-init-pages.php:419
    17551731msgid "Switchboard number"
    17561732msgstr ""
     
    17681744msgstr ""
    17691745
    1770 #: Admin/class-admin-init-pages.php:120 Admin/class-admin-init-pages.php:462
     1746#: Admin/class-admin-init-pages.php:120 Admin/class-admin-init-pages.php:448
    17711747msgid "Team groups"
    17721748msgstr ""
     
    17911767msgstr ""
    17921768
    1793 #: Admin/class-admin-menu.php:155 Admin/class-admin-table-view.php:122
    1794 #: Admin/class-admin-table-view.php:279 Admin/class-admin-table-view.php:396
    1795 #: Admin/class-admin-table-view.php:412 Admin/Import/class-import.php:401
     1769#: Admin/class-admin-table-view.php:122 Admin/class-admin-table-view.php:279
     1770#: Admin/class-admin-table-view.php:396 Admin/class-admin-table-view.php:412
     1771#: Admin/class-admin-menu.php:155 Admin/Import/class-import.php:401
    17961772#: Admin/Edit_Members/class-edit-members-advanced.php:521
    17971773#: Admin/Edit_Members/class-edit-members-advanced.php:586
     
    18061782msgstr ""
    18071783
    1808 #: Admin/MonLabo-doc.php:553
     1784#: Admin/MonLabo-doc.php:551
    18091785msgid "Tell the authors that you are using the plugin on"
    18101786msgstr ""
    18111787
    1812 #: Admin/class-admin-init-pages.php:378
     1788#: Admin/class-admin-init-pages.php:395
    18131789msgid "Test destination email"
    18141790msgstr ""
     
    18791855msgid ""
    18801856"This page is managing data privacy of persons. Please fill carrefully these "
    1881 "fields to comply with the GDPR and individuals' consent to dissemination."
    1882 msgstr ""
    1883 
    1884 #: Admin/MonLabo-doc.php:496
     1857"fields to comply with the GDPR, individuals' consent to dissemination and "
     1858"phishing precautions."
     1859msgstr ""
     1860
     1861#: Admin/MonLabo-doc.php:494
    18851862msgid ""
    18861863"This plugin adds the below shortcodes. These \"shortcodes\" are to be "
     
    18881865msgstr ""
    18891866
    1890 #: Admin/MonLabo-doc.php:488
     1867#: Admin/MonLabo-doc.php:486
    18911868msgid ""
    18921869"This WordPress plugin allows, on a unified interface, to manage the pages of "
     
    19171894msgstr ""
    19181895
    1919 #: Admin/class-admin-init-pages.php:415
     1896#: Admin/class-admin-init-pages.php:369
     1897msgid "Trusted visitors"
     1898msgstr ""
     1899
     1900#: Admin/class-admin-init-pages.php:365
     1901msgid "Trusted visitors who can view all personal data"
     1902msgstr ""
     1903
     1904#: Admin/class-admin-init-pages.php:420
    19201905msgid "Type of switchboard number to be indicated"
    19211906msgstr ""
     
    19401925msgstr ""
    19411926
    1942 #: Admin/class-admin-menu.php:174 Admin/class-admin-table-view.php:401
    1943 #: Admin/class-admin-table-view.php:423
     1927#: Admin/class-admin-table-view.php:401 Admin/class-admin-table-view.php:423
     1928#: Admin/class-admin-menu.php:174
    19441929#: Admin/Edit_Members/class-edit-members-advanced.php:528
    19451930#: Admin/Edit_Members/class-edit-members-advanced.php:637
     
    19581943
    19591944#: Admin/class-html-forms.php:1221 Admin/class-html-forms.php:1270
    1960 #: Admin/class-settings-fields.php:508
     1945#: Admin/class-settings-fields.php:517
    19611946msgid "use this picture"
    19621947msgstr ""
     
    19751960msgstr ""
    19761961
    1977 #: Admin/class-settings-fields.php:267
     1962#: Admin/class-settings-fields.php:276
    19781963msgid "Visitor's browser language"
    19791964msgstr ""
     
    20121997msgstr ""
    20131998
    2014 #: Admin/MonLabo-doc.php:547
     1999#: Admin/MonLabo-doc.php:545
    20152000#, php-format
    20162001msgid ""
     
    20202005msgstr ""
    20212006
    2022 #: Admin/MonLabo-doc.php:556
     2007#: Admin/MonLabo-doc.php:554
    20232008msgid "You can also subscribe to the following mailing lists"
    20242009msgstr ""
  • mon-laboratoire/trunk/mon-laboratoire.php

    r3355524 r3361909  
    1616 * Plugin URI:        http://www.monlabo.org
    1717 * Description:       Simplify the management of a research unit's website
    18  * Version:           5.0.4
     18 * Version:           5.1
    1919 * Requires at least: 5.6
    2020 * Requires PHP:      7.2
     
    4242
    4343defined( 'ABSPATH' ) or die( 'No direct script access allowed' );
    44 define( 'MONLABO_VERSION', '5.0.4' ); //Currently plugin version, use SemVer - https://semver.org
     44define( 'MONLABO_VERSION', '5.1' ); //Currently plugin version, use SemVer - https://semver.org
    4545
    4646require_once ( __DIR__ . '/polyfill.php' );
  • mon-laboratoire/trunk/readme.txt

    r3355524 r3361909  
    55Requires at least: 5.6
    66Tested up to: 6.7
    7 Stable tag: 5.0.4
     7Stable tag: 5.1
    88Requires PHP: 7.2
    99License: GPLv3 or later
     
    4646== Changelog ==
    4747
     48= 5.1 =
     49*Release Date - 15 september 2025*
     50
     51* New Features:
     52*   - EVOL : simplify privacy configuration page for managing personal data protection
     53*
     54* Bug Fixes & Reliability:
     55*   - CODE : class refactoring for improved maintainability:
     56*       - Html_Forms                                    -> Forms\{Generic_Forms_View, Forms_View, Wp_Post_Forms_View}
     57*       - Settings_Fields                               -> Forms\Options_Forms_View
     58*       - Forms_Processing\Forms_Processing             -> Forms\Forms_Processing
     59*       - Forms_Processing\Forms_Processing_Generic     -> Forms\Forms_Processing_Generic
     60*       - Forms_Processing\Forms_Processing_Advanced    -> Forms\Forms_Processing_Advanced
     61*   - BUG : mail form was not translated
     62*   - BUG : In admin menu for editing person or other item, first page links and translation were not displayed
     63 
    4864= 5.0.4 =
    4965*Release Date - 3 September 2025*
  • mon-laboratoire/trunk/todo.txt

    r3355231 r3361909  
    5757Divers :
    5858    TODO: Ajouter la configuration du serveur SMTP https://www.alpixi.com/configurer-smtp-dans-wordpress-sans-plugin/
    59     TODO: suppress use of class Edit_Members_Comment int class-edit-members.php ( suppress comment comment field in >_html_forms->field)
     59    TODO: suppress use of class Edit_Members_Comment int class-edit-members.php ( suppress comment comment field in >_forms_view->field)
    6060    TODO: voir si l'on peut retirer l'affichage du titre de la page des personnels.
    6161    TODO: explorer plus à fond les retours d'expérience : https://wiki.ccsd.cnrs.fr/wikis/hal/index.php/Retours_d%27exp%C3%A9rience
Note: See TracChangeset for help on using the changeset viewer.