Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Add field mandatory...
 
Notifications
Clear all

Add field mandatory on class Action

3 Posts
1 Users
0 Reactions
3,865 Views
(@a-mikael)
Posts: 35
Active Member
Topic starter
 
[#853]

hi,

I need to add a mandatory on my field idResultsType in class Action since description or result :

1) I have add mandatoryEfficiencyOnDone in table Type

2) I have add that in class Type :

public $mandatoryEfficiencyOnDone;
  public $_lib_mandatoryEfficiencyOnDoneStatus;
"mandatoryEfficiencyOnDone"=>"nobr",

So i see in ActionType my new field mandatory :

But now, my checkbox efficiency has no effect in my field idResultsType in Action

After, i have add that in SqlElement.php but it changes nothing :

if (property_exists($objType, 'mandatoryEfficiencyOnDone') and $objType->mandatoryEfficiencyOnDone 
      and property_exists($this, 'idResultsType')
      and property_exists($this, 'done')) {
        if ($this->done and ! $this->idResultsType) {
          $result.='
' . i18n('messageMandatory',array($this->getColCaption('idResultsType'))); } }

Thx


 
Posted : 10 Dec 2012 15H25
(@a-mikael)
Posts: 35
Active Member
Topic starter
 

The problem is in this condition :

if ($this->done and ! $this->idResultsType) 

Because i think i copy that :

if ($this->done and ! $this->result)

And i have just change $this->result


 
Posted : 10 Dec 2012 15H36
(@a-mikael)
Posts: 35
Active Member
Topic starter
 

Okay i found, should be added 'trim()':

if ($this->done and ! trim($this->idResultsType))

It works !


 
Posted : 10 Dec 2012 15H41
Share:

Scroll to Top