Skip to content

Commit

Permalink
Merge pull request #1525 from OCSInventory-NG/admininfo_number
Browse files Browse the repository at this point in the history
Admininfo number
  • Loading branch information
charleneauger committed Jun 9, 2023
2 parents 403b3c3 + 80b631f commit 2ed3cb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions require/admininfo/Admininfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class Admininfo
'2' => 'VARCHAR(255)',
'5' => 'VARCHAR(255)',
'14' => 'DATE',
'11' => 'VARCHAR(255)'
'11' => 'VARCHAR(255)',
'15' => 'INT(10)'
);
// Field type
public $type_accountinfo = array(
Expand All @@ -49,7 +50,8 @@ class Admininfo
'2' => 'SELECT',
'5' => 'CHECKBOX',
'14' => 'DATE',
'11' => 'RADIOBUTTON'
'11' => 'RADIOBUTTON',
'15' => 'NUMBER'
);

/***************************************
Expand Down
2 changes: 1 addition & 1 deletion require/function_commun.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ function modif_values($field_labels, $fields, $hidden_fields, $options = array()
}
}else if($inputType == 'number'){
echo "<div class='input-group'>";
echo "<input type='".$inputType."' name='".$field['INPUT_NAME']."' id='".$field['INPUT_NAME']."' value='".$field['DEFAULT_VALUE']."' min='1' class='form-control' ".($field['CONFIG']['JAVASCRIPT'] ?? '').">";
echo "<input type='".$inputType."' name='".$field['INPUT_NAME']."' id='".$field['INPUT_NAME']."' value='".$field['DEFAULT_VALUE']."' min='0' class='form-control' ".($field['CONFIG']['JAVASCRIPT'] ?? '').">";
if(empty($field['COMMENT_AFTER'])){
echo "</div>";
}
Expand Down

0 comments on commit 2ed3cb9

Please sign in to comment.