다음 용액 같을 수
파일 => 맞춤/모듈/태스크 /보기/view.edit.php
/**
* @see SugarView::display()
*/
public function display()
{
if($this->ev->isDuplicate){
$this->bean->status = $this->bean->getDefaultStatus();
} //if
global $current_user;
// check if current user is in specific role
$isEnabledRole = in_array("ITOperation", ACLRole::getUserRoleNames($current_user->id));
if($isEnabledRole)
$this->ev->ss->assign('readOnly', 'readonly = "readonly"');
else
$this->ev->ss->assign('readOnly', '');
parent::display();
}
파일 => 맞춤/모듈/태스크/메타/editviewdefs을 .PHP
다음 확인란 입력 유형에 대해
array (
array (
'name' => 'description',
'customCode' => '<input type="text" title="" value="{$fields.description.value}" id="description" name="description" {$readOnly}>',
),
),
),
: 파일 => 사용자 정의/모듈/작업/뷰/view.edit.php
if($isEnabledRole) {
$this->ev->ss->assign('readOnly', 'readonly = "readonly"');
$this->ev->ss->assign('disabled', 'disabled');
} else {
$this->ev->ss->assign('readOnly', '');
$this->ev->ss->assign('disabled', '');
}
파일 => 사용자 정의/모듈/작업/메타 데이터/editviewdefs.php
array (
'name' => 'processor_signoff_c',
'label' => 'LBL_PROCESSOR_SIGNOFF',
'customCode' => '<input type="hidden" name="processor_signoff_c" value="0"><input type="checkbox" id="processor_signoff_c" name="processor_signoff_c" value="1" {if $fields.processor_signoff_c.value == "1"} checked {/if} {$disabled}>',
),
안녕, 안토니오.
실제로 동일한 예제가 있지만 그 유일한 문제점은 구문을 사용할 수 없다는 것입니다. 내 값은 value = "{$ fields.processor_signoff_c.value}"이며 올바른 값을 삽입하거나 저장시 데이터베이스에 제대로 저장하지 않습니다. 구문이 올바르게 작동하도록 도울 수 있다면 ... 좋은 대답으로 표시 할 수 있습니다. – faldeland
이제 답이 통합되어 있으면 테스트가 완료되었습니다. 안녕. –
당신의 공헌에 너무 감사드립니다 ... 나는 오늘 나중에 테스트하고 다시보고 할 것입니다 ... 나는 당신이 가고있는 곳을보고 그것이 트릭을 한 – faldeland