UM register, UM newsletter flow improved
This commit is contained in:
parent
8572a13319
commit
30ce8f65e4
|
@ -140,7 +140,7 @@ $registration = isset($config['pandora_uid']) !== true
|
|||
|| $config['pandora_uid'] == '';
|
||||
|
||||
|
||||
if ($initial) {
|
||||
if ($initial && users_is_admin()) {
|
||||
// Show all forms in order.
|
||||
// 1- Ask for email, timezone, etc. Fullfill alerts and user mail.
|
||||
config_wiz_modal(
|
||||
|
@ -150,7 +150,7 @@ if ($initial) {
|
|||
);
|
||||
}
|
||||
|
||||
if ($registration) {
|
||||
if ($registration && users_is_admin()) {
|
||||
// Prepare registration wizard, not launch. leave control to flow.
|
||||
registration_wiz_modal(
|
||||
false,
|
||||
|
|
|
@ -865,6 +865,18 @@ function show_newsletter_wizard() {
|
|||
var language = $("#language").val();
|
||||
var email_identification = $("#text-email-newsletter").val();
|
||||
|
||||
if (email_identification == '') {
|
||||
msg = '<?php echo __('You must specify an email'); ?>';
|
||||
$('#news_result_content').html(msg);
|
||||
$('#news_result').dialog({
|
||||
buttons: {
|
||||
'Ok': function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
jQuery.post (
|
||||
"ajax.php",
|
||||
{
|
||||
|
@ -910,6 +922,7 @@ function show_newsletter_wizard() {
|
|||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1570,15 +1583,20 @@ function update_manager_register_instance()
|
|||
global $config;
|
||||
|
||||
$email = db_get_value('email', 'tusuario', 'id_user', $config['id_user']);
|
||||
|
||||
$um_config_values = update_manager_get_config_values();
|
||||
|
||||
$params = [
|
||||
'action' => 'newest_package',
|
||||
'license' => $um_config_values['license'],
|
||||
'limit_count' => $um_config_values['limit_count'],
|
||||
'current_package' => $um_config_values['current_update'],
|
||||
'version' => $um_config_values['version'],
|
||||
'build' => $um_config_values['build'],
|
||||
'puid' => $um_config_values['puid'],
|
||||
'email' => $email,
|
||||
'language' => $config['language'],
|
||||
'timezone' => $config['timezone'],
|
||||
'email' => $email,
|
||||
'license' => db_get_value_filter(
|
||||
'value',
|
||||
'tupdate_settings',
|
||||
['key' => 'customer_key']
|
||||
),
|
||||
];
|
||||
|
||||
$result = update_manager_curl_request('new_register', $params);
|
||||
|
|
Loading…
Reference in New Issue