Skip to content

Commit

Permalink
Merge pull request #2109 from CityOfPhiladelphia/remove-forms-template
Browse files Browse the repository at this point in the history
refactor: remove forms and documents, an outdate template
  • Loading branch information
m-atia authored Apr 4, 2024
2 parents ac14bf5 + cdf4e1d commit e10dabc
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function register_template_selection_metabox_departments( $meta_boxes ){
'collection_page_v2' => 'Collection page',
'contact_us_v2' => 'Contact us',
'document_finder_v2' => 'Document finder',
'forms_and_documents_v2' => 'Forms & documents',
'child_index' => 'List of child pages',
'off_site_department' => 'Off-site department',
'our-locations' => 'Our locations',
Expand Down Expand Up @@ -80,7 +79,6 @@ function register_template_selection_metabox_departments( $meta_boxes ){
array('phila_template_select', '=', 'contact_us_v2' ),
array('phila_template_select', '=', 'all_services_v2' ),
array('phila_template_select', '=', 'all_programs_v2' ),
array('phila_template_select', '=', 'forms_and_documents_v2' ),
array('phila_template_select', '=', 'resource_list_v2' ),
array('phila_template_select', '=', 'staff_directory_v2' ),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,6 @@ jQuery(document).ready(function($) {
$('#phila_template_select').click();
}

if ( templateSelect.val() == 'forms_and_documents_v2' ){
$( '[id^=phila_action_panel_]' ).prop('required', true);
}

templateSelect.change(function() {
//set fields based on template selection
if( templateSelect.val() == 'off_site_department'){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,42 +119,6 @@ function phila_register_department_meta_boxes( $meta_boxes ){
),
);

$meta_boxes[] = array(
'title' => 'Forms and Documents',
'pages' => array( 'department_page' ),
'visible' => array( 'phila_template_select', 'forms_and_documents_v2' ),

'fields' => array(
array(
'id' => 'phila_forms_documents_cta',
'type' => 'group',
'clone' => true,
'max_clone' => 4,
'sort_clone' => true,

'fields' => array(
Phila_Gov_Standard_Metaboxes::phila_metabox_title('Call to Action Title', 'phila_action_panel_cta_text_multi' ),
Phila_Gov_Standard_Metaboxes::phila_metabox_textarea('Summary', 'phila_action_panel_summary_multi'),
Phila_Gov_Standard_Metaboxes::phila_metabox_url('Link to Content','phila_action_panel_link_multi'),
array(
'name' => 'Featured Documents (optional)',
'type' => 'heading'
),
array(
'id' => 'phila_featured_documents',
'type' => 'group',
//TODO: Nested clones with max_clone does not work properly with post picker... Find a better solution?
'fields' => array(
Phila_Gov_Standard_Metaboxes::phila_metabox_post_picker('Select Document 1', 'phila_featured_document_item_0', 'document' ),
Phila_Gov_Standard_Metaboxes::phila_metabox_post_picker('Select Document 2', 'phila_featured_document_item_1', 'document' ),
Phila_Gov_Standard_Metaboxes::phila_metabox_post_picker('Select Document 3', 'phila_featured_document_item_2', 'document' ),
),
),
),
),
),
);


$meta_boxes[] = array(
'title' => 'Override page category selection',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ function register_template_selection_metabox_programs( $meta_boxes ){
array( 'phila_template_select', '=', 'contact_us_v2' ),
array( 'phila_template_select', '=', 'covid_guidance' ),
array( 'phila_template_select', '=', 'department_stub' ),
array( 'phila_template_select', '=', 'forms_and_documents_v2' ),
array( 'phila_template_select', '=', 'homepage_v2' ),
array( 'phila_template_select', '=', 'off_site_department' ),
array( 'phila_template_select', '=', 'one_quarter_headings_v2' ),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@
include(locate_template( 'partials/content-phila-row.php' ) );
break;

case 'forms_and_documents_v2':
get_template_part( 'partials/departments/v2/content', 'forms-documents' );
break;

case 'homepage_v2':

$_categories = get_the_category();
Expand Down

0 comments on commit e10dabc

Please sign in to comment.