mirror of https://github.com/itflow-org/itflow
Client Portal can now be enabled or disabled in settings > Modules > Enable Client Portal, it is enabled by default
This commit is contained in:
parent
8085f7cd90
commit
25f85486d4
|
|
@ -183,7 +183,7 @@
|
|||
<input type="text" class="form-control" name="pin" placeholder="Security code or pin">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($config_client_portal_enable == 1) { ?>
|
||||
<div class="form-group">
|
||||
<label>Login</label>
|
||||
<div class="input-group">
|
||||
|
|
@ -197,6 +197,7 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<? php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($config_client_portal_enable == 1) { ?>
|
||||
<div class="form-group">
|
||||
<label>Login</label>
|
||||
<div class="input-group">
|
||||
|
|
@ -192,18 +193,18 @@
|
|||
|
||||
<?php if ($auth_method == "local") { ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" data-toggle="password" name="contact_password" placeholder="Leave blank for no change" autocomplete="new-password">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-key"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" data-toggle="password" name="contact_password" placeholder="Leave blank for no change" autocomplete="new-password">
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-eye"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
|
@ -212,6 +213,8 @@
|
|||
<label class="form-check-label">Send user e-mail with login details?</label>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="pills-photo<?php echo $contact_id; ?>">
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ $config_stripe_account = $row['config_stripe_account'];
|
|||
$config_module_enable_itdoc = intval($row['config_module_enable_itdoc']);
|
||||
$config_module_enable_ticketing = intval($row['config_module_enable_ticketing']);
|
||||
$config_module_enable_accounting = intval($row['config_module_enable_accounting']);
|
||||
$config_client_portal_enable = intval($row['config_client_portal_enable']);
|
||||
|
||||
// Login key
|
||||
$config_login_key_required = $row['config_login_key_required'];
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ $config_smtp_password = $row['config_smtp_password'];
|
|||
$config_mail_from_email = $row['config_mail_from_email'];
|
||||
$config_mail_from_name = $row['config_mail_from_name'];
|
||||
|
||||
// Client Portal Enabled
|
||||
$config_client_portal_enable = intval($row['config_client_portal_enable']);
|
||||
|
||||
// Login key (if setup)
|
||||
$config_login_key_required = $row['config_login_key_required'];
|
||||
$config_login_key_secret = $row['config_login_key_secret'];
|
||||
|
|
@ -290,9 +293,11 @@ if (isset($_POST['login'])) {
|
|||
|
||||
<button type="submit" class="btn btn-primary btn-block mb-3" name="login">Sign In</button>
|
||||
|
||||
<?php if($config_client_portal_enable == 1){ ?>
|
||||
<hr><br>
|
||||
|
||||
<h4>Looking for the <a href="portal">Client Portal?<a/></h4>
|
||||
<?php } ?>
|
||||
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ if (!isset($_SESSION)) {
|
|||
session_start();
|
||||
}
|
||||
|
||||
// Check to see if client portal is enabled
|
||||
if($config_client_portal_enable == 0) {
|
||||
echo "Client Portal is Disabled";
|
||||
exit();
|
||||
}
|
||||
|
||||
$ip = sanitizeInput(getIP());
|
||||
$user_agent = sanitizeInput($_SERVER['HTTP_USER_AGENT']);
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ if (empty($config_smtp_host)) {
|
|||
exit();
|
||||
}
|
||||
|
||||
// Check to see if client portal is enabled
|
||||
if($config_client_portal_enable == 0) {
|
||||
echo "Client Portal is Disabled";
|
||||
exit();
|
||||
}
|
||||
|
||||
if (!isset($_SESSION)) {
|
||||
// HTTP Only cookies
|
||||
ini_set("session.cookie_httponly", true);
|
||||
|
|
|
|||
3
post.php
3
post.php
|
|
@ -827,8 +827,9 @@ if(isset($_POST['edit_module_settings'])){
|
|||
$config_module_enable_itdoc = intval($_POST['config_module_enable_itdoc']);
|
||||
$config_module_enable_ticketing = intval($_POST['config_module_enable_ticketing']);
|
||||
$config_module_enable_accounting = intval($_POST['config_module_enable_accounting']);
|
||||
$config_client_portal_enable = intval($_POST['config_client_portal_enable']);
|
||||
|
||||
mysqli_query($mysqli,"UPDATE settings SET config_module_enable_itdoc = $config_module_enable_itdoc, config_module_enable_ticketing = $config_module_enable_ticketing, config_module_enable_accounting = $config_module_enable_accounting WHERE company_id = 1");
|
||||
mysqli_query($mysqli,"UPDATE settings SET config_module_enable_itdoc = $config_module_enable_itdoc, config_module_enable_ticketing = $config_module_enable_ticketing, config_module_enable_accounting = $config_module_enable_accounting, config_client_portal_enable = $config_client_portal_enable WHERE company_id = 1");
|
||||
|
||||
//Logging
|
||||
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Settings', log_action = 'Modify', log_description = '$session_name modified module settings', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id");
|
||||
|
|
|
|||
|
|
@ -29,6 +29,13 @@ require_once("inc_all_settings.php"); ?>
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input" name="config_client_portal_enable" <?php if ($config_client_portal_enable == 1) { echo "checked"; } ?> value="1" id="customSwitch4">
|
||||
<label class="custom-control-label" for="customSwitch4">Enable Client Portal</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<button type="submit" name="edit_module_settings" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue