?> </label> <input <?php wpas_get_field_class('email'); ?> type="email" placeholder="<?php _e('Email'); ?> " name="email" value="<?php echo wpas_get_registration_field_value('email'); ?> " required> <small class="wpas-help-block" id="email-validation" style="display: none;"></small> </div> <div <?php wpas_get_field_container_class('pwd'); ?> > <label><?php _e('Enter a password', 'wpas'); ?> </label> <input <?php wpas_get_field_class('pwd', 'wpas-pwd'); ?> type="password" placeholder="<?php _e('Password'); ?> " id="password" name="pwd" required> </div> <div class="wpas-checkbox">
<?php /** * The wpas_submission_form_inside_after_subject hook has to be placed * right after the subject field. * * This hook is very important as this is where the custom fields are hooked. * Without this hook custom fields would not display at all. * * @since 3.0.0 */ do_action('wpas_submission_form_inside_after_subject'); ?> <div <?php wpas_get_field_container_class('wpas_message'); ?> > <label><?php _e('Description', 'wpas'); ?> </label> <?php /** * The wpas_get_message_textarea will generate the textarea * used to submit the ticket description. It will either generate * a simple textarea or a WYSIWYG editor based on the plugin settings. * * @since 3.0.0 */ wpas_get_message_textarea();
/** * "Fake" taxonomy select. * * @param array $field Field options * @since 3.0.0 */ public static function taxonomy($field) { global $post; $field_id = 'wpas_' . $field['name']; $label = wpas_get_field_title($field); $current = get_the_terms($post->ID, sanitize_text_field($field['name'])); $terms = get_terms(sanitize_text_field($field['name']), array('hide_empty' => 0)); $value = ''; $ordered_terms = array(); if (is_array($current)) { foreach ($current as $term) { $value = $term->slug; } } /* In case the taxonomy does not exist */ if (is_wp_error($terms)) { return; } /** * Re-order the terms hierarchically. */ wpas_sort_terms_hierarchicaly($terms, $ordered_terms); ?> <div <?php wpas_get_field_container_class($field_id); ?> id="<?php echo $field_id; ?> _container"> <label for="<?php echo $field_id; ?> "><strong><?php echo $label; ?> </strong></label> <?php if (!is_admin() || current_user_can($field['args']['capability'])) { ?> <select name="<?php echo $field_id; ?> " id="<?php echo $field_id; ?> " <?php wpas_get_field_class($field_id); ?> > <option value=""><?php _e('Please select', 'wpas'); ?> </option> <?php foreach ($ordered_terms as $term) { wpas_hierarchical_taxonomy_dropdown_options($term, $value); } ?> </select> <?php } else { ?> <p id="<?php echo $field_id; ?> "><?php echo $value; ?> </p> <?php } if (isset($field['args']['desc']) && '' != $field['args']['desc'] && WPAS_FIELDS_DESC) { ?> <p class="<?php echo is_admin() ? 'description' : 'wpas-help-block'; ?> "><?php echo wp_kses($field['args']['desc']); ?> </p><?php } ?> </div> <?php }