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
4 changes: 2 additions & 2 deletions application/cmdbabstract.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ public function GetBareProperties(WebPage $oPage, $bEditMode, $sPrefix, $aExtraP
// Add extra data for markup generation
// - Attribute code and AttributeDef. class
$val['attcode'] = $sAttCode;
$val['atttype'] = $oAttDef->GetType();
$val['atttype'] = $oAttDef->GetTypeShortClassName();
$val['attlabel'] = $sAttLabel;
$val['attflags'] = ($bEditMode) ? $this->GetFormAttributeFlags($sAttCode) : OPT_ATT_READONLY;

Expand Down Expand Up @@ -4507,7 +4507,7 @@ public function DisplayCaseLogForBulkModify(WebPage $oPage, $sAttCode, $sComment

$oDivField = FieldUIBlockFactory::MakeLarge("");
// UIContentBlockUIBlockFactory::MakeStandard(null,["field_container field_large"]);
$oDivField->AddDataAttribute("attribute-type", $oAttDef->GetType());
$oDivField->AddDataAttribute("attribute-type", $oAttDef->GetTypeShortClassName());
$oDivField->AddDataAttribute("attribute-label", $sAttMetaDataLabel);
$oDivField->AddDataAttribute("attribute-flag-hidden", false);
$oDivField->AddDataAttribute("attribute-flag-read-only", false);
Expand Down
138 changes: 71 additions & 67 deletions css/backoffice/components/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,74 @@
padding-bottom: 14px;
}

.help-text{
padding: 1px 5px;
background-color: #d7e3f8;
border: 1px solid #c6e7f5;
border-radius: 5px;
margin: 5px 0;
font-size: 0.9em;
}

.form-error ul{
padding: 1px 5px;
background-color: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: 5px;
margin: 5px 0;
font-size: 0.9em;
}

.subform{
background-color: #efefef;
border-radius: 5px;
padding: 10px;
}

.form-buttons{
margin: 20px 0;
}

.form select{
padding: 0;
overflow-y: auto;
}

.form select option{
height: 30px;
display: flex;
align-items: center;
}

.turbo-refreshing{
opacity: .5;
}

.ibo-field legend{
margin-top: 24px;
}

collection-entry-element {
margin-top: 8px;
display: block;
padding: 10px 10px;
background-color: #f5f5f5;
border-radius: 5px;
}
.ts-control{
height: auto;
min-height: 30px;
}

.ibo-form-actions > .ibo-button > span{
margin-right: 5px;
}

.ibo-form textarea{
resize: vertical;
}

// WIP SDK Forms
//form[is="itop-form-element"] {
//
// .help-text{
// padding: 1px 5px;
// background-color: #d7e3f8;
// border: 1px solid #c6e7f5;
// border-radius: 5px;
// margin: 5px 0;
// font-size: 0.9em;
// }
//
// .form-error ul{
// padding: 1px 5px;
// background-color: #f8d7da;
// border: 1px solid #f5c6cb;
// border-radius: 5px;
// margin: 5px 0;
// font-size: 0.9em;
// }
//
// .subform{
// background-color: #efefef;
// border-radius: 5px;
// padding: 10px;
// }
//
// .form-buttons{
// margin: 20px 0;
// }
//
// .form select{
// padding: 0;
// overflow-y: auto;
// }
//
// .form select option{
// height: 30px;
// display: flex;
// align-items: center;
// }
//
// .turbo-refreshing{
// opacity: .5;
// }
//
// .ibo-field legend{
// margin-top: 24px;
// }
//
// collection-entry-element {
// margin-top: 8px;
// display: block;
// padding: 10px 10px;
// background-color: #f5f5f5;
// border-radius: 5px;
// }
// .ts-control{
// height: auto;
// min-height: 30px;
// }
//
// .ibo-form-actions > .ibo-button > span{
// margin-right: 5px;
// }
//
// .ibo-form textarea{
// resize: vertical;
// }
//
//}
Comment on lines +11 to +81

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 WIP block removes styles used by active templates. The commented-out block includes .form-buttons (margin: 20px 0) and .form-error ul (error pill styling). Both classes are actively emitted by templates/application/forms/itop_form.html.twig and templates/application/forms/itop_console_layout.html.twig respectively. With these styles gone, form action buttons will lose their vertical margin and error messages will lose their red pill background. If the SDK Forms feature is deferred, consider restoring at least those two rules as globals until the SDK Forms work is complete.

7 changes: 1 addition & 6 deletions css/backoffice/vendors/ckeditor/_overloads.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $ibo-vendors-ckeditor--ck-mentions--item--padding-y: $ibo-spacing-200 !default;
}
}

.ck-editor__editable_inline:not(.ck-comment__input *) {
.ck-editor__editable_inline:not(.ck-comment__input *), .ck-source-editing-area {
height: 200px;
}

Expand All @@ -84,11 +84,6 @@ $ibo-vendors-ckeditor--ck-mentions--item--padding-y: $ibo-spacing-200 !default;
}
}

// N°7552 Allow source editing area to be scrollable in full screen
.ck-maximize_editor_main .ck-source-editing-area textarea{
overflow: auto !important;
}

/* Mentions */
.ck-mentions {
.ck-button {
Expand Down
2 changes: 1 addition & 1 deletion css/setup.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ $ipb-vendors-ckeditor--ck-content--text-color: $ipb-color-grey-900 !default;

.ipb-is-html-content {
@extend .ck-content;
}

.ck-source-editing-area {
height: 180px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ public function GetData(Request $oRequest, $sBrickId, $sGroupingTab, $bNeedDetai
$sValue = $oAttDef->GetAsHTML($oCurrentRow->Get($sItemAttr));
$sSortValue = $oCurrentRow->Get($sItemAttr);
}
$sAttType = $oAttDef->GetType();
$sAttType = $oAttDef->GetTypeShortClassName();
unset($oAttDef);

// For simple fields, we get the raw (stored) value as well
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ public function GetInformationForLinkedSetAsJsonAction(Request $oRequest)
'object_id' => $oNewLink->GetKey(),
'prefix' => 'lnk__',
'attribute_code' => $sAttCode,
'attribute_type' => $oAttDef->GetType(),
'attribute_type' => $oAttDef->GetTypeShortClassName(),
'value_html' => $sValue,
];

Expand Down Expand Up @@ -1442,7 +1442,7 @@ protected function PrepareObjectInformation(DBObject $oObject, $aAttCodes = [])
'object_class' => $sObjectClass,
'object_id' => $oObject->GetKey(),
'attribute_code' => $oAttDef->GetCode(),
'attribute_type' => $oAttDef->GetType(),
'attribute_type' => $oAttDef->GetTypeShortClassName(),
];

// - Value raw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public function AddToFlatItems(array $aCurrentRow, array &$aLevelsProperties)
'object_class' => $sCurrentObjectClass,
'object_id' => $sCurrentObjectId,
'attribute_code' => $sNameAttCode,
'attribute_type' => $sNameAttDef->GetType(),
'attribute_type' => $sNameAttDef->GetTypeShortClassName(),
'value_raw' => $value->Get($sNameAttCode),
],
];
Expand Down Expand Up @@ -415,7 +415,7 @@ public function AddToFlatItems(array $aCurrentRow, array &$aLevelsProperties)
'object_class' => $sCurrentObjectClass,
'object_id' => $sCurrentObjectId,
'attribute_code' => $aField['code'],
'attribute_type' => $oAttDef->GetType(),
'attribute_type' => $oAttDef->GetTypeShortClassName(),
'value_raw' => $attValueRaw,
'value_html' => $sHtmlForFieldValue,
];
Expand Down
2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ public static function MakeForRendering(string $sListId, DBObjectSet $oSet, $aEx
'object_class' => $sClassName,
'class_alias' => $sClassAlias,
'attribute_code' => $sAttCode,
'attribute_type' => $oAttDef->GetType(),
'attribute_type' => $oAttDef->GetTypeShortClassName(),
'attribute_label' => $sAttLabel,
'render' => $oAttDef->GetRenderForDataTable($sClassAlias),
];
Expand Down Expand Up @@ -737,7 +737,7 @@ public static function GetOptionsForRendering(array $aColumns, string $sSelectMo
'object_class' => $sClassName,
'class_alias' => $sClassAlias,
'attribute_code' => $sAttCode,
'attribute_type' => $oAttDef->GetType(),
'attribute_type' => $oAttDef->GetTypeShortClassName(),
'attribute_label' => $sAttLabel,
];
$aColumnDefinition["data"] = $sClassAlias."/".$sAttCode;
Expand Down
8 changes: 7 additions & 1 deletion sources/Core/AttributeDefinition/AttributeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ public function GetType()
return Dict::S('Core:'.$oClass->getShortName());
}

public function GetTypeShortClassName()
{
$oClass = new ReflectionClass(get_class($this));
return $oClass->getShortName();
}

public function GetTypeDesc()
{
$oClass = new ReflectionClass(get_class($this));
Expand Down Expand Up @@ -1095,7 +1101,7 @@ public function MakeFormField(DBObject $oObject, $oFormField = null)

// Metadata
$oFormField->AddMetadata('attribute-code', $this->GetCode());
$oFormField->AddMetadata('attribute-type', $this->GetType());
$oFormField->AddMetadata('attribute-type', $this->GetTypeShortClassName());
$oFormField->AddMetadata('attribute-label', $this->GetLabel());
// - Attribute flags
$aPossibleAttFlags = MetaModel::EnumPossibleAttributeFlags();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ protected function PrepareItem(DBObject $oItem, string $sClass, array $aAttribut
'object_class' => $sClass,
'object_id' => $oItem->GetKey(),
'attribute_code' => $sAttCode,
'attribute_type' => $oAttDef->GetType(),
'attribute_type' => $oAttDef->GetTypeShortClassName(),
];
// - Value raw
// For simple fields, we get the raw (stored) value as well
Expand Down