Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add section and colspan on formulary #345

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
14 changes: 12 additions & 2 deletions fields/field.constant.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
$GO_FIELDS['comment']['name'] = __("Comments");
$GO_FIELDS['comment']['field'] = 'comment';
$GO_FIELDS['comment']['input_type'] = 'multitext';
$GO_FIELDS['comment']['colums'] = '3'; //[CRI] : colums - Add colspan on formulary

$GO_FIELDS['other']['name'] = __("Others");
$GO_FIELDS['other']['input_type'] = 'text';
Expand All @@ -75,8 +76,6 @@
$GO_FIELDS['types_id']['name'] = __("Type");
$GO_FIELDS['types_id']['linkfield'] = 'type';
$GO_FIELDS['types_id']['input_type'] = 'dropdown';
// The 'isolated' dropdown type will create a isolated table for each type that will be assigned
// with this field.
$GO_FIELDS['types_id']['dropdown_type'] = 'isolated';

$GO_FIELDS['models_id']['name'] = __("Model");
Expand Down Expand Up @@ -147,3 +146,14 @@
$GO_FIELDS['groups_id_tech']['name'] = __("Group in charge of the hardware");
$GO_FIELDS['groups_id_tech']['input_type'] = 'dropdown';
$GO_FIELDS['groups_id_tech']['condition'] = ['is_assign' => 1];

//*****//
// INICIO [CRI] : section - Add section on formulary
//*****//
$GO_FIELDS['section']['name'] = __("Example secction");
$GO_FIELDS['section']['field'] = 'sectionRow';
$GO_FIELDS['section']['input_type'] = 'sectionRow';
$GO_FIELDS['section']['colums'] = '4';
//*****//
// FINAL [CRI] : section - Add section on formulary
//*****//
9 changes: 9 additions & 0 deletions inc/field.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,15 @@ public static function addNewField($table, $field, $after = false) {
case 'decimal' :
$query .= "DECIMAL(20,4) NOT NULL DEFAULT '0.0000'";
break;
//*****//
// INICIO [CRI] : section - Add section on formulary
//*****//
case 'sectionRow' :
$query .= "VARCHAR(45) NULL DEFAULT 'Section'";
break;
//*****//
// FINAL [CRI] : section - Add section on formulary
//*****//
}
if ($after) {
$query.=" AFTER `$after`";
Expand Down
Loading