Skip to content

Commit

Permalink
Fix UX
Browse files Browse the repository at this point in the history
  • Loading branch information
Lainow committed Sep 19, 2024
1 parent acfa36a commit 34f2ef2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 6 additions & 2 deletions src/CommonITILValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -1018,14 +1018,17 @@ public function showSummary(CommonDBTM $item)
"items_id" => $this->getID(),
"timeline_position" => ['>', CommonITILObject::NO_TIMELINE]
]);
$document = "";

$document = "";
foreach ($docs as $docs_values) {
$doc = new Document();
$doc->getFromDB($docs_values['documents_id']);
$document .= "<a ";
$document .= "href=\"" . Document::getFormURLWithID($docs_values['documents_id']) . "\">";
$document .= $doc->getField('name') . "</a><br>";
}

$script = "";
if ($canedit) {
$params = ['type' => $this->getType(),
'parenttype' => static::$itemtype,
Expand All @@ -1042,8 +1045,9 @@ public function showSummary(CommonDBTM $item)
$script .= "};";
$script .= "</script>\n";
}

$values[] = [
'edit' => $script ?? '',
'edit' => $script,
'status' => $status,
'type_name' => $type_name,
'target_name' => $target_name,
Expand Down
11 changes: 4 additions & 7 deletions templates/components/itilobject/validation.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<form method='post' name="form" action={{ call(itemtype ~ '::getFormURL') }}>
{% endif %}
<div class="card border-0 shadow-none p-0 m-0 mt-3">
<div class="card-header mb-3 pt-2">
<div class="card-header mb-1 pt-2">
<h4 class="card-title ">
{{ call(self ~ '::getTypeName', [call('Session::getPluralNumber')]) }}
</h4>
Expand Down Expand Up @@ -64,9 +64,6 @@
</div>
</div>

<div class="card border-0 shadow-none p-0 m-0">
<div class="card-header mb-3 p-0"></div>
</div>
{% if canadd %}
<div class="form-field row align-items-center col-12 col-sm-6 mb-2">
<label class="col-form-label col-xxl-5 text-xxl-end">
Expand All @@ -90,11 +87,11 @@
</div>
{% else %}
<div class="form-field row align-items-center col-12 col-sm-6 mb-2">
<label class="col-form-label col-xxl-7 text-xxl-end">
<label class="col-form-label col-xxl-5 text-xxl-end">
{{ __('Minimum validation required') }}
</label>
<div class="col-xxl-5 field-container">
{% do call('Dropdown::getValueWithUnit', [item.fields["validation_percent"], "%"]) %};
<div class="col-xxl-7 field-container">
{{ call('Dropdown::getValueWithUnit', [item.fields["validation_percent"], "%"]) }}
</div>
</div>
{% endif %}
Expand Down

0 comments on commit 34f2ef2

Please sign in to comment.