registration.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This script allows for specific registration rules (see CustomPages feature of Chamilo)
  5. * Please contact CBlue regarding any licences issues.
  6. * Author: noel@cblue.be
  7. * Copyright: CBlue SPRL, 20XX (GNU/GPLv3)
  8. * @package chamilo.custompages
  9. **/
  10. /**
  11. * Initialization
  12. */
  13. require_once('language.php');
  14. require_once('../inc/global.inc.php');
  15. /**
  16. * Removes some unwanted elementend of the form object
  17. */
  18. $content['form']->removeElement('extra_mail_notify_invitation');
  19. $content['form']->removeElement('extra_mail_notify_message');
  20. $content['form']->removeElement('extra_mail_notify_group_message');
  21. $content['form']->removeElement('official_code');
  22. $content['form']->removeElement('phone');
  23. $content['form']->removeElement('submit');
  24. $content['form']->removeElement('status');
  25. $content['form']->removeElement('status');
  26. /**
  27. * Code to change the way QuickForm render html
  28. */
  29. /*
  30. $renderer = & $content['form']->defaultRenderer();
  31. $form_template = <<<EOT
  32. <form {attributes}>
  33. {content}
  34. <div class="clear">
  35. &nbsp;
  36. </div>
  37. <p><a href="#" class="btn" onclick="$('#registration-form').submit()"><span>S'inscrire</span></a></p>
  38. </form>
  39. EOT;
  40. $renderer->setFormTemplate($form_template);
  41. $element_template = <<<EOT
  42. <div class="field decalle">
  43. <label>
  44. <!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
  45. </label>
  46. <div class="formw">
  47. <!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> {element}
  48. </div>
  49. </div>
  50. EOT;
  51. $element_template_wimage = <<<EOT
  52. <div class="field decalle display">
  53. <label>
  54. <!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
  55. </label>
  56. <div class="formw">
  57. <!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> {element}
  58. <img src="/custompages/images/perso.jpg" alt="" />
  59. </div>
  60. </div>
  61. EOT;
  62. $renderer->setElementTemplate($element_template_wimage,'pass1');
  63. $renderer->setElementTemplate($element_template);
  64. $header_template = <<<EOT
  65. <div class="row">
  66. <div class="form_header">{header}</div>
  67. </div>
  68. EOT;
  69. */
  70. ?>
  71. <html>
  72. <head>
  73. <title>Registration</title>
  74. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  75. <!--[if !IE 6]><!-->
  76. <link rel="stylesheet" type="text/css" href="../../custompages/style.css" />
  77. <!--<![endif]-->
  78. <!--[if IE 6]>
  79. <link rel="stylesheet" type="text/css" href="../../custompages/style-ie6.css" />
  80. <![endif]-->
  81. <script type="text/javascript" src="../../main/inc/lib/javascript/jquery.min.js"></script>
  82. </head>
  83. <body>
  84. <div id="backgroundimage">
  85. <img src="/custompages/images/page-background.png" class="backgroundimage" />
  86. </div>
  87. <div id="wrapper">
  88. <div id="header">
  89. <img src="../../custompages/images/header.png" alt="Ambassador logo" />
  90. </div> <!-- #header -->
  91. <div id="registration-form-box" class="form-box">
  92. <?php if (isset($form_error) && !empty($form_error)) {
  93. echo '<div id="registration-form-error" class="form-error"><ul>'.$form_error.'</ul></div>';
  94. }?>
  95. <?php
  96. $content['form']->display();
  97. ?>
  98. <div id="registration-form-submit" class="form-submit" onclick="document.forms['registration'].submit();">
  99. <span><?php echo custompages_get_lang('Subscribe');?></span>
  100. </div> <!-- #form-submit -->
  101. <div id="links">
  102. <!--<a href="mailto: support@cblue.be"><?php echo custompages_get_lang('NeedContactAdmin')?></a><br />-->
  103. </div>
  104. </div> <!-- #form -->
  105. <div id="footer">
  106. <img src="../../custompages/images/footer.png" />
  107. </div> <!-- #footer -->
  108. </div> <!-- #wrapper -->
  109. </body>
  110. </html>