Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Adrien Clairembault <42734840+AdrienClairembault@users.noreply.github.com>
  • Loading branch information
ccailly and AdrienClairembault committed May 22, 2024
1 parent 0b03c0c commit 09b9435
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions css/includes/components/form/_form-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@

[data-glpi-form-editor-comment] {
&[data-glpi-form-editor-active-comment] {
// Show secondary data on active form
// Show secondary data on active comments
[data-glpi-form-editor-comment-extra-details] {
opacity: 1;
visibility: visible;
Expand All @@ -169,12 +169,12 @@
}

&:not([data-glpi-form-editor-active-comment]) {
// Do not highlight inactive forms
// Do not highlight inactive comments
[data-glpi-form-editor-active-comment-status-indicator] {
display: none;
}

// Do not show secondary data on inactive form
// Do not show secondary data on inactive comments
[data-glpi-form-editor-comment-extra-details] {
height: 0;
opacity: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

namespace Glpi\Form;

interface Block
interface BlockInterface
{
public function displayBlockForEditor(): void;
}
2 changes: 1 addition & 1 deletion src/Form/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
/**
* Comment of a given helpdesk form's section
*/
final class Comment extends CommonDBChild implements Block
final class Comment extends CommonDBChild implements BlockInterface
{
public static $itemtype = Section::class;
public static $items_id = 'forms_sections_id';
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/**
* Question of a given helpdesk form's section
*/
final class Question extends CommonDBChild implements Block
final class Question extends CommonDBChild implements BlockInterface
{
public static $itemtype = Section::class;
public static $items_id = 'forms_sections_id';
Expand Down
4 changes: 2 additions & 2 deletions templates/pages/admin/form/form_comment.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
class="form-control content-editable-h2 mb-0"
type="text"
name="name"
value="{{ comment is not null ? comment.fields.name|e('html_attr') : '' }}"
value="{{ comment is not null ? comment.fields.name : '' }}"
placeholder="{{ __("Add a title...") }}"
aria-label="{{ __("Comment title") }}"
data-glpi-form-editor-dynamic-input
Expand Down Expand Up @@ -115,7 +115,7 @@
</div>

<div
class="d-flex flex-row-reverse align-items-center mt-2"
class="d-flex flex-row-reverse align-items-center"
data-glpi-form-editor-comment-extra-details
>
<button
Expand Down

0 comments on commit 09b9435

Please sign in to comment.