Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions class/EventHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,7 @@ public function getEventForm($siteSide = 'user', $mode = 'new', $data = null)
$event_picture2 = '';
$event_price = '';
$event_location = '';
$event_nbmember = '';
$files = [];
$event_icone = '';
}
Expand Down Expand Up @@ -1162,10 +1163,15 @@ public function getEventForm($siteSide = 'user', $mode = 'new', $data = null)
}
$form->addElement($descEditor);


if ($helper->getConfig('formShowMemberLimit', 1) == 1) {
// Max registered member for this event
$nbMemberElement = new \XoopsFormText(\_MD_EXTCAL_NBMEMBER, 'event_nbmember', 4, 4, $nbMember);
$nbMemberElement->setDescription(\_MD_EXTCAL_NBMEMBER_DESC);
$form->addElement($nbMemberElement, false);
} else {
$form->addElement(new \XoopsFormHidden('event_nbmember', $event_nbmember), false);
}

//Price and monnaie
if ($helper->getConfig('formShowPrice', 1) == 1) {
Expand Down
1 change: 1 addition & 0 deletions event.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function clear_unicodeslashes($text)
$xoopsTpl->assign('showAddress', $helper->getConfig('formShowAddress', 1));//
$xoopsTpl->assign('showFile', $helper->getConfig('formShowFile', 1));//
$xoopsTpl->assign('showPicture', $helper->getConfig('formShowPicture', 1));//
$xoopsTpl->assign('showMemberLimit', $helper->getConfig('formShowMemberLimit', 1));//

// Assigning event to the template
$xoopsTpl->assign('event', $event);
Expand Down
2 changes: 2 additions & 0 deletions language/english/modinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@
define('_MI_EXTCAL_FORMSHOW_FILE_DESC', '');
define('_MI_EXTCAL_FORMSHOW_PICTURE', 'Display pictures fields in the form?');
define('_MI_EXTCAL_FORMSHOW_PICTURE_DESC', '');
define('_MI_EXTCAL_FORMSHOW_MEMBERLIMIT', 'Display member limit field in the form?');
define('_MI_EXTCAL_FORMSHOW_MEMBERLIMIT_DESC', '');

// 2.38

Expand Down
23 changes: 16 additions & 7 deletions xoops_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@
'description' => '_MI_EXTCAL_FORMSHOW_ICON_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
'default' => 0,
];

$modversion['config'][] = [
Expand All @@ -611,7 +611,7 @@
'description' => '_MI_EXTCAL_FORMSHOW_PRICE_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
'default' => 0,
];

$modversion['config'][] = [
Expand All @@ -629,7 +629,7 @@
'description' => '_MI_EXTCAL_FORMSHOW_CONTACT_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
'default' => 0,
];

$modversion['config'][] = [
Expand All @@ -638,7 +638,7 @@
'description' => '_MI_EXTCAL_FORMSHOW_URL_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
'default' => 0,
];

$modversion['config'][] = [
Expand All @@ -647,7 +647,7 @@
'description' => '_MI_EXTCAL_FORMSHOW_EMAIL_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
'default' => 0,
];

$modversion['config'][] = [
Expand All @@ -656,7 +656,7 @@
'description' => '_MI_EXTCAL_FORMSHOW_ADDRESS_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
'default' => 0,
];

$modversion['config'][] = [
Expand All @@ -665,7 +665,7 @@
'description' => '_MI_EXTCAL_FORMSHOW_RECURENCE_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 1,
'default' => 0,
];

$modversion['config'][] = [
Expand All @@ -686,6 +686,15 @@
'default' => 1,
];

$modversion['config'][] = [
'name' => 'formShowMemberLimit',
'title' => '_MI_EXTCAL_FORMSHOW_MEMBERLIMIT',
'description' => '_MI_EXTCAL_FORMSHOW_MEMBERLIMIT_DESC',
'formtype' => 'yesno',
'valuetype' => 'int',
'default' => 0,
];

$modversion['config'][] = [
'name' => 'break' . $i,
'title' => '_MI_EXTCAL_SHOW_OTHEROPTIONS',
Expand Down