Files
2024_WEBSITE_fipf/plugins/cipf_plugin/html/menu/cipf_menu.html
2024-04-03 00:13:39 +02:00

115 lines
4.0 KiB
HTML

<style>
h1 {
margin-left: 15px;
margin-top: 50px;
}
form {
margin: 15px;
border: 1px solid black;
padding: 20px;
}
form > div {
margin: 20px 0px;
}
.define_paypal_credentials_cipf input {
width: 100%;
}
form .vertical_wrapper {
display: flex;
flex-direction: column;
}
form textarea {
resize: vertical;
height: 120px;
}
</style>
<!-- https://developer.wordpress.org/reference/hooks/admin_post_action/ -->
<h1>paypal credentials</h1>
<?php echo Plgntls::open_form_option($option_paypal_name); ?>
<div class="define_paypal_credentials_cipf define_paypal_client_id_cipf vertical_wrapper">
<label for="paypal_client_id_cipf">client id : </label>
<input type="text" id="paypal_client_id_cipf" name="client_id" value="<?php echo $option_paypal['client_id']; ?>" />
</div>
<div class="define_paypal_credentials_cipf define_paypal_secret_id_cipf vertical_wrapper">
<label for="paypal_client_secret_cipf">client secret : </label>
<input type="text" id="paypal_client_secret_cipf" name="client_secret" value="<?php echo $option_paypal['client_secret']; ?>" />
</div>
<div class="choose_sandbox_live_cipf choose_sandbox_cipf">
<input type="radio" id="sandbox" name="sandbox_or_live" value="sandbox" <?php if ($option_paypal['is_sandbox'] === true) {echo 'checked';} ?> />
<label for="sandbox">sandbox</label>
</div>
<div class="choose_sandbox_live_cipf choose_live_cipf">
<input type="radio" id="live" name="sandbox_or_live" value="live" <?php if ($option_paypal['is_sandbox'] === false) {echo 'checked';} ?> />
<label for="live">live</label>
</div>
<input type="submit" value="send"/>
</form>
<!--
-->
<h1>messages apres paiement, avant redirection</h1>
<?php echo Plgntls::open_form_option($option_payment_name); ?>
<div class="define_payment_message_cipf vertical_wrapper">
<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($option_payment['success']); ?></textarea>
</div>
<div class="define_payment_message_cipf vertical_wrapper">
<label for="define_payment_message_failure_cipf">paiement echec : </label>
<textarea id="define_payment_message_failure_cipf" name="message_failure"><?php echo esc_html($option_payment['failure']); ?></textarea>
</div>
<div class="define_payment_message_cipf vertical_wrapper">
<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($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); ?>
<?php foreach($option_emails as $name => $email_options) { ?>
<div class="set_email_options_cipf vertical_wrapper">
<h2><?php echo esc_html($name); ?> :</h2>
<div>
<input type="checkbox" id="<?php echo esc_html($name); ?>_notification" name="<?php echo esc_html($name); ?>_notification_send" <?php if ($email_options['notification_send'] === true) {echo 'checked';} ?> />
<label for="<?php echo esc_html($name); ?>_notification">envoyer une notification ?</label>
</div>
<div>
<input type="checkbox" id="<?php echo esc_html($name); ?>_confirmation" name="<?php echo esc_html($name); ?>_confirmation_send" <?php if ($email_options['confirmation_send'] === true) {echo 'checked';} ?> />
<label for="<?php echo esc_html($name); ?>_confirmation">envoyer une confirmation ?</label>
</div>
</div>
<?php } ?>
<input type="submit" value="send"/>
</form>