Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(HumanResources): use new BankHoliday picker in contract edit dlg
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusweiss committed May 23, 2023
1 parent 4ad82e6 commit 8ae62e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 5 additions & 13 deletions tine20/HumanResources/js/ContractEditDialog.js
Expand Up @@ -196,6 +196,10 @@ Tine.HumanResources.ContractEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
* @private
*/
getFormItems: function() {
const fieldManager = _.bind(Tine.widgets.form.FieldManager.get,
Tine.widgets.form.FieldManager, 'HumanResources', 'Contract', _,
Tine.widgets.form.FieldManager.CATEGORY_EDITDIALOG);

// blpipes is of type records with subrecord hr.blconfig
this.blConfigPanel = new Tine.Tinebase.BL.BLConfigPanel({
app: this.app,
Expand Down Expand Up @@ -254,19 +258,7 @@ Tine.HumanResources.ContractEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
{xtype: 'datefield', name: 'start_date', fieldLabel: this.app.i18n._('Start Date'), allowBlank: false, columnWidth: 1/2 },
{xtype: 'extuxclearabledatefield', name: 'end_date', fieldLabel: this.app.i18n._('End Date'), columnWidth: 1/2}
], [
{
xtype: 'tinewidgetscontainerselectcombo',
name: 'feast_calendar_id',
containerName: this.app.i18n._('Calendar'),
containersName: this.app.i18n._('Calendars'),
recordClass: Tine.Calendar.Model.Event,
requiredGrant: 'readGrant',
hideTrigger2: true,
allowBlank: false,
blurOnSelect: true,
columnWidth: 1/2,
fieldLabel: this.app.i18n._('Public Holiday Calendar')
},
fieldManager('feast_calendar_id', { allowBlank: false, blurOnSelect: true, columnWidth: 1/2 }),
{name: 'vacation_days', fieldLabel: this.app.i18n._('Vacation days of one calendar year'), allowBlank: false, columnWidth: 1/2}
]]
}]
Expand Down
2 changes: 2 additions & 0 deletions tine20/Tinebase/Model/BankHolidayCalendar.php
Expand Up @@ -36,6 +36,8 @@ class Tinebase_Model_BankHolidayCalendar extends Tinebase_Record_NewAbstract
self::APP_NAME => Tinebase_Config::APP_NAME,
self::MODEL_NAME => self::MODEL_NAME_PART,

self::TITLE_PROPERTY => self::FLD_NAME,

self::TABLE => [
self::NAME => self::TABLE_NAME,
],
Expand Down

0 comments on commit 8ae62e9

Please sign in to comment.