Files

226 lines
11 KiB
HTML

<!-- https://developer.wordpress.org/reference/hooks/admin_post_action/ -->
<h1>paypal credentials</h1>
<?php echo Plgntls::open_form_option($option_paypal['_name'], 'post', 'cipf'); ?>
<div class="define_paypal_credentials_cipf vertical_wrapper_cipf">
<label for="paypal_live_client_id_cipf">live client id : </label>
<input type="text" id="paypal_live_client_id_cipf" name="live_client_id" value="<?php echo $option_paypal['live_client_id']; ?>" />
</div>
<div class="define_paypal_credentials_cipf vertical_wrapper_cipf">
<label for="paypal_live_client_secret_cipf">live client secret : </label>
<input type="text" id="paypal_live_client_secret_cipf" name="live_client_secret" value="<?php echo $option_paypal['live_client_secret']; ?>" />
</div>
<div class="define_paypal_credentials_cipf vertical_wrapper_cipf">
<label for="paypal_sandbox_client_id_cipf">sandbox client id : </label>
<input type="text" id="paypal_sandbox_client_id_cipf" name="sandbox_client_id" value="<?php echo $option_paypal['sandbox_client_id']; ?>" />
</div>
<div class="define_paypal_credentials_cipf vertical_wrapper_cipf">
<label for="paypal_sandbox_client_secret_cipf">sandbox client secret : </label>
<input type="text" id="paypal_sandbox_client_secret_cipf" name="sandbox_client_secret" value="<?php echo $option_paypal['sandbox_client_secret']; ?>" />
</div>
<div class="choose_sandbox_live_cipf choose_sandbox_cipf">
<input type="radio" id="paypal_credentials_sandbox" name="sandbox_or_live" value="sandbox" <?php if ($option_paypal['is_sandbox'] === true) {echo 'checked';} ?> />
<label for="paypal_credentials_sandbox">sandbox</label>
</div>
<div class="choose_sandbox_live_cipf choose_live_cipf">
<input type="radio" id="paypal_credentials_live" name="sandbox_or_live" value="live" <?php if ($option_paypal['is_sandbox'] === false) {echo 'checked';} ?> />
<label for="paypal_credentials_live">live</label>
</div>
<div class="">
<input type="checkbox" id="paypal_credentials_force_1_cent" name="force_1_cent" <?php if ($option_paypal['force_1_cent'] === true) {echo 'checked';} ?> />
<label for="paypal_credentials_force_1_cent">forcer le prix de 0,01€ ?</label>
</div>
<input type="submit" value="send"/>
</form>
<!--
-->
<h1>messages apres paiement, avant redirection</h1>
<?php echo Plgntls::open_form_option($option_payment['_name'], 'post', 'cipf'); ?>
<div class="define_payment_message_cipf vertical_wrapper_cipf">
<label for="define_payment_message_success_cipf">paiement réussi : </label>
<textarea id="define_payment_message_success_cipf" name="message_success"><?php echo esc_html(stripslashes($option_payment['success'])); ?></textarea>
</div>
<div class="define_payment_message_cipf vertical_wrapper_cipf">
<label for="define_payment_message_failure_cipf">paiement echec : </label>
<textarea id="define_payment_message_failure_cipf" name="message_failure"><?php echo esc_html(stripslashes($option_payment['failure'])); ?></textarea>
</div>
<div class="define_payment_message_cipf vertical_wrapper_cipf">
<label for="define_payment_message_problem_cipf">paiement problem (dans le cas où le paiement est réussi, mais il y eu une erreur dans son traitement sur le site) : </label>
<textarea id="define_payment_message_problem_cipf" name="message_problem"><?php echo esc_html(stripslashes($option_payment['problem'])); ?></textarea>
</div>
<input type="submit" value="send"/>
</form>
<!--
'payment_success'=>[
'notification_send'=>true,
'notification_to'=>'$$__admin_email__$$',
'notification_subject'=>"paiement réussi",
'notification_message'=>"par ici la monnaie",
'confirmation_send'=>true,
'confirmation_subject'=>"paiement réussi",
'confirmation_message'=>"donne l'argent",
-->
<h1>emails :</h1>
<?php echo Plgntls::open_form_option($option_emails['_name'], 'POST', 'emails_form_cipf cipf'); ?>
<?php
foreach($option_emails as $name => $email_options) {
if ($name === '_name') {
continue;
}
?>
<details class="set_email_options_cipf">
<summary><h2><?php echo esc_html(stripslashes($email_options['name'])); ?> :</h2></summary>
<div class="email_type_wrapper_cipf email_type_notification_wrapper_cipf">
<?php if (isset($email_options['notification_send'])) { ?>
<div class="send_or_not_cipf">
<input type="checkbox" id="<?php echo esc_html(stripslashes($name)); ?>_notification_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_notification_send" <?php if ($email_options['notification_send'] === 'on') {echo 'checked';} ?> />
<label for="<?php echo esc_html(stripslashes($name)); ?>_notification_cipf">envoyer une notification ?</label>
</div>
<?php } ?>
<div class="email_options_cipf">
<?php if (isset($email_options['notification_from'])) { ?>
<div class="vertical_wrapper_cipf">
<label for="<?php echo esc_html(stripslashes($name)); ?>_notification_from_cipf">de : </label>
<input type="text" id="<?php echo esc_html(stripslashes($name)); ?>_notification_from_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_notification_from" value="<?php echo esc_html(stripslashes($email_options['notification_from'])); ?>" />
</div>
<?php } ?>
<?php if (isset($email_options['notification_to'])) { ?>
<div class="vertical_wrapper_cipf">
<label for="<?php echo esc_html(stripslashes($name)); ?>_notification_to_cipf">destinataire : </label>
<input type="text" id="<?php echo esc_html(stripslashes($name)); ?>_notification_to_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_notification_to" value="<?php echo esc_html(stripslashes($email_options['notification_to'])); ?>" />
</div>
<?php } ?>
<?php if (isset($email_options['notification_subject'])) { ?>
<div class="vertical_wrapper_cipf">
<label for="<?php echo esc_html(stripslashes($name)); ?>_notification_subject_cipf">sujet : </label>
<input type="text" id="<?php echo esc_html(stripslashes($name)); ?>_notification_subject_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_notification_subject" value="<?php echo esc_html(stripslashes($email_options['notification_subject'])); ?>" />
</div>
<?php } ?>
<?php if (isset($email_options['notification_message'])) { ?>
<div class="vertical_wrapper_cipf">
<label for="<?php echo esc_html(stripslashes($name)); ?>_notification_message_cipf">message : </label>
<textarea id="<?php echo esc_html(stripslashes($name)); ?>_notification_message_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_notification_message"><?php echo esc_html(stripslashes($email_options['notification_message'])); ?></textarea>
</div>
<?php } ?>
</div>
</div>
<div class="email_type_wrapper_cipf email_type_confirmation_wrapper_cipf">
<?php if (isset($email_options['confirmation_send'])) { ?>
<div class="send_or_not_cipf">
<input type="checkbox" id="<?php echo esc_html(stripslashes($name)); ?>_confirmation_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_confirmation_send" <?php if ($email_options['confirmation_send'] === 'on') {echo 'checked';} ?> />
<label for="<?php echo esc_html(stripslashes($name)); ?>_confirmation_cipf">envoyer une confirmation ?</label>
</div>
<?php } ?>
<div class="email_options_cipf">
<?php if (isset($email_options['confirmation_from'])) { ?>
<div class="vertical_wrapper_cipf">
<label for="<?php echo esc_html(stripslashes($name)); ?>_confirmation_from_cipf">de : </label>
<input type="text" id="<?php echo esc_html(stripslashes($name)); ?>_confirmation_from_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_confirmation_from" value="<?php echo esc_html(stripslashes($email_options['confirmation_from'])); ?>" />
</div>
<?php } ?>
<?php if (isset($email_options['confirmation_subject'])) { ?>
<div class="vertical_wrapper_cipf">
<label for="<?php echo esc_html(stripslashes($name)); ?>_confirmation_subject_cipf">sujet : </label>
<input type="text" id="<?php echo esc_html(stripslashes($name)); ?>_confirmation_subject_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_confirmation_subject" value="<?php echo esc_html(stripslashes($email_options['confirmation_subject'])); ?>" />
</div>
<?php } ?>
<?php if (isset($email_options['confirmation_message'])) { ?>
<div class="vertical_wrapper_cipf">
<label for="<?php echo esc_html(stripslashes($name)); ?>_confirmation_message_cipf">message : </label>
<textarea id="<?php echo esc_html(stripslashes($name)); ?>_confirmation_message_cipf" name="<?php echo esc_html(stripslashes($name)); ?>_confirmation_message"><?php echo esc_html(stripslashes($email_options['confirmation_message'])); ?></textarea>
</div>
<?php } ?>
</div>
</div>
</details>
<?php } ?>
<input type="submit" value="send"/>
</form>
<!--
EXPLICATIONS CLASS CSS
-->
<h1>instructions class css</h1>
<section class="cipf">
<h2>acf</h2>
<p>ajouter ces class sur chaque champs acf, dans <mark>ACF > Groupes de champs > modifier un groupe > modifier un champ > Présentation > classe</mark></p>
<ul>
<li><strong>hide_for_fipfrole : </strong>cacher un champ acf</li>
<li><strong>hide_title_for_fipfrole : </strong>cacher le titre d'un groupe de champs (a mettre sur n'importe quel champ du groupe)</li>
<li><strong>hide_group_for_fipfrole : </strong>cacher tout le groupe de champ (a mettre sur n'importe quel champ du groupe)</li>
<ul>
<details>
<summary>explications visuelles :</summary>
<?php include(dirname(__FILE__).'/explications_acf_groups.html'); ?>
</details>
</ul>
<li><strong>readonly_acf : </strong>transformer un champ en lecture-seule : il ne sera pas modifiable</li>
<li><strong>textarea_full_width : </strong>donner à un champ textarea toute la largeur de la page (surtout pour le champ 'historique')</li>
</ul>
<h2>divi</h2>
<ul>
<li><strong>partenaire_propre_page_cipf : </strong>cacher un element si la personne qui regarde la page n'est pas le ou la partenaire à qui appartient la page (l'article)</li>
<li><strong>cipf_display_ : </strong>cacher un element si la page n'est pas dans un etat precis, voici la liste de tous les etats possibles :
<ul>
<li><strong>cipf_display_carte_commande</strong></li>
<li><strong>cipf_display_carte_renouvellement</strong></li>
<li><strong>cipf_display_changer_carte</strong></li>
<li><strong>cipf_display_compte_carte_expiree</strong></li>
<li><strong>cipf_display_compte_carte_valide</strong></li>
<li><strong>cipf_display_compte_doit_payer</strong></li>
<li><strong>cipf_display_compte_en_attente_invalide</strong></li>
<li><strong>cipf_display_compte_en_attente_valide</strong></li>
<li><strong>cipf_display_compte_nouveau_prof</strong></li>
<li><strong>cipf_display_page_partenaire_brouillon</strong></li>
<li><strong>cipf_display_page_partenaire_publiee</strong></li>
<li><strong>cipf_display_paiement_aucun</strong></li>
<li><strong>cipf_display_paiement_echec</strong></li>
<li><strong>cipf_display_paiement_en_cours</strong></li>
<li><strong>cipf_display_paiement_reussi</strong></li>
<li><strong>cipf_display_type_paypal</strong></li>
<li><strong>cipf_display_type_virement</strong></li>
</ul>
</li>
</ul>
</section>