Skip to content
Permalink
Browse files

added some default sorting to make sure screens are consistent

  • Loading branch information
caseysoftware committed Oct 11, 2014
1 parent 5e2b383 commit a05783182c443d5e98a0fabf0c78ec81440115c2
Showing with 4 additions and 3 deletions.
  1. +3 −2 classes/w2p/Core/CustomFieldManager.class.php
  2. +1 −1 classes/w2p/Core/CustomFields.class.php
@@ -24,14 +24,15 @@ public function __construct() {

$this->html_types = array('textinput' => 'Text Input', 'textarea' => 'Text Area',
'checkbox' => 'Checkbox', 'select' => 'Select List', 'label' => 'Label',
'separator' => 'Separator', 'href' => 'Weblink', 'email' => 'Email', 'date' => 'Date');
'separator' => 'Separator', 'href' => 'Weblink', 'email' => 'Email', 'dateinput' => 'Date');
}

public function getType($name) {
return $this->html_types[$name];
}

public function getTypes() {
asort($this->html_types);
return $this->html_types;
}

@@ -48,7 +49,7 @@ public function getStructure($moduleName) {
$q = $this->_getQuery();
$q->addTable('custom_fields_struct');
$q->addWhere("field_module = '$moduleName'");
$q->addOrder('field_order ASC');
$q->addOrder('field_order, field_name');

return $q->loadList();
}
@@ -59,7 +59,7 @@ public function __construct($m, $notUsed, $obj_id = null, $mode = 'edit', $publi
case 'email':
$this->fields[$row['field_name']] = new w2p_Core_CustomFieldEmail( $row['field_id'], $row['field_name'], $row['field_order'], stripslashes($row['field_description']), stripslashes($row['field_extratags']), $row['field_published']);
break;
case 'date':
case 'dateinput':
$this->fields[$row['field_name']] = new w2p_Core_CustomFieldDate( $row['field_id'], $row['field_name'], $row['field_order'], stripslashes($row['field_description']), stripslashes($row['field_extratags']), $row['field_published']);
break;
default:

0 comments on commit a057831

Please sign in to comment.
You can’t perform that action at this time.