registration-dist.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. require_once('language.php');
  11. require_once('../inc/global.inc.php');
  12. /**
  13. * Removes some unwanted elementend of the form object
  14. */
  15. $content['form']->removeElement('extra_mail_notify_invitation');
  16. $content['form']->removeElement('extra_mail_notify_message');
  17. $content['form']->removeElement('extra_mail_notify_group_message');
  18. $content['form']->removeElement('official_code');
  19. $content['form']->removeElement('phone');
  20. $content['form']->removeElement('submit');
  21. if (isset($content['form']->_elementIndex['status'])) {
  22. $content['form']->removeElement('status');
  23. $content['form']->removeElement('status');
  24. }
  25. // Deprecated since 2015-03-26
  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 btn-primary" 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><?php echo custompages_get_lang('Registration');?></title>
  74. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  75. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  76. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  77. <link href="/custompages/css/vendor/bootstrap.min.css" rel="stylesheet">
  78. <!--[if !IE 6]><!-->
  79. <link rel="stylesheet" type="text/css" href="/custompages/style.css" />
  80. <!--<![endif]-->
  81. <!--[if IE 6]>
  82. <link rel="stylesheet" type="text/css" href="/custompages/style-ie6.css" />
  83. <![endif]-->
  84. <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
  85. <!--[if lt IE 9]>
  86. <script src="js/vendor/html5shiv.js"></script>
  87. <script src="js/vendor/respond.min.js"></script>
  88. <![endif]-->
  89. <script type="text/javascript" src="/main/inc/lib/javascript/jquery.min.js"></script>
  90. </head>
  91. <body>
  92. <img id="backgroundimage" src="/custompages/images/page-background.png"">
  93. <section id="registration">
  94. <div class="container">
  95. <div class="row">
  96. <div class="col-xs-12">
  97. <div class="form-wrap">
  98. <div class="logo">
  99. <img src="/custompages/images/header.png">
  100. </div>
  101. <?php if (isset($content['error']) && !empty($content['error'])) {
  102. echo '<div id="registration-form-error" class="alert alert-danger">'.$content['error'].'</div>';
  103. }?>
  104. <div id="registration-form-box" class="form-box">
  105. <div class="block-form-login">
  106. <?php
  107. $content['form']->display();
  108. ?>
  109. </div>
  110. <div id="links">
  111. <!--<a href="mailto: support@cblue.be"><?php echo custompages_get_lang('NeedContactAdmin')?></a><br />-->
  112. </div>
  113. </div>
  114. <div id="footer">
  115. <img src="/custompages/images/footer.png" />
  116. </div> <!-- #footer -->
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </section>
  122. </body>
  123. </html>