Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
926116e9
authored
2022-03-21 14:19:51 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
events
1 parent
2c5909f7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
com/Notifications/Admin.php
com/Notifications/views/create.php
com/Notifications/views/form.php
com/Notifications/Admin.php
View file @
926116e
...
...
@@ -374,6 +374,7 @@ function create_notification()
$newletter_id
=
-
1
;
$author_id
=
1
;
$slug
=
strtolower
(
$subject
);
$newsletter_type
=
$_POST
[
'newsletter_type'
];
if
(
null
==
get_page_by_title
(
$subject
))
{
...
...
@@ -392,8 +393,12 @@ function create_notification()
)
);
if
(
$post_id
)
{
// https://wpml.org/wpml-hook/wpml_element_type/
wp_set_object_terms
(
$post_id
,
$newsletter_type
,
'newsletter_type'
);
$wpml_element_type
=
apply_filters
(
'wpml_element_type'
,
'newsletter'
);
// get the language info of the original post
...
...
com/Notifications/views/create.php
View file @
926116e
...
...
@@ -475,6 +475,8 @@ endforeach;
jQuery("#tabs").append('<input type="hidden" id="email_style" name="email_style" class="wide-input-field" />');
jQuery("#email_style").val('newsletter');
jQuery("#tabs").append('<input type="hidden" id="newsletter_type" name="newsletter_type" class="wide-input-field" />');
jQuery("#newsletter_type").val('events');
jQuery('.scheduled-extended').show();
jQuery('.trigger-extended').hide();
jQuery(".text_verson").hide();
...
...
@@ -527,6 +529,8 @@ endforeach;
jQuery("#tabs").append('<input type="hidden" id="email_style" name="email_style" class="wide-input-field" />');
jQuery("#email_style").val('newsletter');
jQuery("#tabs").append('<input type="hidden" id="newsletter_type" name="newsletter_type" class="wide-input-field" />');
jQuery("#newsletter_type").val('cbv');
jQuery('.scheduled-extended').show();
jQuery('.trigger-extended').hide();
jQuery(".text_verson").hide();
...
...
com/Notifications/views/form.php
View file @
926116e
...
...
@@ -412,6 +412,13 @@ use Tz\WordPress\UAM;
}
else
if
(
type
==
"newsletter"
||
type
==
"events_newsletter"
)
{
jQuery
(
"#tabs"
).
append
(
'<input type="hidden" id="email_style" name="email_style" class="wide-input-field" />'
);
jQuery
(
"#email_style"
).
val
(
'newsletter'
);
if
(
type
==
"events_newsletter"
)
{
jQuery
(
"#tabs"
).
append
(
'<input type="hidden" id="newsletter_type" name="newsletter_type" class="wide-input-field" />'
);
jQuery
(
"#newsletter_type"
).
val
(
'events'
);
}
else
{
jQuery
(
"#tabs"
).
append
(
'<input type="hidden" id="newsletter_type" name="newsletter_type" class="wide-input-field" />'
);
jQuery
(
"#newsletter_type"
).
val
(
'cbv'
);
}
jQuery
(
'.scheduled-extended'
).
show
();
jQuery
(
'.trigger-extended'
).
hide
();
jQuery
(
".text_verson"
).
hide
();
...
...
Please
register
or
sign in
to post a comment