Calendar: Fix notification messages were no longer multi-line textboxes

This commit is contained in:
nathan 2022-10-18 13:30:22 -06:00
parent d1d3e2a024
commit 19bae0054a
2 changed files with 3 additions and 12 deletions

View File

@ -596,7 +596,6 @@ class calendar_hooks
'label' => 'Notification messages for added events', 'label' => 'Notification messages for added events',
'name' => 'notifyAdded', 'name' => 'notifyAdded',
'rows' => 5, 'rows' => 5,
'cols' => 50,
'help' => 'This message is sent to every participant of events you own, who has requested notifcations about new events.<br>You can use certain variables which get substituted with the data of the event. The first line is the subject of the email.', 'help' => 'This message is sent to every participant of events you own, who has requested notifcations about new events.<br>You can use certain variables which get substituted with the data of the event. The first line is the subject of the email.',
'default' => '', 'default' => '',
'values' => $event_details, 'values' => $event_details,
@ -608,7 +607,6 @@ class calendar_hooks
'label' => 'Notification messages for canceled events', 'label' => 'Notification messages for canceled events',
'name' => 'notifyCanceled', 'name' => 'notifyCanceled',
'rows' => 5, 'rows' => 5,
'cols' => 50,
'help' => 'This message is sent for canceled or deleted events.', 'help' => 'This message is sent for canceled or deleted events.',
'default' => '', 'default' => '',
'values' => $event_details, 'values' => $event_details,
@ -621,7 +619,6 @@ class calendar_hooks
'label' => 'Notification messages for modified events', 'label' => 'Notification messages for modified events',
'name' => 'notifyModified', 'name' => 'notifyModified',
'rows' => 5, 'rows' => 5,
'cols' => 50,
'help' => 'This message is sent for modified or moved events.', 'help' => 'This message is sent for modified or moved events.',
'default' => '', 'default' => '',
'values' => $event_details, 'values' => $event_details,
@ -634,7 +631,6 @@ class calendar_hooks
'label' => 'Notification messages for uninvited participants', 'label' => 'Notification messages for uninvited participants',
'name' => 'notifyDisinvited', 'name' => 'notifyDisinvited',
'rows' => 5, 'rows' => 5,
'cols' => 50,
'help' => 'This message is sent to uninvited participants.', 'help' => 'This message is sent to uninvited participants.',
'values' => $event_details, 'values' => $event_details,
'subst_help' => False, 'subst_help' => False,
@ -646,7 +642,6 @@ class calendar_hooks
'label' => 'Notification messages for your responses', 'label' => 'Notification messages for your responses',
'name' => 'notifyResponse', 'name' => 'notifyResponse',
'rows' => 5, 'rows' => 5,
'cols' => 50,
'help' => 'This message is sent when you accept, tentative accept or reject an event.', 'help' => 'This message is sent when you accept, tentative accept or reject an event.',
'values' => $event_details, 'values' => $event_details,
'subst_help' => False, 'subst_help' => False,
@ -658,7 +653,6 @@ class calendar_hooks
'label' => 'Notification messages for your alarms', 'label' => 'Notification messages for your alarms',
'name' => 'notifyAlarm', 'name' => 'notifyAlarm',
'rows' => 5, 'rows' => 5,
'cols' => 50,
'help' => 'This message is sent when you set an Alarm for a certain event. Include all information you might need.', 'help' => 'This message is sent when you set an Alarm for a certain event. Include all information you might need.',
'values' => $event_details, 'values' => $event_details,
'subst_help' => False, 'subst_help' => False,

View File

@ -437,13 +437,10 @@ class preferences_settings
$setting['run_lang'] = false; // already done now $setting['run_lang'] = false; // already done now
// handle as textarea // handle as textarea
case 'textarea': case 'textarea':
$setting['type'] = is_a($tpl, 'etemplate') ? 'textarea' : 'et2-textbox'; $setting['type'] = 'et2-textarea';
$tpl->setElementAttribute($tab . '[' . $setting['name'] . ']', 'multiline', 'true'); if(!empty($setting['rows']))
// anyway setting via css: width: 99%, height: 5em
// for old eT use size attribute
if(is_a($tpl, 'etemplate') && (!empty($setting['cols']) || !empty($setting['rows'])))
{ {
$setting['size'] = $setting['rows'] . ',' . $setting['cols']; $tpl->setElementAttribute($tab . '[' . $setting['name'] . ']', 'rows', $setting['rows']);
} }
break; break;
case 'password': case 'password':