Created
April 1, 2015 18:37
-
-
Save tripflex/5fcf1a38904ada49a972 to your computer and use it in GitHub Desktop.
Output specific fields in a table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Job Submission Form | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; | |
| global $job_manager; | |
| ?> | |
| <form action="<?php echo $action; ?>" method="post" id="submit-job-form" class="job-manager-form" enctype="multipart/form-data"> | |
| <?php if ( apply_filters( 'submit_job_form_show_signin', true ) ) : ?> | |
| <?php get_job_manager_template( 'account-signin.php' ); ?> | |
| <?php endif; ?> | |
| <?php if ( job_manager_user_can_post_job() ) : ?> | |
| <!-- Job Information Fields --> | |
| <?php do_action( 'submit_job_form_job_fields_start' ); ?> | |
| <?php foreach ( $job_fields as $key => $field ) : ?> | |
| <?php if( $key === 'job_title' ) echo "<table><td>"; ?> | |
| <fieldset class="fieldset-<?php esc_attr_e( $key ); ?>"> | |
| <label for="<?php esc_attr_e( $key ); ?>"><?php echo $field['label'] . apply_filters( 'submit_job_form_required_label', $field['required'] ? '' : ' <small>' . __( '(optional)', 'wp-job-manager' ) . '</small>', $field ); ?></label> | |
| <div class="field <?php echo $field['required'] ? 'required-field' : ''; ?>"> | |
| <?php get_job_manager_template( 'form-fields/' . $field['type'] . '-field.php', array( 'key' => $key, 'field' => $field ) ); ?> | |
| </div> | |
| </fieldset> | |
| <?php if( $key === 'job_title' ) echo "</td></table>"; ?> | |
| <?php endforeach; ?> | |
| <?php do_action( 'submit_job_form_job_fields_end' ); ?> | |
| <!-- Company Information Fields --> | |
| <?php if ( $company_fields ) : ?> | |
| <h2><?php _e( 'Company Details', 'wp-job-manager' ); ?></h2> | |
| <?php do_action( 'submit_job_form_company_fields_start' ); ?> | |
| <?php foreach ( $company_fields as $key => $field ) : ?> | |
| <fieldset class="fieldset-<?php esc_attr_e( $key ); ?>"> | |
| <label for="<?php esc_attr_e( $key ); ?>"><?php echo $field['label'] . apply_filters( 'submit_job_form_required_label', $field['required'] ? '' : ' <small>' . __( '(optional)', 'wp-job-manager' ) . '</small>', $field ); ?></label> | |
| <div class="field <?php echo $field['required'] ? 'required-field' : ''; ?>"> | |
| <?php get_job_manager_template( 'form-fields/' . $field['type'] . '-field.php', array( 'key' => $key, 'field' => $field ) ); ?> | |
| </div> | |
| </fieldset> | |
| <?php endforeach; ?> | |
| <?php do_action( 'submit_job_form_company_fields_end' ); ?> | |
| <?php endif; ?> | |
| <p> | |
| <input type="hidden" name="job_manager_form" value="<?php echo $form; ?>" /> | |
| <input type="hidden" name="job_id" value="<?php echo esc_attr( $job_id ); ?>" /> | |
| <input type="hidden" name="step" value="<?php echo esc_attr( $step ); ?>" /> | |
| <input type="submit" name="submit_job" class="button" value="<?php esc_attr_e( $submit_button_text ); ?>" /> | |
| </p> | |
| <?php else : ?> | |
| <?php do_action( 'submit_job_form_disabled' ); ?> | |
| <?php endif; ?> | |
| </form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment