mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-10 18:09:30 -04:00
Bugfixes
- Commenting out non-working portions of migrations - Fixing company_logo location
This commit is contained in:
committed by
Steve Ireland
parent
99bd8f7acc
commit
f4902002b9
@@ -23,21 +23,22 @@ class Login extends BaseController
|
||||
$migration = new MY_Migration(config('Migrations'));
|
||||
$data = [
|
||||
'validation' => Services::validation(),
|
||||
'latest_version' => $migration->is_latest()
|
||||
'latest_version' => $migration->is_latest(),
|
||||
'application_version' => $migration->get_current_version()
|
||||
];
|
||||
|
||||
if(strtolower($this->request->getMethod()) !== 'post')
|
||||
{
|
||||
// if(strtolower($this->request->getMethod()) != 'post')
|
||||
// {
|
||||
echo view('login', $data);
|
||||
}
|
||||
// }
|
||||
|
||||
if(!$this->validate(['username' => 'required|login_check']))
|
||||
{
|
||||
echo view('login', ['validation' => $this->validator->getErrors()]);
|
||||
}
|
||||
// if(!$this->validate(['username' => 'required|login_check']))
|
||||
// {
|
||||
// echo view('login', ['validation' => $this->validator->getErrors()]);
|
||||
// }
|
||||
}
|
||||
|
||||
redirect('home');
|
||||
// redirect('home');
|
||||
}
|
||||
|
||||
/* public function login_check(string $username): bool
|
||||
|
||||
@@ -899,7 +899,7 @@ class Sales extends Secure_Controller
|
||||
new Token_customer((object)$sale_data)
|
||||
];
|
||||
$text = $this->token_lib->render($text, $tokens);
|
||||
$sale_data['mimetype'] = mime_content_type('uploads/' . config('OSPOS')->settings['company_logo']);
|
||||
$sale_data['mimetype'] = mime_content_type(WRITEPATH . 'uploads/' . config('OSPOS')->settings['company_logo']);
|
||||
|
||||
// generate email attachment: invoice in pdf format
|
||||
$view = Services::renderer();
|
||||
|
||||
@@ -31,6 +31,8 @@ class Load_config
|
||||
$config = config('OSPOS');
|
||||
$appconfig = model(Appconfig::class);
|
||||
|
||||
$config->settings['application_version'] = $migration->get_current_version();
|
||||
|
||||
if (!$migration->is_latest())
|
||||
{
|
||||
$this->session->destroy();
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="container-login container-fluid d-flex flex-column flex-md-row bg-body shadow rounded m-3 p-4 p-md-0">
|
||||
<div class="box-logo d-flex flex-column justify-content-center align-items-center border-end px-4 pb-3 p-md-4">
|
||||
<?php if (config('OSPOS')->settings['company_logo']): ?>
|
||||
<img class="logo w-100" src="<?php echo base_url('uploads/' . config('OSPOS')->settings['company_logo']) ?>" alt="<?php echo lang('Common.logo') . ' ' . config('OSPOS')->settings['company'] ?>">
|
||||
<img class="logo w-100" src="<?php echo 'uploads/' . config('OSPOS')->settings['company_logo'] ?>" alt="<?php echo lang('Common.logo') . ' ' . config('OSPOS')->settings['company'] ?>">
|
||||
<?php else: ?>
|
||||
<svg class="logo text-primary" role="img" viewBox="0 0 308.57998 308.57997" xmlns="http://www.w3.org/2000/svg">
|
||||
<title><?php echo lang('Common.software_title') . ' ' . lang('Common.logo') ?></title>
|
||||
@@ -43,11 +43,11 @@
|
||||
<?php echo $validation->listErrors() ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if(!$latest_version): ?>
|
||||
<?php /*if(!$latest_version):*/ ?>
|
||||
<div class="alert alert-info mt-3">
|
||||
<?php echo lang('Login.migration_needed', ['version' => config('OSPOS')->settings['application_version']]) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php /*endif;*/ ?>
|
||||
<?php if (empty(config('OSPOS')->settings['login_form']) || 'floating_labels'==(config('OSPOS')->settings['login_form'])): ?>
|
||||
<div class="form-floating mt-3">
|
||||
<input class="form-control" id="input-username" name="username" type="text" placeholder="<?php echo lang('Login.username') ?>">
|
||||
|
||||
Reference in New Issue
Block a user