mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Le add a birth date on user profile
This commit is contained in:
parent
010579d72b
commit
f0ec84e7a0
12 changed files with 251 additions and 124 deletions
|
@ -5,7 +5,7 @@ if (file_exists("../videos/configuration.php")) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$installationVersion = "14.1";
|
$installationVersion = "14.2";
|
||||||
|
|
||||||
require_once '../objects/functionSecurity.php';
|
require_once '../objects/functionSecurity.php';
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ CREATE TABLE IF NOT EXISTS `users` (
|
||||||
`extra_info` TEXT NULL DEFAULT NULL,
|
`extra_info` TEXT NULL DEFAULT NULL,
|
||||||
`phone` VARCHAR(255) NULL DEFAULT NULL,
|
`phone` VARCHAR(255) NULL DEFAULT NULL,
|
||||||
`is_company` TINYINT(4) NULL DEFAULT NULL,
|
`is_company` TINYINT(4) NULL DEFAULT NULL,
|
||||||
|
`birth_date` DATE NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `user_UNIQUE` (`user` ASC))
|
UNIQUE INDEX `user_UNIQUE` (`user` ASC))
|
||||||
ENGINE = InnoDB;
|
ENGINE = InnoDB;
|
||||||
|
|
|
@ -250,6 +250,7 @@ $object->canStream = User::canStream();
|
||||||
$object->redirectUri = @$_POST['redirectUri'];
|
$object->redirectUri = @$_POST['redirectUri'];
|
||||||
$object->embedChatUrl = '';
|
$object->embedChatUrl = '';
|
||||||
$object->embedChatUrlMobile = '';
|
$object->embedChatUrlMobile = '';
|
||||||
|
$object->age = User::getAge();
|
||||||
|
|
||||||
//_error_log("login.json.php check chat2");
|
//_error_log("login.json.php check chat2");
|
||||||
if (AVideoPlugin::isEnabledByName('Chat2') && method_exists('Chat2', 'getChatRoomLink')) {
|
if (AVideoPlugin::isEnabledByName('Chat2') && method_exists('Chat2', 'getChatRoomLink')) {
|
||||||
|
|
|
@ -58,6 +58,7 @@ class User
|
||||||
private $extra_info;
|
private $extra_info;
|
||||||
private $phone;
|
private $phone;
|
||||||
private $is_company;
|
private $is_company;
|
||||||
|
private $birth_date;
|
||||||
public static $DOCUMENT_IMAGE_TYPE = "Document Image";
|
public static $DOCUMENT_IMAGE_TYPE = "Document Image";
|
||||||
public static $channel_artTV = 'tv';
|
public static $channel_artTV = 'tv';
|
||||||
public static $channel_artDesktopMax = 'desktop_max';
|
public static $channel_artDesktopMax = 'desktop_max';
|
||||||
|
@ -123,6 +124,17 @@ class User
|
||||||
$this->phone = $phone;
|
$this->phone = $phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBirth_date()
|
||||||
|
{
|
||||||
|
return $this->birth_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setBirth_date($birth_date): void
|
||||||
|
{
|
||||||
|
$time = strtotime($birth_date);
|
||||||
|
$this->birth_date = date('Y/m/d', $time);
|
||||||
|
}
|
||||||
|
|
||||||
public function getEmail()
|
public function getEmail()
|
||||||
{
|
{
|
||||||
return $this->email;
|
return $this->email;
|
||||||
|
@ -799,6 +811,11 @@ if (typeof gtag !== \"function\") {
|
||||||
$values[] = $this->canViewChart;
|
$values[] = $this->canViewChart;
|
||||||
$sql .= "canViewChart = ?, ";
|
$sql .= "canViewChart = ?, ";
|
||||||
}
|
}
|
||||||
|
if (!empty($this->birth_date)) {
|
||||||
|
$formats .= "s";
|
||||||
|
$values[] = $this->birth_date;
|
||||||
|
$sql .= "birth_date = ?, ";
|
||||||
|
}
|
||||||
$formats .= "ssssssisssssssssssi";
|
$formats .= "ssssssisssssssssssi";
|
||||||
$values[] = $this->status;
|
$values[] = $this->status;
|
||||||
$values[] = $this->photoURL;
|
$values[] = $this->photoURL;
|
||||||
|
@ -1340,6 +1357,39 @@ if (typeof gtag !== \"function\") {
|
||||||
return !empty($_SESSION['user']['isAdmin']);
|
return !empty($_SESSION['user']['isAdmin']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getBirthIfIsSet($users_id = 0)
|
||||||
|
{
|
||||||
|
$birth_date = '';
|
||||||
|
if (!empty($users_id)) {
|
||||||
|
$user = new User($users_id);
|
||||||
|
$birth_date = $user->getBirth_date();
|
||||||
|
} else {
|
||||||
|
self::recreateLoginFromCookie();
|
||||||
|
$birth_date = $_SESSION['user']['birth_date'];
|
||||||
|
}
|
||||||
|
return $birth_date;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getAge($users_id = 0)
|
||||||
|
{
|
||||||
|
$birth_date = self::getBirthIfIsSet($users_id);
|
||||||
|
if (empty($birth_date)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
$birth_date = new DateTime($birth_date);
|
||||||
|
$current_date = new DateTime('now');
|
||||||
|
$age = $current_date->diff($birth_date)->y;
|
||||||
|
if($age<0){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return $age;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function isOver18($users_id = 0): bool
|
||||||
|
{
|
||||||
|
return self::getAge($users_id) > 18;
|
||||||
|
}
|
||||||
|
|
||||||
public static function isACompany($users_id = 0)
|
public static function isACompany($users_id = 0)
|
||||||
{
|
{
|
||||||
global $_is_a_company;
|
global $_is_a_company;
|
||||||
|
|
|
@ -51,6 +51,7 @@ $user->setStatus($_POST['status']);
|
||||||
$user->setEmailVerified($_POST['isEmailVerified']);
|
$user->setEmailVerified($_POST['isEmailVerified']);
|
||||||
$user->setAnalyticsCode($_POST['analyticsCode']);
|
$user->setAnalyticsCode($_POST['analyticsCode']);
|
||||||
$user->setPhone($_POST['phone']);
|
$user->setPhone($_POST['phone']);
|
||||||
|
$user->setBirth_date($_POST['birth']);
|
||||||
|
|
||||||
_error_log("userAddNew.json.php: set channel name = ({$_POST['channelName']})");
|
_error_log("userAddNew.json.php: set channel name = ({$_POST['channelName']})");
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ $user->setAbout($_POST['about']);
|
||||||
$user->setAnalyticsCode($_POST['analyticsCode']);
|
$user->setAnalyticsCode($_POST['analyticsCode']);
|
||||||
$user->setDonationLink($_POST['donationLink']);
|
$user->setDonationLink($_POST['donationLink']);
|
||||||
$user->setPhone($_POST['phone']);
|
$user->setPhone($_POST['phone']);
|
||||||
|
$user->setBirth_date($_POST['birth_date']);
|
||||||
$unique = $user->setChannelName($_POST['channelName']);
|
$unique = $user->setChannelName($_POST['channelName']);
|
||||||
if (!$unique) {
|
if (!$unique) {
|
||||||
$obj->msg = __("Channel name already exists");
|
$obj->msg = __("Channel name already exists");
|
||||||
|
|
|
@ -1841,7 +1841,6 @@ if (!class_exists('Video')) {
|
||||||
_error_log("Video::updateLikesDislikes: id={$row['id']}");
|
_error_log("Video::updateLikesDislikes: id={$row['id']}");
|
||||||
$row['dislikes'] = self::updateLikesDislikes($row['id'], 'dislikes');
|
$row['dislikes'] = self::updateLikesDislikes($row['id'], 'dislikes');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($row['duration_in_seconds']) && in_array($row['type'], $allowedDurationTypes)) {
|
if (empty($row['duration_in_seconds']) && in_array($row['type'], $allowedDurationTypes)) {
|
||||||
_error_log("Video::duration_in_seconds: id={$row['id']} {$row['duration']} {$row['type']}");
|
_error_log("Video::duration_in_seconds: id={$row['id']} {$row['duration']} {$row['type']}");
|
||||||
$row['duration_in_seconds'] = self::updateDurationInSeconds($row['id'], $row['duration']);
|
$row['duration_in_seconds'] = self::updateDurationInSeconds($row['id'], $row['duration']);
|
||||||
|
@ -1996,6 +1995,7 @@ if (!class_exists('Video')) {
|
||||||
$row['views_count_short'] = number_format_short($row['views_count']);
|
$row['views_count_short'] = number_format_short($row['views_count']);
|
||||||
TimeLogEnd($timeLogName, __LINE__, $TimeLogLimit);
|
TimeLogEnd($timeLogName, __LINE__, $TimeLogLimit);
|
||||||
$row['identification'] = User::getNameIdentificationById(!empty($row['users_id_company']) ? $row['users_id_company'] : $row['users_id']);
|
$row['identification'] = User::getNameIdentificationById(!empty($row['users_id_company']) ? $row['users_id_company'] : $row['users_id']);
|
||||||
|
$row['age'] = User::getAge($row['users_id']);
|
||||||
|
|
||||||
if (empty($row['externalOptions'])) {
|
if (empty($row['externalOptions'])) {
|
||||||
$row['externalOptions'] = json_encode(['videoStartSeconds' => '00:00:00']);
|
$row['externalOptions'] = json_encode(['videoStartSeconds' => '00:00:00']);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
require_once dirname(__FILE__) . '/../../videos/configuration.php';
|
require_once dirname(__FILE__) . '/../../videos/configuration.php';
|
||||||
|
$global['doNotLoadPlayer'] = 1;
|
||||||
setIsConfirmationPage();
|
setIsConfirmationPage();
|
||||||
$images = Video::getImageFromFilename($video['filename']);
|
$images = Video::getImageFromFilename($video['filename']);
|
||||||
$img = $images->poster;
|
$img = $images->poster;
|
||||||
|
@ -11,21 +11,10 @@ $imgw = 1280;
|
||||||
$imgh = 720;
|
$imgh = 720;
|
||||||
$metaDescription = $title = getSEOTitle($video['title']);
|
$metaDescription = $title = getSEOTitle($video['title']);
|
||||||
$ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false, false);
|
$ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false, false);
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
$_page = new Page(array('Confirm Rating'));
|
||||||
<html lang="<?php echo getLanguage(); ?>">
|
|
||||||
<head>
|
|
||||||
<title><?php echo __("Confirm Rating") . $config->getPageTitleSeparator() . $title; ?></title>
|
|
||||||
<?php
|
|
||||||
include $global['systemRootPath'] . 'view/include/head.php';
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
body {
|
|
||||||
padding-top: 0;
|
|
||||||
}
|
|
||||||
footer{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#bg {
|
#bg {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -33,28 +22,20 @@ $ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false, false
|
||||||
background-image: url('<?php echo $images->poster; ?>');
|
background-image: url('<?php echo $images->poster; ?>');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
filter: alpha(opacity=30); /* For IE8 and earlier */
|
filter: alpha(opacity=30);
|
||||||
|
z-index: -1;
|
||||||
|
/* For IE8 and earlier */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
|
||||||
<body class="<?php echo $global['bodyClass']; ?>">
|
|
||||||
<?php
|
|
||||||
//include $global['systemRootPath'] . 'view/include/navbar.php';
|
|
||||||
?>
|
|
||||||
<div id="bg"></div>
|
<div id="bg"></div>
|
||||||
|
<div class="container">
|
||||||
<!-- Modal -->
|
<div class="panel panel-danger">
|
||||||
<div id="myModal" class="modal fade in" role="dialog">
|
<div class="panel-heading">
|
||||||
<div class="modal-dialog">
|
<h1>
|
||||||
|
|
||||||
<!-- Modal content-->
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h2 class="modal-title">
|
|
||||||
<?php echo $video['title']; ?>
|
<?php echo $video['title']; ?>
|
||||||
</h2>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<?php
|
<?php
|
||||||
|
@ -71,22 +52,67 @@ $ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false, false
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-footer">
|
||||||
<div class="modal-footer" >
|
<?php
|
||||||
<a href="<?php echo $_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], "?") === false ? "?" : "&"; ?>rrating=1" class="btn btn-success pull-right"><i class="fas fa-check-circle"></i> <?php echo __("Confirm"); ?></a>
|
$canAccept = true;
|
||||||
<a href="<?php echo getHomePageURL(); ?>" class="btn btn-danger pull-right"><i class="fas fa-times-circle"></i> <?php echo __("Cancel"); ?></a>
|
if ($video['rrating'] == 'ma') { // if is mature
|
||||||
|
if (!User::isLogged()) {
|
||||||
|
$canAccept = false;
|
||||||
|
?>
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
<strong><?php echo __('Sign In Required'); ?></strong>
|
||||||
|
<p><?php echo __('This content is for viewers 18+'); ?></p>
|
||||||
|
<a href="<?php echo $global['webSiteRootURL']; ?>user" class="btn btn-primary btn-block">
|
||||||
|
<i class="fa-solid fa-right-to-bracket"></i>
|
||||||
|
<?php echo __('Sign In'); ?>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
|
$birth_date = User::getBirthIfIsSet();
|
||||||
|
if (empty($birth_date)) {
|
||||||
|
$canAccept = false;
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<strong><?php echo __('Age Confirmation Needed'); ?></strong>
|
||||||
|
<p><?php echo __('Please update your birth date in your profile to access this content'); ?></p>
|
||||||
|
<a href="<?php echo $global['webSiteRootURL']; ?>user" class="btn btn-primary btn-block">
|
||||||
|
<i class="fa-solid fa-clipboard-check"></i>
|
||||||
|
<?php echo __('Update Profile'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
} else if (!User::isOver18()) {
|
||||||
|
$canAccept = false;
|
||||||
|
?>
|
||||||
|
<div class="alert alert-info">
|
||||||
|
<strong><?php echo __('Content Not Available'); ?></strong>
|
||||||
|
<p><?php echo __('This content is restricted to viewers 18 and over'); ?></p>
|
||||||
|
<a href="<?php echo $global['webSiteRootURL']; ?>user" class="btn btn-primary btn-block">
|
||||||
|
<i class="fa-solid fa-house"></i>
|
||||||
|
<?php echo __('Home'); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($canAccept) {
|
||||||
|
?>
|
||||||
|
<div class="btn-group btn-group-justified">
|
||||||
|
<a href="<?php echo getHomePageURL(); ?>" class="btn btn-danger">
|
||||||
|
<i class="fas fa-times-circle"></i> <?php echo __("Cancel"); ?>
|
||||||
|
</a>
|
||||||
|
<a href="<?php echo $_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], "?") === false ? "?" : "&"; ?>rrating=1" class="btn btn-success">
|
||||||
|
<i class="fas fa-check-circle"></i> <?php echo __("Confirm"); ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
include $global['systemRootPath'] . 'view/include/footer.php';
|
$_page->print();
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
|
||||||
$(window).on('load', function () {
|
|
||||||
$('#myModal').modal('show');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
3
updatedb/updateDb.v14.2.sql
Normal file
3
updatedb/updateDb.v14.2.sql
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
ALTER TABLE `users` ADD COLUMN `birth_date` DATE NULL DEFAULT NULL;
|
||||||
|
|
||||||
|
UPDATE configurations SET version = '14.2', modified = now() WHERE id = 1;
|
|
@ -2704,7 +2704,7 @@ function isUserOnline(users_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isReadyToCheckIfIsOnline() {
|
function isReadyToCheckIfIsOnline() {
|
||||||
return !empty(users_id_online);
|
return typeof users_id_online !== 'undefined' && !empty(users_id_online);
|
||||||
}
|
}
|
||||||
|
|
||||||
var addAtMentionActive = false;
|
var addAtMentionActive = false;
|
||||||
|
|
|
@ -105,27 +105,58 @@ foreach ($userGroups as $value) {
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form class="form-compact" id="updateUserForm" onsubmit="">
|
<form class="form-compact" id="updateUserForm" onsubmit="">
|
||||||
<input type="hidden" id="inputUserId">
|
<input type="hidden" id="inputUserId">
|
||||||
<label for="inputUser" class="sr-only"><?php echo __("User"); ?></label>
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<label for="inputUser"><?php echo __("User"); ?></label>
|
||||||
<input type="text" id="inputUser" class="form-control first" placeholder="<?php echo __("User"); ?>" autofocus required="required" data-toggle="tooltip" title="<?php echo __('User'); ?>">
|
<input type="text" id="inputUser" class="form-control first" placeholder="<?php echo __("User"); ?>" autofocus required="required" data-toggle="tooltip" title="<?php echo __('User'); ?>">
|
||||||
<?php
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<label for="inputPassword"><?php echo __("Password"); ?></label><?php
|
||||||
getInputPassword("inputPassword", 'class="form-control" required="required" autocomplete="off"', __("Password"));
|
getInputPassword("inputPassword", 'class="form-control" required="required" autocomplete="off"', __("Password"));
|
||||||
?>
|
?>
|
||||||
<label for="inputEmail" class="sr-only"><?php echo __("E-mail"); ?></label>
|
</div>
|
||||||
<input type="email" id="inputEmail" class="form-control" placeholder="<?php echo __("E-mail"); ?>" data-toggle="tooltip" title="<?php echo __('E-mail'); ?>">
|
<div class="col-sm-6">
|
||||||
<label for="inputName" class="sr-only"><?php echo __("Name"); ?></label>
|
<label for="inputName">
|
||||||
|
<?php echo __("Name"); ?>
|
||||||
|
</label>
|
||||||
<input type="text" id="inputName" class="form-control " placeholder="<?php echo __("Name"); ?>" data-toggle="tooltip" title="<?php echo __('Name'); ?>">
|
<input type="text" id="inputName" class="form-control " placeholder="<?php echo __("Name"); ?>" data-toggle="tooltip" title="<?php echo __('Name'); ?>">
|
||||||
<label for="inputChannelName" class="sr-only"><?php echo __("Channel Name"); ?></label>
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<label for="inputEmail">
|
||||||
|
<?php echo __("E-mail"); ?>
|
||||||
|
</label>
|
||||||
|
<input type="email" id="inputEmail" class="form-control" placeholder="<?php echo __("E-mail"); ?>" data-toggle="tooltip" title="<?php echo __('E-mail'); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<label for="inputChannelName">
|
||||||
|
<?php echo __("Channel Name"); ?>
|
||||||
|
</label>
|
||||||
<input type="text" id="inputChannelName" class="form-control" placeholder="<?php echo __("Channel Name"); ?>" data-toggle="tooltip" title="<?php echo __('Channel Name'); ?>">
|
<input type="text" id="inputChannelName" class="form-control" placeholder="<?php echo __("Channel Name"); ?>" data-toggle="tooltip" title="<?php echo __('Channel Name'); ?>">
|
||||||
<label for="inputPhone" class="sr-only"><?php echo __("Phone"); ?></label>
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<label for="inputBirth">
|
||||||
|
<?php echo __("Birth"); ?>
|
||||||
|
</label>
|
||||||
|
<input type="date" id="inputBirth" class="form-control" placeholder="<?php echo __("Birth"); ?>" data-toggle="tooltip" title="<?php echo __('Birth'); ?>">
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<label for="inputPhone">
|
||||||
|
<?php echo __("Phone"); ?>
|
||||||
|
</label>
|
||||||
<input type="text" id="inputPhone" class="form-control" placeholder="<?php echo __("Phone"); ?>" data-toggle="tooltip" title="<?php echo __('Phone'); ?>">
|
<input type="text" id="inputPhone" class="form-control" placeholder="<?php echo __("Phone"); ?>" data-toggle="tooltip" title="<?php echo __('Phone'); ?>">
|
||||||
<label for="inputAnalyticsCode" class="sr-only"><?php echo __("Analytics Code"); ?></label>
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<label for="inputAnalyticsCode">
|
||||||
|
<?php echo __("Analytics Code"); ?>
|
||||||
|
</label>
|
||||||
<input type="text" id="inputAnalyticsCode" class="form-control last" placeholder="Google Analytics Code: UA-123456789-1" data-toggle="tooltip" title="<?php echo __('Analytics Code'); ?>">
|
<input type="text" id="inputAnalyticsCode" class="form-control last" placeholder="Google Analytics Code: UA-123456789-1" data-toggle="tooltip" title="<?php echo __('Analytics Code'); ?>">
|
||||||
<small>Do not paste the full javascript code, paste only the gtag id</small>
|
<small>Do not paste the full javascript code, paste only the gtag id</small>
|
||||||
<br>
|
</div>
|
||||||
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if (empty($advancedCustomUser->disableCompanySignUp) || !empty($advancedCustomUser->enableAffiliation)) {
|
if (empty($advancedCustomUser->disableCompanySignUp) || !empty($advancedCustomUser->enableAffiliation)) {
|
||||||
?>
|
?>
|
||||||
<label for="is_company" class="sr-only"><?php echo __("is a Company"); ?></label>
|
<label for="is_company"><?php echo __("is a Company"); ?></label>
|
||||||
<select name="is_company" id="is_company" class="form-control last">
|
<select name="is_company" id="is_company" class="form-control last">
|
||||||
<?php
|
<?php
|
||||||
foreach (User::$is_company_status as $key => $value) {
|
foreach (User::$is_company_status as $key => $value) {
|
||||||
|
@ -337,6 +368,7 @@ foreach ($userGroups as $value) {
|
||||||
$('#inputName').val('');
|
$('#inputName').val('');
|
||||||
$('#inputChannelName').val('');
|
$('#inputChannelName').val('');
|
||||||
$('#inputPhone').val('');
|
$('#inputPhone').val('');
|
||||||
|
$('#inputBirth').val('');
|
||||||
$('#inputAnalyticsCode').val('');
|
$('#inputAnalyticsCode').val('');
|
||||||
$('#is_company').val(0);
|
$('#is_company').val(0);
|
||||||
$('#isAdmin').prop('checked', false);
|
$('#isAdmin').prop('checked', false);
|
||||||
|
@ -379,6 +411,7 @@ foreach ($userGroups as $value) {
|
||||||
"email": $('#inputEmail').val(),
|
"email": $('#inputEmail').val(),
|
||||||
"name": $('#inputName').val(),
|
"name": $('#inputName').val(),
|
||||||
"phone": $('#inputPhone').val(),
|
"phone": $('#inputPhone').val(),
|
||||||
|
"birth": $('#inputBirth').val(),
|
||||||
"channelName": $('#inputChannelName').val(),
|
"channelName": $('#inputChannelName').val(),
|
||||||
"analyticsCode": $('#inputAnalyticsCode').val(),
|
"analyticsCode": $('#inputAnalyticsCode').val(),
|
||||||
"isAdmin": $('#isAdmin').is(':checked'),
|
"isAdmin": $('#isAdmin').is(':checked'),
|
||||||
|
@ -489,6 +522,7 @@ foreach ($userGroups as $value) {
|
||||||
$('#inputName').val(row.name);
|
$('#inputName').val(row.name);
|
||||||
$('#inputChannelName').val(row.channelName);
|
$('#inputChannelName').val(row.channelName);
|
||||||
$('#inputPhone').val(row.phone);
|
$('#inputPhone').val(row.phone);
|
||||||
|
$('#inputBirth').val(row.birth_date);
|
||||||
$('#inputAnalyticsCode').val(row.analyticsCode);
|
$('#inputAnalyticsCode').val(row.analyticsCode);
|
||||||
$('.userGroups').prop('checked', false);
|
$('.userGroups').prop('checked', false);
|
||||||
$('.usergroupsLi').removeClass('dynamic');
|
$('.usergroupsLi').removeClass('dynamic');
|
||||||
|
|
|
@ -33,6 +33,24 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-4 control-label"><?php echo __("New Password"); ?></label>
|
||||||
|
<div class="col-md-8 inputGroupContainer">
|
||||||
|
<?php
|
||||||
|
getInputPassword("inputPassword", 'class="form-control" autocomplete="off"', __("New Password"));
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-4 control-label"><?php echo __("Confirm New Password"); ?></label>
|
||||||
|
<div class="col-md-8 inputGroupContainer">
|
||||||
|
<?php
|
||||||
|
getInputPassword("inputPasswordConfirm", 'class="form-control" autocomplete="off"', __("Confirm New Password"));
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-4 control-label"><?php echo __("E-mail"); ?></label>
|
<label class="col-md-4 control-label"><?php echo __("E-mail"); ?></label>
|
||||||
<div class="col-md-6 inputGroupContainer">
|
<div class="col-md-6 inputGroupContainer">
|
||||||
|
@ -95,23 +113,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-4 control-label"><?php echo __("New Password"); ?></label>
|
<label class="col-md-4 control-label"><?php echo __("Birth"); ?></label>
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<?php
|
<div class="input-group">
|
||||||
getInputPassword("inputPassword", 'class="form-control" autocomplete="off"', __("New Password"));
|
<span class="input-group-addon"><i class="fa-solid fa-cake-candles"></i></span>
|
||||||
?>
|
<input id="inputBirth" placeholder="<?php echo __("Birth"); ?>" class="form-control" type="date" value="<?php echo $user->getBirth_date(); ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="col-md-4 control-label"><?php echo __("Confirm New Password"); ?></label>
|
|
||||||
<div class="col-md-8 inputGroupContainer">
|
|
||||||
<?php
|
|
||||||
getInputPassword("inputPasswordConfirm", 'class="form-control" autocomplete="off"', __("Confirm New Password"));
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group <?php
|
<div class="form-group <?php
|
||||||
|
@ -234,6 +243,7 @@
|
||||||
"pass": $('#inputPassword').val(),
|
"pass": $('#inputPassword').val(),
|
||||||
"email": $('#inputEmail').val(),
|
"email": $('#inputEmail').val(),
|
||||||
"phone": $('#phone').val(),
|
"phone": $('#phone').val(),
|
||||||
|
"birth_date": $('#inputBirth').val(),
|
||||||
"name": $('#inputName').val(),
|
"name": $('#inputName').val(),
|
||||||
"about": content,
|
"about": content,
|
||||||
"channelName": $('#channelName').val(),
|
"channelName": $('#channelName').val(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue