diff options
-rw-r--r-- | apk_browser.install | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apk_browser.install b/apk_browser.install index 852e3b1..18dc754 100644 --- a/apk_browser.install +++ b/apk_browser.install @@ -32,10 +32,10 @@ function apk_browser_install() { 'field_name' => $name, 'cardinality' => (isset($fvars['cdl'])) ? $fvars['cdl'] : '1', 'type' => (isset($fvars['type'])) ? $fvars['type'] : 'text', - 'settings' => array( - 'max_length' => (isset($fvars['length'])) ? $fvars['length'] : '255', - ), ); + if (isset($fvars['settings'])) { + $field['settings'] = $fvars['settings']; + } field_create_field($field); } // now all instances @@ -43,7 +43,6 @@ function apk_browser_install() { $instance = array( 'field_name' => $name, 'label' => $fvars['label'], - 'type' => 'text', 'entity_type' => 'node', 'bundle' => 'apk', 'widget' => array( @@ -162,7 +161,7 @@ function _apk_browser_field_vars() { ), 'apk_description' => array( 'label' => $t('Description'), - 'length' => '1000' + 'settings' => array('max_length' => '1000') ), 'apk_url' => array( 'label' => $t('URL'), @@ -174,7 +173,9 @@ function _apk_browser_field_vars() { 'label' => $t('Origin') ), 'apk_build_time' => array( - 'label' => $t('Build date') + 'label' => $t('Build date'), + 'type' => 'datestamp', + 'widget' => 'date_text' ), 'apk_commit' => array( 'label' => $t('Commit') |