diff --git a/plugins/cipf_plugin/cipf_plugin.php b/plugins/cipf_plugin/cipf_plugin.php index ebabcb3..f2299f9 100644 --- a/plugins/cipf_plugin/cipf_plugin.php +++ b/plugins/cipf_plugin/cipf_plugin.php @@ -4,7 +4,7 @@ Plugin Name: hggg_cipf Plugin URI: Description: Author: hugogogo -Version: 0.5.10.1 +Version: 0.5.11 Author URI: */ diff --git a/plugins/cipf_plugin/css/fipf_user_profile.css b/plugins/cipf_plugin/css/fipf_user_profile.css index 2f36a30..1bec648 100644 --- a/plugins/cipf_plugin/css/fipf_user_profile.css +++ b/plugins/cipf_plugin/css/fipf_user_profile.css @@ -8,13 +8,17 @@ /* * hide all acf fields with the class 'hide_for_fipfrole_cipf' -* also hide the title if class 'hide_group_for_fipfrole_cipf' +* also hide the title if class 'hide_group_title_for_fipfrole_cipf' * */ -form#your-profile h2:has(+ .form-table .hide_group_for_fipfrole_cipf) { +form#your-profile h2:has(+ .form-table .hide_group_for_fipfrole), +form#your-profile h2:has(+ .form-table .hide_title_for_fipfrole) { display: none; } -form#your-profile .hide_for_fipfrole_cipf { +form#your-profile h2:has(+ .form-table .hide_group_for_fipfrole) + .form-table { + display: none; +} +form#your-profile .hide_for_fipfrole { display: none; } diff --git a/plugins/cipf_plugin/css/menu/menu.css b/plugins/cipf_plugin/css/menu/menu.css index 6792b1e..daba3a2 100644 --- a/plugins/cipf_plugin/css/menu/menu.css +++ b/plugins/cipf_plugin/css/menu/menu.css @@ -1,6 +1,131 @@ -#mytext { - border: 1px solid blue; +h1 { + margin-left: 15px; + margin-top: 50px; } -#mytext_2 { - border: 1px solid green; +form.cipf, section.cipf { + margin: 15px; + border: 1px solid black; + padding: 20px; +} +form.cipf > div { + margin: 20px 0px; +} +.define_paypal_credentials_cipf input { + width: 100%; +} + +form.cipf .vertical_wrapper_cipf { + display: flex; + flex-direction: column; +} +form.cipf textarea { + resize: vertical; + height: 120px; +} + +/* +* form emails +* +*/ +form.emails_form_cipf { + margin: 10px; + padding: 10px; + > input[type="submit"] { + margin-left: 15px; + } + details.set_email_options_cipf { + margin: 15px; + padding: 0px 20px; + border: 1px solid black; + summary { + padding: 20px 0px; + cursor: grab; + h2 { + display: inline; + } + } + .email_type_wrapper_cipf { + margin-bottom: 50px; + .send_or_not_cipf { + margin-bottom: 20px; + } + .send_or_not_cipf:has(input:not(:checked)) + .email_options_cipf { + display: none; + } + .email_options_cipf { + padding-left: 20px; + border-left: 1px solid black; + label { + margin: 10px 0px; + } + } + } + } +} + +/* +* explication class css +* +*/ +section.cipf { + font-size: 1.3em; + p { + font-size: 1em; + } + > h2:not(:first-child) { + margin-top: 50px; + } + ul { + list-style: disc inside; + ul { + list-style: circle inside; + margin-top: 5px; + margin-left: 15px; + } + } + .big_space { + width: 20px; + display: inline-block; + } + details { + margin: 10px; + cursor: default; + summary { + cursor: grab; + padding: 10px; + margin-bottom: 20px; + } + .case_title { + display: flex; + margin-top: 40px; + p { + margin: auto 20px; + } + } + .case { + padding: 10px; + display: flex; + > h1, > h2 { + margin: auto 50px; + } + } + .delimiter { + border-bottom: 1px solid black; + } + .group { + background-color: lightgray; + padding: 1px 10px; + margin-bottom: 50px; + min-height: 50px; + .field { + display: flex; + .input { + border: 1px solid black; + height: 20px; + width: 300px; + margin: auto 100px; + } + } + } + } } diff --git a/plugins/cipf_plugin/html/menu/cipf_menu.html b/plugins/cipf_plugin/html/menu/cipf_menu.html index e948d01..35fea1a 100644 --- a/plugins/cipf_plugin/html/menu/cipf_menu.html +++ b/plugins/cipf_plugin/html/menu/cipf_menu.html @@ -1,73 +1,7 @@ -

paypal credentials

- +
@@ -111,7 +45,7 @@

messages apres paiement, avant redirection

- +
@@ -146,7 +80,7 @@ 'confirmation_message'=>"donne l'argent", -->

emails :

- + $email_options) { @@ -236,3 +170,62 @@ + + + + + +

instructions class css

+
+ +

acf

+

ajouter ces class sur chaque champs acf, dans ACF > Groupes de champs > modifier un groupe > modifier un champ > Présentation > classe

+
    +
  • hide_for_fipfrole : cacher un champ acf
  • +
  • hide_title_for_fipfrole : cacher le titre d'un groupe de champs (a mettre sur n'importe quel champ du groupe)
  • +
  • hide_group_for_fipfrole : cacher tout le groupe de champ (a mettre sur n'importe quel champ du groupe)
  • +
      +
      + explications visuelles : + +
      +
    +
  • readonly_acf : transformer un champ en lecture-seule : il ne sera pas modifiable
  • +
  • textarea_full_width : donner à un champ textarea toute la largeur de la page (surtout pour le champ 'historique')
  • +
+ +

divi

+
    +
  • partenaire_propre_page_cipf : cacher un element si la personne qui regarde la page n'est pas le ou la partenaire à qui appartient la page (l'article)
  • +
  • cipf_display_ : cacher un element si la page n'est pas dans un etat precis, voici la liste de tous les etats possibles : +
      +
    • cipf_display_carte_commande
    • +
    • cipf_display_carte_renouvellement
    • +
    • cipf_display_changer_carte
    • +
    • cipf_display_compte_carte_expiree
    • +
    • cipf_display_compte_carte_valide
    • +
    • cipf_display_compte_doit_payer
    • +
    • cipf_display_compte_en_attente_invalide
    • +
    • cipf_display_compte_en_attente_valide
    • +
    • cipf_display_compte_nouveau_prof
    • +
    • cipf_display_page_partenaire_brouillon
    • +
    • cipf_display_page_partenaire_publiee
    • +
    • cipf_display_paiement_aucun
    • +
    • cipf_display_paiement_echec
    • +
    • cipf_display_paiement_en_cours
    • +
    • cipf_display_paiement_reussi
    • +
    • cipf_display_type_paypal
    • +
    • cipf_display_type_virement
    • +
    +
  • +
+ +

+
    +
  • :
  • +
+ +
+ diff --git a/plugins/cipf_plugin/html/menu/explications_acf_groups.html b/plugins/cipf_plugin/html/menu/explications_acf_groups.html new file mode 100644 index 0000000..61100a3 --- /dev/null +++ b/plugins/cipf_plugin/html/menu/explications_acf_groups.html @@ -0,0 +1,124 @@ +

le groupe de champs par defaut

+
+
+

champ 1 : (pas de class)

+

champ 2 : (pas de class)

+
+
+
+

emails profs et partenaires

+
+

champ 1

+
+
+
+

champ 2

+
+
+
+ +
+ +

cacher un champ du groupe

avec hide_for_fiprole

+
+
+

champ 1 : hide_for_fipfrole

+

champ 2 : (pas de class)

+
+
+
+

emails profs et partenaires

+
+

champ 2

+
+
+
+ +

ou

+ +
+
+

champ 1 : (pas de class)

+

champ 2 : hide_for_fipfrole

+
+
+
+

emails profs et partenaires

+
+

champ 1

+
+
+
+ +
+ +

cacher le titre du groupe

avec hide_title_for_fiprole

+
+
+

champ 1 : hide_title_for_fipfrole

+

champ 2 : (pas de class)

+
+

ou

+
+

champ 1 : (pas de class)

+

champ 2 : hide_title_for_fipfrole

+
+

ou

+
+

champ 1 : hide_title_for_fipfrole

+

champ 2 : hide_title_for_fipfrole

+
+
+
+
+

champ 1

+
+
+
+

champ 2

+
+
+
+ +
+ +

cacher tout le groupe

avec hide_group_for_fiprole

+
+
+

champ 1 : hide_group_for_fipfrole

+

champ 2 : (pas de class)

+
+

ou

+
+

champ 1 : (pas de class)

+

champ 2 : hide_group_for_fipfrole

+
+

ou

+
+

champ 1 : hide_group_for_fipfrole

+

champ 2 : hide_group_for_fipfrole

+
+
+
+
+ +

ou

avec hide_for_fipfrole sur chaque elements et hide_title_for_fipfrole sur n'importe quel elements ou sur tous

+ +
+
+

champ 1 : hide_for_fipfrole hide_title_for_fipfrole

+

champ 2 : hide_for_fipfrole

+
+

ou

+
+

champ 1 : hide_for_fipfrole

+

champ 2 : hide_for_fipfrole hide_title_for_fipfrole

+
+

ou

+
+

champ 1 : hide_for_fipfrole hide_title_for_fipfrole

+

champ 2 : hide_for_fipfrole hide_title_for_fipfrole

+
+
+
+
diff --git a/plugins/cipf_plugin/php/admin_menu.php b/plugins/cipf_plugin/php/admin_menu.php index 061f5f8..384c008 100644 --- a/plugins/cipf_plugin/php/admin_menu.php +++ b/plugins/cipf_plugin/php/admin_menu.php @@ -42,6 +42,7 @@ function add_plugin_content_CIPF() { //delete_option($option_emails_object['_name']); $option_emails = Plgntls::get_option_safe($option_emails_object, true); + Plgntls::add_to_front(array('css/menu/menu.css')); ob_start(); include(Plgntls::root_path() . '/html/menu/cipf_menu.html'); $html = ob_get_clean(); diff --git a/ç b/ç deleted file mode 100644 index d49a76b..0000000 --- a/ç +++ /dev/null @@ -1,28 +0,0 @@ -## list of errors in divi form builder - -1. [-] editing a post only work with the post title in the edit form (it can be an hidden field) -2. [-] edit post form dont remember a choice if the acf field has a value of 0 : `0 : label` -3. [-] multistep form effects and height calculation -4. [-] file upload icon on firefox -5. [ ] acf date not initialized is array, but dfb dont check it, which creates a php-notice array to string conversion -> `wordpress_docker/volumes/wp_volume/wp-content/plugins/divi-form-builder/includes/modules/FormField/FormField.php` -6. [ ] acf date don't output well and consistently, because acf will try to format it -7. [ ] acf date is not saved in acf format in the database -8. [ ] it's not a front error, but it made things really complicated to not have a filter of the `post_array` before saving it to the database : we can only filter the array with the wp hook `update_post_metadata`, but it does not have all the informations we need from the `post_array` - ---- - -1. when chossing a date in formbuilder, if the date format is not in format yymmdd (or Ymd in acf convention) it will not work -2. divi form builder, contact form, prof delete account, delete user, email confirmation, logged in user -> not working -3. when creating an hidden input email mapped with the email of the user, it deleted the email of the user -4. form email confirmation only sent if email notification are enabled -6. when choosing edit for author and admin only, admin can edit the post, but it changes its author -7. calculation total disapear when validating -8. in form, when chosing a conditional logic to output an element based on the value of another field, it does not work if this other field is automatically detecting fields from mapped value - - 434 : ../../../../wordpress_docker/volumes/wp_volume/wp-content/plugins/divi-form-builder/includes/DiviFormBuilder.php - - those lines : - ``` - if ( !isset( $post_array['meta_input'][$meta_input_rname] ) ) { - $post_array['meta_input'][$meta_input_rname] = array(); - }t - ``` - - they keep the field in the array that will be used to create the new post, but with an empty value : it empty the acf field at post creation. Instead, just don't keep the value ! -> it will not be in the new post, without emptying the acf field