mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
demo stuff
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,4 +22,5 @@ sync.sh
|
||||
*.swp
|
||||
.debug
|
||||
.maintenance
|
||||
.demo
|
||||
.htaccess
|
||||
|
||||
@@ -923,6 +923,13 @@ class User extends CI_Controller {
|
||||
*/
|
||||
function forgot_password() {
|
||||
|
||||
if (file_exists('.demo')) {
|
||||
|
||||
$this->session->set_flashdata('error', __("Password Reset is disabled on the Demo!"));
|
||||
redirect('user/login');
|
||||
|
||||
} else {
|
||||
|
||||
$this->load->helper(array('form', 'url'));
|
||||
|
||||
$this->load->library('form_validation');
|
||||
@@ -995,6 +1002,7 @@ class User extends CI_Controller {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Send an E-Mail to the user. Function is similar to forgot_password() but will be called by an AJAX
|
||||
public function admin_send_password_reset() {
|
||||
|
||||
@@ -38,16 +38,26 @@
|
||||
<?php } ?>
|
||||
<div class="my-2 rounded-0 shadow-sm card mb-2 shadow-sm">
|
||||
<div class="card-body">
|
||||
<?php // only used for Wavelog Demo
|
||||
if (file_exists('.demo')) { ?>
|
||||
<div class="border-bottom mb-3">
|
||||
<h5><?= __("Welcome to the Demo of Wavelog"); ?></h5>
|
||||
<p><?= __("This demo will be reset every night at 0200z."); ?><br><br>
|
||||
<?= __("Username"); ?>: demo<br>
|
||||
<?= __("Password"); ?>: demo<br><br>
|
||||
<?= sprintf(__("More Information about Wavelog on <a href='%s' target='_blank'>Github</a>."), "https://www.github.com/wavelog/wavelog"); ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<form method="post" action="<?php echo site_url('user/login'); ?>" name="users">
|
||||
<?php $this->form_validation->set_error_delimiters('', ''); ?>
|
||||
<input type="hidden" name="id" value="<?php echo $this->uri->segment(3); ?>" />
|
||||
<div class="mb-2">
|
||||
<label for="floatingInput"><strong><?= __("Username"); ?></strong></label>
|
||||
<input type="text" name="user_name" class="form-control" id="floatingInput" placeholder="<?= __("Username"); ?>" value="<?php echo $this->input->post('user_name'); ?>" autofocus>
|
||||
<input type="text" name="user_name" class="form-control" id="floatingInput" placeholder="<?php if (file_exists('.demo')) { echo "demo"; } else { echo __("Username"); } ?>" value="<?php echo $this->input->post('user_name'); ?>" autofocus>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label for="floatingPassword"><strong><?= __("Password"); ?></strong></label>
|
||||
<input type="password" name="user_password" class="form-control" id="floatingPassword" placeholder="<?= __("Password"); ?>">
|
||||
<input type="password" name="user_password" class="form-control" id="floatingPassword" placeholder="<?php if (file_exists('.demo')) { echo "demo"; } else { echo __("Password"); } ?>">
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user