Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix in the date and colorpicker validation

  • Loading branch information...
commit 273bda0371aa544c65db46e3e3fe5d1d0008ef56 1 parent c6f3563
@gnuget gnuget authored
Showing with 16 additions and 2 deletions.
  1. +6 −1 RCCWP_WritePostPage.php
  2. +10 −1 css/base.css
View
7 RCCWP_WritePostPage.php
@@ -1344,6 +1344,7 @@ function DateInterface($customField, $inputName, $groupCounter, $fieldCounter) {
type="text"
size="<?php echo $inputSize?>"
class="datepicker_mf"
+ <?php if ($customField->required_field) echo 'validate="required:true"'; ?>
readonly="readonly" />
<input id="date_field_<?php echo $idField; ?>"
@@ -1496,6 +1497,9 @@ class="<?php echo $requiredClass;?>"
function ColorPickerInterface($customField, $inputName, $groupCounter, $fieldCounter,$fieldValue = NULL){
$idField = RCCWP_WritePostPage::changeNameInput($inputName);
+ $requiredClass="";
+ if ($customField->required_field) $requiredClass = "field_required";
+
if($fieldValue){
$value=$fieldValue;
}else{
@@ -1506,8 +1510,9 @@ function ColorPickerInterface($customField, $inputName, $groupCounter, $fieldCou
}
}
?>
- <input id="<?php echo $idField; ?>" name="<?php echo $inputName?>" value="<?php echo $value?>" class="mf_color_picker" />
+ <input <?php if ($customField->required_field) echo 'validate="required:true"'; ?> id="<?php echo $idField; ?>" name="<?php echo $inputName?>" value="<?php echo $value?>" class="mf_color_picker <?php print $requiredClass;?>" />
<button class="mf-color-clear">Clear</button>
+ <div class="mf_clear"></div>
<div id="mf-cp-<?php echo $idField; ?>" class="mf-cp { el: '#<?php echo $idField; ?>' }"></div>
<?php
}
View
11 css/base.css
@@ -164,6 +164,7 @@
.datepicker_mf{
margin-left: 15%;
+ float:left;
}
/*test */
@@ -1142,6 +1143,12 @@ select.ui-datepicker-year option {
.mf-field input.mf_color_picker {
border: 1px solid #BFC4CE;
margin-left: 4px;
+ float:left;
+}
+
+
+.mf-field .mf-color-clear {
+ float:left;
}
.mf-t-color-picker .mf-color-swatch {
@@ -1463,5 +1470,7 @@ select.ui-datepicker-year option {
display:inline;
}
-
+.mf_clear {
+ clear:both;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.