mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
form for dashboard
This commit is contained in:
@@ -1120,6 +1120,7 @@ abstract class Controller extends AbstractController
|
||||
|
||||
} else {
|
||||
|
||||
// Display turbo response
|
||||
$this->DisplayTurboAjaxPage(['current_form' => $oForm->createView()]);
|
||||
|
||||
}
|
||||
|
||||
@@ -186,6 +186,7 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage
|
||||
$this->LinkScriptFromAppRoot('js/forms/custom-elements/oql.js');
|
||||
$this->LinkScriptFromAppRoot('js/forms/custom-elements/collection.js');
|
||||
$this->LinkScriptFromAppRoot('js/forms/custom-elements/collection_entry.js');
|
||||
$this->LinkScriptFromAppRoot('js/forms/custom-elements/turbo_stream_event.js');
|
||||
|
||||
// Used by inline image, CKEditor and other places
|
||||
$this->LinkScriptFromAppRoot('node_modules/magnific-popup/dist/jquery.magnific-popup.min.js');
|
||||
|
||||
@@ -108,6 +108,7 @@ abstract class AbstractFormBlock implements IFormBlock
|
||||
protected function RegisterOptions(OptionsRegister $oOptionsRegister): void
|
||||
{
|
||||
$oOptionsRegister->SetOption('form_block', $this);
|
||||
$oOptionsRegister->SetOption('form_block_class', get_class($this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,8 +45,8 @@ class ClassAttributeGroupByFormBlock extends AttributeChoiceFormBlock
|
||||
$sExtKeyAttCode = $oModelReflection->GetAttributeProperty($sTargetClass, $sExtFieldAttCode, 'extkey_attcode');
|
||||
$sTargetAttCode = $oModelReflection->GetAttributeProperty($sTargetClass, $sExtFieldAttCode, 'target_attcode');
|
||||
$sTargetClass = $oModelReflection->GetAttributeProperty($sTargetClass, $sExtKeyAttCode, 'targetclass');
|
||||
$aTargetAttCodes = AttributeChoiceFormBlock::ListAttributeCodesByCategory($sTargetClass, 'group_by');
|
||||
$sAttType = $aTargetAttCodes[$sTargetAttCode];
|
||||
// $aTargetAttCodes = AttributeChoiceFormBlock::ListAttributeCodesByCategory($sTargetClass, 'group_by');
|
||||
$sAttType = $sTargetAttCode;
|
||||
$sExtFieldAttCode = $sTargetAttCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class FormTypeExtension extends AbstractTypeExtension
|
||||
{
|
||||
$resolver->setDefined([
|
||||
'form_block',
|
||||
'form_block_class',
|
||||
'builder_listener',
|
||||
'prevent_form_build',
|
||||
]);
|
||||
@@ -55,6 +56,7 @@ class FormTypeExtension extends AbstractTypeExtension
|
||||
{
|
||||
if (array_key_exists('form_block', $options)) {
|
||||
$view->vars['form_block'] = $options['form_block'];
|
||||
$view->vars['form_block_class'] = $options['form_block_class'];
|
||||
|
||||
$oFormBlock = $options['form_block'];
|
||||
$view->vars['trigger_form_submit_on_modify'] = $oFormBlock->ImpactDependentsBlocks();
|
||||
|
||||
Reference in New Issue
Block a user