Show message when the mininum percent is not achieved - refs BT#9461

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 986b580236
commit 60b19ffda6
  1. 1
      plugin/advanced_subscription/lang/english.php
  2. 1
      plugin/advanced_subscription/lang/spanish.php
  3. 4
      plugin/advanced_subscription/src/terms_and_conditions.php
  4. 5
      plugin/advanced_subscription/views/terms_and_conditions.tpl

@ -138,3 +138,4 @@ $strings['MailContentReminderMaxSuperior'] = 'We kindly remind you that we have
$strings['MailContentReminderMaxSuperiorSecond'] = 'This course have limited vacancies and has received a high subscription request rate, So we recommend all areas to accept at most <strong>%s</strong> candidates. We invite you to accept or reject the inscription request by clicking the corresponding button for each collaborator.';
$strings['YouMustAcceptTermsAndConditions'] = 'To subscribe to course <strong>%s</strong>, you must accept these terms and conditions.';
$strings['YouMustFillXPercentOfYourProfileAtLeast'] = "You must fill the <strong>%d percent</strong> of your profile at least. For now you has filled the <strong>%d percent</strong>";

@ -138,3 +138,4 @@ $strings['MailContentReminderMaxSuperior'] = 'Le recordamos que hemos recibido l
$strings['MailContentReminderMaxSuperiorSecond'] = 'Este curso tiene una cantidad de cupos limitados y ha recibido una alta tasa de solicitudes de inscripción, por lo que recomendamos que cada área apruebe un máximo de <strong>%s</strong> candidatos. Le invitamos a aprobar o desaprobar las suscripciones, dando clic en el botón correspondiente a continuación para cada colaborador.';
$strings['YouMustAcceptTermsAndConditions'] = 'Para inscribirse al curso <strong>%s</strong>, debe aceptar estos términos y condiciones.';
$strings['YouMustFillXPercentOfYourProfileAtLeast'] = "Debes llenar el <strong>%d porciento</strong> de tu perfil como mínimo. Por ahora has llenado el <strong>%d porciento</strong>";

@ -24,6 +24,8 @@ $data['termsRejected'] = isset($_REQUEST['r']) ? intval($_REQUEST['r']) : 0;
// Init template
$tpl = new Template($plugin->get_lang('plugin_title'));
$requiredMinimun = $plugin->get('min_profile_percentage');
if (
!empty($data['sessionId']) &&
!empty($data['studentUserId']) &&
@ -74,5 +76,7 @@ $tpl->assign('student', $data['student']);
$tpl->assign('sessionId', $data['sessionId']);
$tpl->assign('termsContent', $termsContent);
$tpl->assign('termsFiles', $termFiles);
$tpl->assign('profileCompleted', $data['profile_completed']);
$tpl->assign('percentMinimun', $requiredMinimun);
$content = $tpl->fetch('/advanced_subscription/views/terms_and_conditions.tpl');
echo $content;

@ -25,6 +25,11 @@
{{ "YouMustAcceptTermsAndConditions" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(session.name) }}
</div>
{% endif %}
{% if percentMinimun > profileCompleted %}
<div class="alert alert-warning legal-terms-popup">
{{ "YouMustFillXPercentOfYourProfileAtLeast" | get_plugin_lang("AdvancedSubscriptionPlugin") | format(percentMinimun, profileCompleted) }}
</div>
{% endif %}
<div class="legal-terms legal-terms-popup">
{{ termsContent }}
</div>

Loading…
Cancel
Save