1
hi'
I'm trying to simplify submit and edit forms.
I would like to keep only these fields :
• title (text field)
• subject (list of choix)
• scoop (text area)
• body text (text area)
• upload fields (for attached files and image)
I have already hidden all fields I want :
• news/include/storyform.original.inc.php --> to simplify public edit form and back office forms
• news/include/storyform.inc.php --> to simplify submit form front office)
... except one :(
How could I hide the approve checkbox ?
Here is the code (News 1.66):
//Set date of publish/expiration
if ($approveprivilege) {
if(is_object($xoopsUser) && $xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
$approve=1;
}
$approve_checkbox = new XoopsFormCheckBox('', 'approve', $approve);
$approve_checkbox->addOption(1, _AM_APPROVE);
$option_tray->addElement($approve_checkbox);
$check = $published>0 ? 1 :0;
$published_checkbox = new XoopsFormCheckBox('', 'autodate',$check);
$published_checkbox->addOption(1, _AM_SETDATETIME);
$option_tray->addElement($published_checkbox);
$option_tray->addElement(new XoopsFormDateTime(_AM_SETDATETIME, 'publish_date', 15, $published));
$check=$expired>0 ? 1 :0;
$expired_checkbox = new XoopsFormCheckBox('', 'autoexpdate', $check);
$expired_checkbox->addOption(1, _AM_SETEXPDATETIME);
$option_tray->addElement($expired_checkbox);
$option_tray->addElement(new XoopsFormDateTime(_AM_SETEXPDATETIME, 'expiry_date', 15, $expired));
}
If I comment this line, checkbox is hidden as I would like but article is not approved (moderation is needed).
Quote:
$option_tray->addElement($approve_checkbox);
Thanks in advance for response
Still learning CSS and... english