Skip to content

Commit

Permalink
Improve consistency between forms
Browse files Browse the repository at this point in the history
  • Loading branch information
flack committed Dec 10, 2016
1 parent 4ca5c98 commit 0f43cf0
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 128 deletions.
252 changes: 125 additions & 127 deletions lib/org/openpsa/projects/config/schemadb_default_task.inc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,48 @@
'storage' => 'title',
'required' => true,
),
'description' => Array
(
'title' => 'description',
'storage' => 'description',
'type' => 'text',
'type_config' => array
(
'output_mode' => 'markdown'
),
'widget' => 'textarea',
),
'start' => Array
(
'title' => 'start time',
'storage' => 'start',
'type' => 'date',
'type_config' => Array
(
'storage_type' => 'UNIXTIME'
),
'widget' => 'jsdate',
'widget_config' => Array
(
'show_time' => false,
),
),
'end' => Array
(
'title' => 'deadline',
'storage' => 'end',
'type' => 'date',
'type_config' => Array
(
'storage_type' => 'UNIXTIME',
'later_than' => 'start'
),
'widget' => 'jsdate',
'widget_config' => Array
(
'show_time' => false,
),
),
'priority' => array
(
'title' => 'Priority',
Expand Down Expand Up @@ -85,109 +127,57 @@
),
'widget' => 'select',
),
'tags' => Array
'contacts' => array
(
'title' => 'skills required',
'title' => 'contacts',
'storage' => null,
'type' => 'tags',
'widget' => 'text',
),
'start' => Array
(
'title' => 'start time',
'storage' => 'start',
'type' => 'date',
'type_config' => Array
(
'storage_type' => 'UNIXTIME'
),
'widget' => 'jsdate',
'widget_config' => Array
(
'show_time' => false,
),
),
'end' => Array
(
'title' => 'deadline',
'storage' => 'end',
'type' => 'date',
'type_config' => Array
(
'storage_type' => 'UNIXTIME',
'later_than' => 'start'
),
'widget' => 'jsdate',
'widget_config' => Array
(
'show_time' => false,
),
),
'plannedHours' => array
(
'title' => 'planned hours',
'type' => 'number',
'widget' => 'text',
'storage' => 'plannedHours',
),
'minimum_slot' => Array
(
'title' => 'minimum time slot needed for task bookings',
'storage' => Array(
'location' => 'configuration',
'domain' => 'org.openpsa.projects.projectbroker',
'name' => 'minimum_slot',
),
'type' => 'number',
'widget' => 'text',
),
'agreement' => array
(
'title' => 'agreement',
'storage' => 'agreement',
'type' => 'select',
'type' => 'mnrelation',
'type_config' => array
(
'require_corresponding_option' => false,
'options' => array(),
'mapping_class_name' => 'org_openpsa_projects_task_resource_dba',
'master_fieldname' => 'task',
'member_fieldname' => 'person',
'master_is_id' => true,
'additional_fields' => array('orgOpenpsaObtype' => org_openpsa_projects_task_resource_dba::CONTACT)
),
'widget' => 'autocomplete',
'widget_config' => array
(
'class' => 'org_openpsa_sales_salesproject_deliverable_dba',
'component' => 'org.openpsa.sales',
'titlefield' => 'deliverable_html',
'id_field' => 'id',
'searchfields' => array
(
'title',
'salesproject.title'
),
'class' => 'org_openpsa_contacts_person_dba',
'component' => 'org.openpsa.contacts',
'titlefield' => 'name',

'result_headers' => array
(
array
(
'title' => 'title',
'name' => 'title',
'title' => 'name',
'name' => 'name',
),
array
(
'title' => 'email',
'name' => 'email',
),
),
'orders' => array

'searchfields' => array
(
array('title' => 'ASC'),
'firstname',
'lastname',
'username',
),
'orders' => array
(
array('lastname' => 'ASC'),
array('firstname' => 'ASC'),
),
'id_field' => 'id',
'creation_mode_enabled' => true,
'creation_handler' => midcom_connection::get_url('self') . "__mfa/org.openpsa.helpers/chooser/create/org_openpsa_contacts_person_dba/",
'creation_default_key' => 'lastname',
),
),
'description' => Array
(
'title' => 'description',
'storage' => 'description',
'type' => 'text',
'type_config' => array
(
'output_mode' => 'markdown'
),
'widget' => 'textarea',
),
'manager' => array
(
'title' => 'manager',
Expand Down Expand Up @@ -293,66 +283,74 @@
'creation_default_key' => 'lastname',
),
),

'invoiceable_default' => array
'tags' => Array
(
'title' => 'hours are invoiceable by default',
'type' => 'boolean',
'storage' => 'hoursInvoiceableDefault',
'widget' => 'checkbox',
'end_fieldset' => '',
'title' => 'skills required',
'storage' => null,
'type' => 'tags',
'widget' => 'text',
),

'contacts' => array
'agreement' => array
(
'title' => 'contacts',
'storage' => null,
'type' => 'mnrelation',
'title' => 'agreement',
'storage' => 'agreement',
'type' => 'select',
'type_config' => array
(
'mapping_class_name' => 'org_openpsa_projects_task_resource_dba',
'master_fieldname' => 'task',
'member_fieldname' => 'person',
'master_is_id' => true,
'additional_fields' => array('orgOpenpsaObtype' => org_openpsa_projects_task_resource_dba::CONTACT)
'require_corresponding_option' => false,
'options' => array(),
),
'widget' => 'autocomplete',
'widget_config' => array
(
'class' => 'org_openpsa_contacts_person_dba',
'component' => 'org.openpsa.contacts',
'titlefield' => 'name',

'class' => 'org_openpsa_sales_salesproject_deliverable_dba',
'component' => 'org.openpsa.sales',
'titlefield' => 'deliverable_html',
'id_field' => 'id',
'searchfields' => array
(
'title',
'salesproject.title'
),
'result_headers' => array
(
array
(
'title' => 'name',
'name' => 'name',
),
array
(
'title' => 'email',
'name' => 'email',
'title' => 'title',
'name' => 'title',
),
),

'searchfields' => array
(
'firstname',
'lastname',
'username',
),
'orders' => array
'orders' => array
(
array('lastname' => 'ASC'),
array('firstname' => 'ASC'),
array('title' => 'ASC'),
),
'id_field' => 'id',
'creation_mode_enabled' => true,
'creation_handler' => midcom_connection::get_url('self') . "__mfa/org.openpsa.helpers/chooser/create/org_openpsa_contacts_person_dba/",
'creation_default_key' => 'lastname',
),
),
'plannedHours' => array
(
'title' => 'planned hours',
'type' => 'number',
'widget' => 'text',
'storage' => 'plannedHours',
),
'invoiceable_default' => array
(
'title' => 'hours are invoiceable by default',
'type' => 'boolean',
'storage' => 'hoursInvoiceableDefault',
'widget' => 'checkbox',
'end_fieldset' => '',
),
'minimum_slot' => Array
(
'title' => 'minimum time slot needed for task bookings',
'storage' => Array(
'location' => 'configuration',
'domain' => 'org.openpsa.projects.projectbroker',
'name' => 'minimum_slot',
),
'type' => 'number',
'widget' => 'text',
),
)
),
2 changes: 1 addition & 1 deletion lib/org/openpsa/projects/handler/task/crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function _update_title($handler_id)
$view_title = $this->_object->get_label();
break;
case 'update':
$view_title = sprintf($this->_l10n_midcom->get('edit %s'), $this->_object->get_label());
$view_title = sprintf($this->_l10n_midcom->get('edit %s'), $this->_l10n->get('task'));
break;
}

Expand Down

0 comments on commit 0f43cf0

Please sign in to comment.