dbmsv3 init...1
This commit is contained in:
parent
55962ee56e
commit
6e9cdd8644
File diff suppressed because one or more lines are too long
@ -215,7 +215,7 @@ class CommonHelper
|
|||||||
$html .= '</select>';
|
$html .= '</select>';
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
//필수항목
|
||||||
public function getFieldLabel(string $field, string $label, array $viewDatas, array $extras = []): string
|
public function getFieldLabel(string $field, string $label, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
@ -227,7 +227,6 @@ class CommonHelper
|
|||||||
}
|
}
|
||||||
return $label;
|
return $label;
|
||||||
}
|
}
|
||||||
// header.php에서 getFieldForm_Helper사용
|
|
||||||
protected function form_dropdown_common_process(string $field, mixed $value, array $viewDatas, array $extras = [], array $attributes = []): string
|
protected function form_dropdown_common_process(string $field, mixed $value, array $viewDatas, array $extras = [], array $attributes = []): string
|
||||||
{
|
{
|
||||||
$html = "";
|
$html = "";
|
||||||
@ -239,13 +238,13 @@ class CommonHelper
|
|||||||
$attribute = "";
|
$attribute = "";
|
||||||
$label = "";
|
$label = "";
|
||||||
if ($option_value instanceof CommonEntity) {
|
if ($option_value instanceof CommonEntity) {
|
||||||
// if (in_array($viewDatas['control']['action'], ['create_form'])) {
|
if ($option_key != $value && $option_value->getStatus() != $option_value::DEFAULT_STATUS) {
|
||||||
// if ($option_value->getStatus() != $option_value::DEFAULT_STATUS) {
|
continue;
|
||||||
// $isDisabled = " disabled";
|
}
|
||||||
// }
|
foreach ($attributes as $attribute_name => $attribute_value) {
|
||||||
// }
|
$attribute .= sprintf(" %s=\"%s\"", $attribute_name, $option_value->$attribute_value());
|
||||||
$label = $option_value->getStatus() != $option_value::DEFAULT_STATUS ? STATUS_ICONS['NOT_AVAILABLE'] : STATUS_ICONS['AVAILABLE'];
|
}
|
||||||
$label .= $option_value->getCustomTitle();
|
$label = $option_value->getCustomTitle();
|
||||||
} else {
|
} else {
|
||||||
$label = $option_value;
|
$label = $option_value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,41 +12,6 @@ class ServiceHelper extends CustomerHelper
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->setTitleField(field: ServiceModel::TITLE);
|
$this->setTitleField(field: ServiceModel::TITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function form_dropdown_common_process(string $field, mixed $value, array $viewDatas, array $extras = [], array $attributes = []): string
|
|
||||||
{
|
|
||||||
$html = "";
|
|
||||||
switch ($field) {
|
|
||||||
case "serverinfo_uid":
|
|
||||||
foreach ($viewDatas['control']['field_optons'][$field] as $option_key => $option_value) {
|
|
||||||
$isSelected = $option_key == $value ? ' selected' : '';
|
|
||||||
$isDisabled = "";
|
|
||||||
$attribute = "";
|
|
||||||
$label = "";
|
|
||||||
if ($option_value instanceof CommonEntity) {
|
|
||||||
if (in_array($viewDatas['control']['action'], ['create_form'])) {
|
|
||||||
if ($option_value->getStatus() != $option_value::DEFAULT_STATUS) {
|
|
||||||
$isDisabled = " disabled";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach ($attributes as $attribute_name => $attribute_value) {
|
|
||||||
$attribute .= sprintf(" %s=\"%s\"", $attribute_name, $option_value->$attribute_value());
|
|
||||||
}
|
|
||||||
$label = $option_value->getStatus() != $option_value::DEFAULT_STATUS ? STATUS_ICONS['NOT_AVAILABLE'] : STATUS_ICONS['AVAILABLE'];
|
|
||||||
$label .= $option_value->getCustomTitle();
|
|
||||||
} else {
|
|
||||||
$label = $option_value;
|
|
||||||
}
|
|
||||||
$html .= sprintf("<option value=\"%s\"%s%s%s>%s</option>", $option_key, $isSelected, $isDisabled, $attribute, $label);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$html = parent::form_dropdown_common_process($field, $value, $viewDatas, $extras, $attributes);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
|
|||||||
@ -26,16 +26,13 @@ class ServerPartHelper extends EquipmentHelper
|
|||||||
$attribute = "";
|
$attribute = "";
|
||||||
$label = "";
|
$label = "";
|
||||||
if ($option_value instanceof CommonEntity) {
|
if ($option_value instanceof CommonEntity) {
|
||||||
// if (in_array($viewDatas['control']['action'], ['create_form'])) {
|
if ($option_key != $value && $option_value->getStatus() != $option_value::DEFAULT_STATUS) {
|
||||||
// if ($option_value->getStatus() != $option_value::DEFAULT_STATUS) {
|
continue;
|
||||||
// $isDisabled = " disabled";
|
}
|
||||||
// }
|
|
||||||
// }
|
|
||||||
foreach ($attributes as $attribute_name => $attribute_value) {
|
foreach ($attributes as $attribute_name => $attribute_value) {
|
||||||
$attribute .= sprintf(" %s=\"%s\"", $attribute_name, $option_value->$attribute_value());
|
$attribute .= sprintf(" %s=\"%s\"", $attribute_name, $option_value->$attribute_value());
|
||||||
}
|
}
|
||||||
$label = $option_value->getStatus() != $option_value::DEFAULT_STATUS ? STATUS_ICONS['NOT_AVAILABLE'] : STATUS_ICONS['AVAILABLE'];
|
$label = $option_value->getCustomTitle();
|
||||||
$label .= $option_value->getCustomTitle();
|
|
||||||
} else {
|
} else {
|
||||||
$label = $option_value;
|
$label = $option_value;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user