You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
3.9 KiB
122 lines
3.9 KiB
13 years ago
|
<?php
|
||
13 years ago
|
/* For licensing terms, see /license.txt */
|
||
13 years ago
|
/**
|
||
13 years ago
|
* This script allows for specific registration rules (see CustomPages feature of Chamilo)
|
||
13 years ago
|
* Please contact CBlue regarding any licences issues.
|
||
|
* Author: noel@cblue.be
|
||
7 years ago
|
* Copyright: CBlue SPRL, 20XX (GNU/GPLv3).
|
||
|
*
|
||
13 years ago
|
* @package chamilo.custompages
|
||
7 years ago
|
*/
|
||
8 years ago
|
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
|
||
|
require_once __DIR__.'/language.php';
|
||
13 years ago
|
/**
|
||
7 years ago
|
* Removes some unwanted elementend of the form object.
|
||
13 years ago
|
*/
|
||
13 years ago
|
$content['form']->removeElement('extra_mail_notify_invitation');
|
||
|
$content['form']->removeElement('extra_mail_notify_message');
|
||
|
$content['form']->removeElement('extra_mail_notify_group_message');
|
||
|
$content['form']->removeElement('official_code');
|
||
|
$content['form']->removeElement('phone');
|
||
10 years ago
|
$content['form']->removeElement('submit');
|
||
10 years ago
|
if (isset($content['form']->_elementIndex['status'])) {
|
||
|
$content['form']->removeElement('status');
|
||
|
$content['form']->removeElement('status');
|
||
|
}
|
||
9 years ago
|
$rootWeb = api_get_path('WEB_PATH');
|
||
|
|
||
10 years ago
|
// Deprecated since 2015-03-26
|
||
13 years ago
|
/**
|
||
7 years ago
|
* Code to change the way QuickForm render html.
|
||
13 years ago
|
*/
|
||
13 years ago
|
/*
|
||
|
$renderer = & $content['form']->defaultRenderer();
|
||
|
$form_template = <<<EOT
|
||
13 years ago
|
|
||
13 years ago
|
<form {attributes}>
|
||
|
{content}
|
||
|
<div class="clear">
|
||
|
|
||
|
</div>
|
||
10 years ago
|
<p><a href="#" class="btn btn-primary" onclick="$('#registration-form').submit()"><span>S'inscrire</span></a></p>
|
||
13 years ago
|
</form>
|
||
|
|
||
|
EOT;
|
||
|
$renderer->setFormTemplate($form_template);
|
||
|
|
||
|
$element_template = <<<EOT
|
||
|
<div class="field decalle">
|
||
|
<label>
|
||
|
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
|
||
|
</label>
|
||
|
<div class="formw">
|
||
|
<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> {element}
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
EOT;
|
||
|
$element_template_wimage = <<<EOT
|
||
|
<div class="field decalle display">
|
||
|
<label>
|
||
|
<!-- BEGIN required --><span class="form_required">*</span> <!-- END required -->{label}
|
||
|
</label>
|
||
|
<div class="formw">
|
||
|
<!-- BEGIN error --><span class="form_error">{error}</span><br /><!-- END error --> {element}
|
||
|
<img src="/custompages/images/perso.jpg" alt="" />
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
EOT;
|
||
|
$renderer->setElementTemplate($element_template_wimage,'pass1');
|
||
|
$renderer->setElementTemplate($element_template);
|
||
|
|
||
|
$header_template = <<<EOT
|
||
|
<div class="row">
|
||
|
<div class="form_header">{header}</div>
|
||
|
</div>
|
||
|
|
||
|
EOT;
|
||
|
|
||
|
*/
|
||
13 years ago
|
?>
|
||
|
<html>
|
||
|
<head>
|
||
8 years ago
|
<title><?php echo custompages_get_lang('Registration'); ?></title>
|
||
10 years ago
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
7 years ago
|
<script type="text/javascript" src="<?php echo $rootWeb; ?>web/assets/jquery/dist/jquery.min.js"></script>
|
||
13 years ago
|
</head>
|
||
|
<body>
|
||
10 years ago
|
<img id="backgroundimage" src="/custompages/images/page-background.png"">
|
||
|
<section id="registration">
|
||
|
<div class="container">
|
||
|
<div class="row">
|
||
|
<div class="col-xs-12">
|
||
|
<div class="form-wrap">
|
||
|
<div class="logo">
|
||
|
<img src="/custompages/images/header.png">
|
||
|
</div>
|
||
|
<?php if (isset($content['error']) && !empty($content['error'])) {
|
||
7 years ago
|
echo '<div id="registration-form-error" class="alert alert-danger">'.$content['error'].'</div>';
|
||
|
}?>
|
||
10 years ago
|
<div id="registration-form-box" class="form-box">
|
||
|
<div class="block-form-login">
|
||
|
<?php
|
||
|
$content['form']->display();
|
||
|
?>
|
||
|
</div>
|
||
|
<div id="links">
|
||
5 years ago
|
<!--<a href="mailto: support@cblue.be"><?php echo custompages_get_lang('Click here to contact the administrator'); ?></a><br />-->
|
||
10 years ago
|
</div>
|
||
|
</div>
|
||
|
<div id="footer">
|
||
|
<img src="/custompages/images/footer.png" />
|
||
|
</div> <!-- #footer -->
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</section>
|
||
13 years ago
|
</body>
|
||
|
</html>
|