Skip to content

Commit

Permalink
Merge pull request #2206 from CityOfPhiladelphia/fix/page-permissions
Browse files Browse the repository at this point in the history
Correct emails addresses and show publish button for page editors
  • Loading branch information
karissademi authored Nov 7, 2024
2 parents 7cc7be7 + 0ccb972 commit 5aff4ec
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jQuery(document).ready(function($){


//If department "contributor" doesn't have access to this post type, hide the publish button, allow publishing action on document pages
if ( ( typenow != 'document') && adminpage.indexOf('post') > -1 ){
if ( ( typenow != 'document') && ( typenow != 'page') && adminpage.indexOf('post') > -1 ){
phila_WP_User.some(
function(v){
if ( v.indexOf(typenow) >= 0) {
Expand All @@ -43,7 +43,7 @@ jQuery(document).ready(function($){

//Hide all category and tag menu items, department authors shouldn't see those.
$('a[href="edit-tags.php?taxonomy=category&post_type=calendar"]').parent().css("display", "none");

var menuIdString = $('#menu-id').text().trim();
var allMenuIDs = menuIdString.split(' ');
var match = document.getElementById( allMenuIDs );
Expand Down Expand Up @@ -95,7 +95,7 @@ $('a[href="edit-tags.php?taxonomy=category&post_type=calendar"]').parent().css("
if ( ( typenow == 'department_page') && adminpage.indexOf('post') > -1 ){
$('[id^=phila_block_id]').parent().parent().hide();
//hide short description and let users know what they can do to change it
$('#phila_meta_desc').after( "<i>To request a change to the short description, email <a href='mailto:oddt@phila.gov'>oddt@phila.gov</a>.</i>" )
$('#phila_meta_desc').after( "<i>To request a change to the short description, email <a href='mailto:websupport@phila.gov'>websupport@phila.gov</a>.</i>" )
}
}

Expand All @@ -117,7 +117,7 @@ $('a[href="edit-tags.php?taxonomy=category&post_type=calendar"]').parent().css("
}

if ( ( typenow == 'programs') && adminpage.indexOf('post') > -1 ){
$('#phila_meta_desc').after( "<i>To request a change to the short description, email <a href='mailto:oddt@phila.gov'>oddt@phila.gov</a>.</i>" )
$('#phila_meta_desc').after( "<i>To request a change to the short description, email <a href='mailto:websupport@phila.gov'>websupport@phila.gov</a>.</i>" )
}

if ( ( typenow == 'post') && adminpage.indexOf('post') > -1 ){
Expand Down Expand Up @@ -155,7 +155,7 @@ $('a[href="edit-tags.php?taxonomy=category&post_type=calendar"]').parent().css("
}
if ( ( typenow == 'department_page') && adminpage.indexOf('post') > -1 ){

$('#wp-module_row_1_col_1_module_row_1_col_1_options_phila_module_row_1_col_1_textarea-wrap').after( "<i>To request a change to 'What we do' content, email <a href='mailto:oddt@phila.gov'>oddt@phila.gov</a>.</i>" )
$('#wp-module_row_1_col_1_module_row_1_col_1_options_phila_module_row_1_col_1_textarea-wrap').after( "<i>To request a change to 'What we do' content, email <a href='mailto:websupport@phila.gov'>websupport@phila.gov</a>.</i>" )

}

Expand Down

0 comments on commit 5aff4ec

Please sign in to comment.