diff --git a/README.md b/README.md
deleted file mode 100644
index 6715464..0000000
--- a/README.md
+++ /dev/null
@@ -1 +0,0 @@
-# uc-purchasing
diff --git a/purchasing.js b/purchasing.js
new file mode 100644
index 0000000..de7ed5e
--- /dev/null
+++ b/purchasing.js
@@ -0,0 +1,5 @@
+jQuery(document).ready(function($){
+ $('.clearsubmit').click(function(){
+ window.location = window.location.href.split('?')[0];
+ });
+});
\ No newline at end of file
diff --git a/template-class.php b/template-class.php
new file mode 100644
index 0000000..392f6d7
--- /dev/null
+++ b/template-class.php
@@ -0,0 +1,221 @@
+templates = array();
+ $this->plugin_locale = 'pte';
+
+ // Grab the translations for the plugin
+ add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
+
+ // Add a filter to the page attributes metabox to inject our template into the page template cache.
+ add_filter('page_attributes_dropdown_pages_args', array( $this, 'register_project_templates' ) );
+
+ // Add a filter to the save post in order to inject out template into the page cache
+ add_filter('wp_insert_post_data', array( $this, 'register_project_templates' ) );
+
+ // Add a filter to the template include in order to determine if the page has our template assigned and return it's path
+ add_filter('template_include', array( $this, 'view_project_template') );
+
+ // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
+ register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
+
+ // Add your templates to this array.
+ $this->templates = array(
+ 'page-purchasing.php' => __( 'Purchasing', $this->plugin_slug ),
+ //'page-sample2.php' => __( 'Sample2', $this->plugin_slug ),
+ //'page-sample3.php' => __( 'Sample3', $this->plugin_slug ),
+ );
+
+ // adding support for theme templates to be merged and shown in dropdown
+ $templates = wp_get_theme()->get_page_templates();
+ $templates = array_merge( $templates, $this->templates );
+
+ } // end constructor
+
+ /**
+ * Load the plugin text domain for translation.
+ *
+ * @since 1.0.0
+ */
+ public function load_plugin_textdomain() {
+
+ $domain = $this->plugin_slug;
+ $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
+
+ load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
+ load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
+
+ } // end load_plugin_textdomain
+
+ /**
+ * Adds our template to the pages cache in order to trick WordPress
+ * into thinking the template file exists where it doens't really exist.
+ *
+ * @param array $atts The attributes for the page attributes dropdown
+ * @return array $atts The attributes for the page attributes dropdown
+ * @verison 1.0.0
+ * @since 1.0.0
+ */
+ public function register_project_templates( $atts ) {
+
+ // Create the key used for the themes cache
+ $cache_key = 'page_templates-' . md5( get_theme_root() . '/' . get_stylesheet() );
+
+ // Retrieve the cache list. If it doesn't exist, or it's empty prepare an array
+ $templates = wp_cache_get( $cache_key, 'themes' );
+ if ( empty( $templates ) ) {
+ $templates = array();
+ } // end if
+
+ // Since we've updated the cache, we need to delete the old cache
+ wp_cache_delete( $cache_key , 'themes');
+
+ // Now add our template to the list of templates by merging our templates
+ // with the existing templates array from the cache.
+ $templates = array_merge( $templates, $this->templates );
+
+ // Add the modified cache to allow WordPress to pick it up for listing
+ // available templates
+ wp_cache_add( $cache_key, $templates, 'themes', 1800 );
+
+ return $atts;
+
+ } // end register_project_templates
+
+ /**
+ * Checks if the template is assigned to the page
+ *
+ * @version 1.0.0
+ * @since 1.0.0
+ */
+ public function view_project_template( $template ) {
+
+ global $post;
+
+ // If no posts found, return to
+ // avoid "Trying to get property of non-object" error
+ if ( !isset( $post ) ) return $template;
+
+ if ( ! isset( $this->templates[ get_post_meta( $post->ID, '_wp_page_template', true ) ] ) ) {
+ return $template;
+ } // end if
+
+ $file = plugin_dir_path( __FILE__ ) . 'templates/' . get_post_meta( $post->ID, '_wp_page_template', true );
+
+ // Just to be safe, we check if the file exist first
+ if( file_exists( $file ) ) {
+ return $file;
+ } // end if
+
+ return $template;
+
+ } // end view_project_template
+
+ /*--------------------------------------------*
+ * deactivate the plugin
+ *---------------------------------------------*/
+ static function deactivate( $network_wide ) {
+ foreach($this as $value) {
+ page-template-example::delete_template( $value );
+ }
+
+ } // end deactivate
+
+ /*--------------------------------------------*
+ * Delete Templates from Theme
+ *---------------------------------------------*/
+ public function delete_template( $filename ){
+ $theme_path = get_template_directory();
+ $template_path = $theme_path . '/' . $filename;
+ if( file_exists( $template_path ) ) {
+ unlink( $template_path );
+ }
+
+ // we should probably delete the old cache
+ wp_cache_delete( $cache_key , 'themes');
+ }
+
+ /**
+ * Retrieves and returns the slug of this plugin. This function should be called on an instance
+ * of the plugin outside of this class.
+ *
+ * @return string The plugin's slug used in the locale.
+ * @version 1.0.0
+ * @since 1.0.0
+ */
+ public function get_locale() {
+ return $this->plugin_slug;
+ } // end get_locale
+
+} // end class
diff --git a/templates/_notes/dwsync.xml b/templates/_notes/dwsync.xml
new file mode 100644
index 0000000..52c55e5
--- /dev/null
+++ b/templates/_notes/dwsync.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/page-purchasing.php b/templates/page-purchasing.php
new file mode 100644
index 0000000..31b0980
--- /dev/null
+++ b/templates/page-purchasing.php
@@ -0,0 +1,295 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Vendor Characteristic Reference
+
+
+
+ 0){
+ foreach($vc as $c){
+ $urlvc .= 'vc[]='.$c.'&';
+ }
+ }
+ ?>
+
+
+
+ Contract Name |
+ Contract No. |
+ Expires |
+ Vendor Name |
+ Contact Name |
+ Contact Phone |
+ Vendor Characteristics |
+
+
+
+
+
+ 'uc_contract',
+ 'posts_per_page' => -1,
+ 'order' => 'ASC',
+ 'exclude_empty_meta' => false, // alleged patch to include NULL field values
+ 'exclude_empty' => false, // alleged patch to include NULL field values
+ 'relation' => 'OR',
+
+ '_meta_or_title' => $search_for,
+ 'meta_query' => array(
+ 'exclude_empty_meta' => false,
+ 'exclude_empty' => false,
+ 'relation' => 'AND',
+ array(
+ 'value' => $search_for,
+ 'compare' => 'LIKE',
+ ),
+ array(
+ 'key' => 'contract_type',
+ 'value' => get_post_meta( get_the_ID(), 'uc-purchasing', true ),
+ 'compare' => 'LIKE',
+ )
+ ),
+ );
+ if($order_by_column == 'contract_name'){
+ $query_args['orderby'] = 'title';
+ }
+ else {
+ $query_args['orderby'] = 'meta_value';
+ $query_args['meta_key'] = $order_by_column; //'contract_name', etc.
+ }
+ foreach($vc as $c){
+ $query_args['meta_query'][] = array(
+ //
+ // should be able to switch these to just $vc (without the quotes) and LIKE can become
+ // OR vc1 OR vc2 OR vc3... etc. (How would we do IN( CCV, MBE, SBE...)
+ //
+ 'key' => 'contract_vendor_characteristics',
+ 'value' => ( empty($vc) ? 'null' : ('"'.$c.'"') ),
+ 'compare' => ( empty($vc) ? 'NOT EXISTS' : 'LIKE' ),
+ );
+ }
+
+ //
+ // run the query, and show our resulting post data
+ //
+ $my_query = new WP_Query($query_args);
+
+ while( $my_query->have_posts() ){
+ $my_query->the_post();
+
+ // FILE Attachment Link -
+ // We want to create a link using the Contract Number
+ //
+ // Note that we have 2 scenarios here...
+ // One is adding new contract files from the Dashboard.
+ // In this case, we get back an array (File type)
+ // When new contracts are created from the add_contract page
+ // we only get the URL.
+ // So here we check for an array -
+ //
+
+ $file_url = '';
+
+ $file_url = get_field('contract_file');
+
+ if( is_array($file_url)){
+ $file_url = $file_url['url'];
+ }
+ elseif( is_numeric($file_url)){
+ $file_url = wp_get_attachment_url($file_url);
+ }
+
+ ?>
+
+
+
+ |
+
+ |
+
+ |
+
+ |
+ |
+ |
+ |
+
+
+
+
+ '.$caption.'';
+
+ } // foreach
+
+ } // if ! empty checkbox_values
+
+ ?>
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uc-purchasing.php b/uc-purchasing.php
new file mode 100644
index 0000000..e95986e
--- /dev/null
+++ b/uc-purchasing.php
@@ -0,0 +1,694 @@
+ __( 'Contracts' ), // show 'Contracts' in the menu
+ 'menu_name' => __( 'Purchasing' ), // show 'Purchasing' in the dashboard
+ 'singular_name' => __( 'Contract' ), // same as 'name_admin_bar'
+ 'name_admin_bar'=> __( 'Contract' ),
+ 'add_new_item' => __( 'Add New Contract' ),
+ 'add_new' => __( 'Add New Contract' ),
+ 'new_item' => __( 'New Contract' ),
+ 'view_item' => __( 'View Contract' ),
+ 'search_items' => __( 'Search Contracts' ),
+ 'edit_item' => __( 'Edit Contract' ),
+ 'not_found' => __( 'No contracts were found.' ),
+ 'not_found_in_trash' => __( 'No contracts found in trash' ),
+ 'all_items' => __( 'All Contracts' ), // show 'All Contracts' in the menu
+ );
+
+ $supports = array(
+ 'title',
+ 'author',
+ 'thumbnail'
+ );
+
+ $args = array(
+ 'label' => 'Contract',
+ 'labels' => $labels,
+ 'description' => __( 'Purchasing Contract' ),
+ 'public' => true,
+ 'exclude_from_search' => false,
+ 'has_archive' => true, // post type archives?
+ 'show_ui' => true,
+ 'show_in_menu' => true, // false to remove from dashboard menu
+ 'show_in_nav_menus' => true,
+ 'show_in_admin_bar' => true,
+ 'publicly_queryable' => true,
+ 'query_var' => true,
+ 'rewrite' => array( 'slug' => 'contracts' ),
+ 'capability_type' => 'uc_contract',
+ 'hierarchical' => false,
+ 'menu_position' => 36, // 75 - below Tools
+ 'supports' => $supports,
+ 'capabilities' => array(
+ 'edit_post' => 'manage_options',
+ 'read_post' => 'manage_options',
+ 'delete_post' => 'manage_options',
+ 'edit_posts' => 'manage_options',
+ 'edit_others_posts' => 'manage_options',
+ 'delete_posts' => 'manage_options',
+ 'publish_posts' => 'manage_options',
+ 'read_private_posts' => 'manage_options'
+ ),
+ );
+
+ register_post_type( 'uc_contract', $args );
+
+ } // create_post_type
+} // Class
+
+//
+// Create a new instance of UC Purchasing
+//
+
+$uc_purchasing = new UC_Purchasing();
+
+//===============================================================================
+// Contract Archive filter - show a list of contracts on this page
+//===============================================================================
+
+function get_custom_post_type_template( $archive_template ) {
+
+ if ( is_post_type_archive( 'uc_contract' ) ) {
+ $archive_template = dirname( __FILE__ ) . '/templates/archive.php';
+ }
+ return $archive_template;
+}
+add_filter( 'archive_template', 'get_custom_post_type_template' );
+
+//===============================================================================
+// Single contract filter - Not currently used.
+//===============================================================================
+
+function contract_page_template( $template ) {
+
+ if ( is_page( $slug = 'contract' ) ) {
+ //$new_template = locate_template( array( 'single.php' ) );
+ $new_template = dirname( __FILE__ ) . '/templates/single.php';
+ if ( $new_template != '' ) {
+ return $new_template ;
+ }
+ }
+ return $template;
+}
+add_filter( 'template_include', 'contract_page_template', $priority = 99 );
+
+//===============================================================================
+// This filter tells wordpress which URL query params to look for.
+// The URL looks something like this:
+// http://development.wordpress.uconn.edu/john/contracts/?order_by_column=contract_name
+//===============================================================================
+
+function set_parameter_query_vars( $qvars ){
+
+ $qvars[] = 'order_by_column'; // order by column header
+ $qvars[] = 'vendor_characteristic'; // select by icon clicked on
+ $qvars[] = 'search_contracts';
+ $qvars[] = 'ccv';
+ $qvars[] = 'ccv+';
+ $qvars[] = 'ctb';
+ $qvars[] = 'disbe';
+ $qvars[] = 'mbe';
+ $qvars[] = 'sbe';
+ $qvars[] = 'wbe';
+
+ return $qvars;
+}
+add_filter( 'query_vars', 'set_parameter_query_vars' );
+
+//===============================================================================
+// Here we are removing the "View" link from the
+// Dashboard -> Purchasing -> All Contracts page
+//===============================================================================
+
+function remove_row_actions( $actions )
+{
+ if( get_post_type() === 'uc_contract' ){
+ unset( $actions['view'] );
+ }
+ return $actions;
+}
+add_filter( 'post_row_actions', 'remove_row_actions', $priority = 10, $args = 1 );
+
+//===============================================================================
+// Called from create new contract page
+// (data entry via Gravity Form/Contract Add page)
+//===============================================================================
+
+function acf_after_submission( $entry )
+{
+ $post_id = $entry["post_id"];
+ $values = get_post_custom_values( "contract_vendor_characteristics", $post_id );
+ if(is_array($values) && is_serialized( $values[0] )){
+ return;
+ }
+ update_field( "contract_vendor_characteristics", $values, $post_id );
+
+ // update any null field values and set them to empty strings
+
+ $value = get_post_meta( $post_id, 'contract_title', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_title", '', $post_id );
+ }
+
+ $value = get_post_meta( $post_id, 'contract_name', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_name", '', $post_id );
+ }
+
+ $value = get_post_meta( $post_id, 'contract_number', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_number", '', $post_id );
+ }
+
+ $value = get_post_meta( $post_id, 'contract_expires', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_expires", '', $post_id );
+ }
+
+ $value = get_post_meta( $post_id, 'contract_contact_name', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_contact_name", '', $post_id );
+ }
+
+ $value = get_post_meta( $post_id, 'contract_vendor_name', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_vendor_name", '', $post_id );
+ }
+
+ $value = get_post_meta( $post_id, 'contract_contact_phone', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_contact_phone", '', $post_id );
+ }
+
+ $value = get_post_meta( $post_id, 'contract_file', $single = true );
+ if ( empty($value) ){
+ update_field( "contract_file", '', $post_id );
+ }
+}
+add_action( "gform_after_submission", "acf_after_submission", $priority = 10, $args = 1 );
+
+//add_action( 'gform_pre_submission', 'pre_submission_handler' );
+//function pre_submission_handler( $form ) {
+// print_r($_POST); exit;
+//}
+
+function acf_smart_dates($field) {
+ if ($field['value']) {
+ $field['value'] = date('Ymd',strtotime($field['value']));
+ }
+ return $field;
+}
+add_filter('acf/prepare_field/type=date_picker','acf_smart_dates');
+
+add_action( "gform_after_submission", "acf_after_submission_upload_file", $priority = 11, $args = 2 );
+//===============================================================================
+//
+//
+//===============================================================================
+function acf_after_submission_upload_file( $entry, $form ){
+
+ $gf_images_field_id = 9; // the upload field id
+ $acf_field_id = 'contract_file'; // the acf field id
+
+ // get post
+ if( isset( $entry['post_id'] ) ) {
+ $post = get_post( $entry['post_id'] );
+ if( is_null( $post ) ){
+ return;
+ }
+ } else {
+ return;
+ }
+ /*
+ // Clean up images upload and create array for gallery field
+ if( isset( $entry[ $gf_images_field_id ] ) ) {
+ $images = stripslashes( $entry[ $gf_images_field_id ] );
+ $images = json_decode( $images, true );
+ if( !empty( $images ) && is_array( $images ) ) {
+ $gallery = array();
+ foreach( $images as $key => $value ) {
+ // NOTE: this is the other function you need: https://gist.github.com/joshuadavidnelson/164a0a0744f0693d5746
+ if( function_exists( 'jdn_create_image_id' ) )
+ $image_id = jdn_create_image_id( $value, $post->ID );
+
+ if( $image_id ) {
+ $gallery[] = $image_id;
+ }
+ }
+ }
+ }
+ //var_dump( $entry ); exit;
+ */
+
+
+ if( ! empty( $entry[ $gf_images_field_id ] ) ) {
+
+ $image_id = jdn_create_image_id( $entry[ $gf_images_field_id ], $post->ID );
+
+ //update_field( $acf_field_id, $entry[ $gf_images_field_id ], $post->ID );
+
+ update_field( $acf_field_id, $image_id, $post->ID );
+
+ // Updating post
+ wp_update_post( $post );
+
+ }
+}
+function jdn_create_image_id( $image_url, $parent_post_id = null ) {
+
+ // Bail if the image url isn't valid
+ if( empty( $image_url ) || ! esc_url( $image_url ) )
+ return false;
+
+ // Escape the url, just to be save
+ $image_url = esc_url( $image_url );
+
+ // Cache info on the wp uploads dir
+ $wp_upload_dir = wp_upload_dir();
+
+ // get the file path
+ $path = parse_url( $image_url, PHP_URL_PATH );
+ // File base name, e.g. image.jpg
+ $file_base_name = basename( $image_url );
+
+ // Full path, set up to work with a WP in a subdirectory or default location
+ if( site_url() != home_url() ) {
+ $home_path = dirname( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) );
+ } else {
+ $home_path = dirname( dirname( dirname( dirname( __FILE__ ) ) ) );
+ }
+
+ // Remove the trailing slash on the home path
+ $home_path = untrailingslashit( $home_path );
+
+ // Combine the two to get the uploaded file path
+ $uploaded_file_path = $home_path . $path;
+
+ // Check the type of file. We'll use this as the 'post_mime_type'.
+ $filetype = wp_check_filetype( $file_base_name, null );
+
+
+ // error check
+ if( !empty( $filetype ) && is_array( $filetype ) ) {
+
+ // Create attachment title - basically, pull out the text
+ $post_title = preg_replace( '/\.[^.]+$/', '', $file_base_name );
+
+ // Prepare an array of post data for the attachment.
+ $attachment = array(
+ 'guid' => $wp_upload_dir['url'] . '/' . basename( $uploaded_file_path ),
+ 'post_mime_type' => $filetype['type'],
+ 'post_title' => esc_attr( $post_title ),
+ 'post_content' => '',
+ 'post_status' => 'inherit'
+ );
+
+
+ // Set the post parent id if there is one
+ if( ! is_null( $parent_post_id ) && absint( $parent_post_id ) ){
+ $attachment['post_parent'] = absint( $parent_post_id );
+ }
+
+ // Insert the attachment.
+ $attach_id = wp_insert_attachment( $attachment, $uploaded_file_path );
+
+ //Error check
+ if( !is_wp_error( $attach_id ) ) {
+
+ //Generate wp attachment meta data
+ if( file_exists( ABSPATH . 'wp-admin/includes/image.php') && file_exists( ABSPATH . 'wp-admin/includes/media.php') ) {
+ require_once( ABSPATH . 'wp-admin/includes/image.php' );
+ require_once( ABSPATH . 'wp-admin/includes/media.php' );
+ $attach_data = wp_generate_attachment_metadata( $attach_id, $uploaded_file_path );
+ wp_update_attachment_metadata( $attach_id, $attach_data );
+ } // end if file exists check
+
+ } // end if error check
+ return $attach_id;
+ } else {
+ return false;
+ } // end if $filetype
+
+} // end function jdn_create_image_id
+
+
+function fix_attachment_url($url){
+
+ $url = str_replace('sites/'.get_current_blog_id().'/sites','sites',$url);
+
+ return $url;
+}
+add_filter( 'wp_get_attachment_url', 'fix_attachment_url', 10, 1 );
+//===============================================================================
+// Let's redirect the user to the list of contracts, immediately after
+// creating a new Contract
+//===============================================================================
+
+function redirect_to_contract_list( ){
+
+ $contract_list = home_url( '/contracts/?search_contracts=&vendor_characteristic=&order_by_column=contract_name' );
+
+ return array( 'redirect' => $contract_list );
+}
+//add_filter( 'gform_confirmation', 'redirect_to_contract_list', $priority = 10, $args = 0 );
+function purchasing_scripts() {
+ wp_enqueue_script( 'purchasing-js', plugin_dir_url( __FILE__ ) . '/purchasing.js', array( 'jquery' ));
+
+}
+
+add_action( 'wp_enqueue_scripts', 'purchasing_scripts' );
+add_action( 'pre_get_posts', function( $q )
+{
+ if( $title = $q->get( '_meta_or_title' ) )
+ {
+ add_filter( 'get_meta_sql', function( $sql ) use ( $title )
+ {
+ global $wpdb;
+
+ // Only run once:
+ static $nr = 0;
+ if( 0 != $nr++ ) return $sql;
+
+ // Modify WHERE part:
+ $sql['where'] = sprintf(
+ " AND ( %s OR %s ) ",
+ $wpdb->prepare( "{$wpdb->posts}.post_title LIKE '%%%s%%'", $title ),
+ mb_substr( $sql['where'], 5, mb_strlen( $sql['where'] ) )
+ );
+ return $sql;
+ });
+ }
+});
+
+if( function_exists('acf_add_local_field_group') ):
+
+acf_add_local_field_group(array (
+ 'key' => 'group_572b3f3556d00',
+ 'title' => 'Contract',
+ 'fields' => array (
+ array (
+ 'key' => 'field_5784f464937fb',
+ 'label' => 'Contract Type',
+ 'name' => 'contract_type',
+ 'type' => 'text',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'default_value' => '',
+ 'placeholder' => '',
+ 'prepend' => '',
+ 'append' => '',
+ 'maxlength' => '',
+ 'readonly' => 0,
+ 'disabled' => 0,
+ ),
+ array (
+ 'key' => 'field_57308c3c17696',
+ 'label' => 'Contract No.',
+ 'name' => 'contract_number',
+ 'type' => 'text',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'default_value' => '',
+ 'placeholder' => '',
+ 'prepend' => '',
+ 'append' => '',
+ 'maxlength' => '',
+ 'readonly' => 0,
+ 'disabled' => 0,
+ ),
+ array (
+ 'key' => 'field_57308c4e17697',
+ 'label' => 'Expires',
+ 'name' => 'contract_expires',
+ 'type' => 'date_picker',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'display_format' => 'Y/m/d',
+ 'return_format' => 'Y/m/d',
+ 'first_day' => 0,
+ ),
+ array (
+ 'key' => 'field_57308c7317698',
+ 'label' => 'Vendor Name',
+ 'name' => 'contract_vendor_name',
+ 'type' => 'text',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'default_value' => '',
+ 'placeholder' => '',
+ 'prepend' => '',
+ 'append' => '',
+ 'maxlength' => '',
+ 'readonly' => 0,
+ 'disabled' => 0,
+ ),
+ array (
+ 'key' => 'field_57308c8817699',
+ 'label' => 'Contact Name',
+ 'name' => 'contract_contact_name',
+ 'type' => 'text',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'default_value' => '',
+ 'placeholder' => '',
+ 'prepend' => '',
+ 'append' => '',
+ 'maxlength' => '',
+ 'readonly' => 0,
+ 'disabled' => 0,
+ ),
+ array (
+ 'key' => 'field_57308c9b1769a',
+ 'label' => 'Contact Phone',
+ 'name' => 'contract_contact_phone',
+ 'type' => 'text',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'default_value' => '',
+ 'placeholder' => '',
+ 'prepend' => '',
+ 'append' => '',
+ 'maxlength' => '',
+ 'readonly' => 0,
+ 'disabled' => 0,
+ ),
+ array (
+ 'key' => 'field_57308cb41769b',
+ 'label' => 'Vendor Characteristics',
+ 'name' => 'contract_vendor_characteristics',
+ 'type' => 'checkbox',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'choices' => array (
+ 'CCV' => 'CCV',
+ 'CCV+' => 'CCV+',
+ 'CTB' => 'CTB',
+ 'DISBE' => 'DISBE',
+ 'MBE' => 'MBE',
+ 'SBE' => 'SBE',
+ 'WBE' => 'WBE',
+ ),
+ 'default_value' => array (
+ ),
+ 'layout' => 'vertical',
+ 'toggle' => 0,
+ ),
+ array (
+ 'key' => 'field_57360a43b7bfe',
+ 'label' => 'Contract File',
+ 'name' => 'contract_file',
+ 'type' => 'file',
+ 'instructions' => '',
+ 'required' => 0,
+ 'conditional_logic' => 0,
+ 'wrapper' => array (
+ 'width' => '',
+ 'class' => '',
+ 'id' => '',
+ ),
+ 'return_format' => 'url',
+ 'library' => 'all',
+ 'min_size' => '',
+ 'max_size' => '',
+ 'mime_types' => '',
+ ),
+ ),
+ 'location' => array (
+ array (
+ array (
+ 'param' => 'post_type',
+ 'operator' => '==',
+ 'value' => 'uc_contract',
+ ),
+ ),
+ ),
+ 'menu_order' => 0,
+ 'position' => 'normal',
+ 'style' => 'default',
+ 'label_placement' => 'top',
+ 'instruction_placement' => 'label',
+ 'hide_on_screen' => '',
+ 'active' => 1,
+ 'description' => '',
+));
+
+endif;
+//===============================================================================
+?>
\ No newline at end of file