| @@ -36,9 +36,9 @@ | ||
| 36 | 36 | |
| 37 | 37 | if(isset($field->rules) && strpos($field->rules, 'required') !== FALSE) |
| 38 | 38 | $required = '*'; |
| 39 | 39 | ?> |
| 40 | -<div class="wdk-field-edit <?php echo esc_attr($field->field_type); ?> wdk-col-<?php echo esc_attr($field->columns_number); ?> <?php echo esc_attr($field->class); ?>"> | |
| 40 | +<div class="wdk-field-<?php echo esc_attr($field_id);?> wdk-field-edit <?php echo esc_attr($field->field_type); ?> wdk-col-<?php echo esc_attr($field->columns_number); ?> <?php echo esc_attr($field->class); ?> <?php echo esc_attr($field->class); ?> <?php if(!empty($form) && method_exists($form, 'hasError') && $form->hasError($field_id)):?> field-error <?php endif;?>"> | |
| 41 | 41 | <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label> |
| 42 | 42 | <div class="wdk-field-container"> |
| 43 | 43 | <div class="wdk-datetime-group"> |
| 44 | 44 | <input class="regular-text db-date" <?php if(false):?>date-format="<?php echo esc_attr(wdk_jsdateformat(get_option('date_format')));?>"<?php endif;?> name="<?php echo esc_attr($field_id); ?>" type="hidden" id="<?php echo esc_attr($field_id); ?>" value="<?php echo esc_attr(wmvc_show_data($field_id, $db_data, '')); ?>"> |
| @@ -48,9 +48,9 @@ | ||
| 48 | 48 | $hours = ''; |
| 49 | 49 | $minutes = ''; |
| 50 | 50 | if(wmvc_show_data($field_id, $db_data, '')) { |
| 51 | 51 | $strotime = strtotime(wmvc_show_data($field_id, $db_data, '')); |
| 52 | - list($hours, $minutes) = explode('-', date("h-i", $strotime)); | |
| 52 | + list($hours, $minutes) = explode('-', gmdate("h-i", $strotime)); | |
| 53 | 53 | } |
| 54 | 54 | ?> |
| 55 | 55 | <select name="hours_mask" class="datetime_time_mask"> |
| 56 | 56 | <option value=""><?php echo esc_html__('Hr', 'wpdirectorykit');?></option> |
| @@ -69,8 +69,13 @@ | ||
| 69 | 69 | </div> |
| 70 | 70 | <?php if(!empty($field->hint)):?> |
| 71 | 71 | <p class="wdk-hint"> |
| 72 | 72 | <?php echo esc_html($field->hint); ?> |
| 73 | + </p> | |
| 74 | + <?php endif;?> | |
| 75 | + <?php if(!empty($form) && method_exists($form, 'hasError') && $form->getError($field_id)):?> | |
| 76 | + <p class="wdk-hint wdk-error"> | |
| 77 | + <?php echo wp_kses_post($form->getError($field_id)); ?> | |
| 73 | 78 | </p> |
| 74 | 79 | <?php endif;?> |
| 75 | 80 | </div> |
| 76 | 81 | </div> |