Editor separator and MJoin question
Editor separator and MJoin question
hi all
First of all, thanks for your help for all questions I asked .
As you know I was born last century and start dev with CPM or DOS, but ...
Is there a way (not using template forms) to draw a separator (simple line, better with thickness, dotted or not, with text or not but...) in the editor ?
I hope this will be possible....
Other point is
I need to set access rights to n employes to n rows in table 2 but only for particular row type:
each row has an unique ID and a Type (can be 1, 2 , 3) ...
using MJoin, I can set users rights to object ID
Mjoin::inst( 'operations' )
->link( 'prescripteurs.ID', 'prescripteurs_operations.Prescripteur' )
->link( 'operations.ID', 'prescripteurs_operations.Operation' )
->order( 'operations.Libelle asc' )
->fields(
Field::inst( 'ID' )
->validator( Validate::required() )
->options( Options::inst()
->table( 'operations' )
->value( 'ID' )
->label( 'Libelle' )
),
Field::inst( 'operations.Libelle' )
->name('LibOp')
-> set(false)
)
**but I want to set rights to users for specific type of object (where they do have access by type) **
Mjoin::inst( 'operations_TYPE1 AS SELECT * FROM operations where Type=1' )
->link( 'prescripteurs.ID', 'prescripteurs_operations.Prescripteur' )
->link( 'operations_TYPE1.ID', 'prescripteurs_operations.Operation' )
->order( 'operations_TYPE1.Libelle asc' )
// or where clause here
->fields(
Field::inst( 'ID' )
->validator( Validate::required() )
->options( Options::inst()
->table( 'operations' )
->value( 'ID' )
->label( 'Libelle' )
),
Field::inst( 'operations_TYPE1.Libelle' )
->name('LibOpType1') // displayed value
-> set(false)
),
Mjoin::inst( 'operations_TYPE2 AS SELECT * FROM operations where Type=2' )
->link( 'prescripteurs.ID', 'prescripteurs_operations.Prescripteur' )
->link( 'operations_TYPE2 .ID', 'prescripteurs_operations.Operation' )
->order( 'operations_TYPE2 .Libelle asc' )
// or where clause here
->fields(
Field::inst( 'ID' )
->validator( Validate::required() )
->options( Options::inst()
->table( 'operations' )
->value( 'ID' )
->label( 'Libelle' )
),
Field::inst( 'operations_TYPE2 .Libelle' )
->name('LibOpType2') // displayed value
-> set(false)
),
Is there a pretty way to do that ?
This question has an accepted answers - jump to answer
Answers
I'm afraid I don't quite understand this question. Why would you draw a separator in Editor? The form will already be broken down into a multi-checkbox or a checkbox input. Could you clarify this for me please?
Sorry - I must be having a slow start to the day. I'm not getting this one either. Could you illustrate it with an example for me please?
Allan
Hi @allan
For separators, it is just to explain what is in form section like

For rights definition, I have a schema like

where I want to define link from OP to USR (USR_OP_RIGHTS) but just for OP that are linked by their type (TYP_OP) to the USR (USR_TYP_OP_RIGHTS)
Separators could be used as form section subtitle...
Ah! I understand now - thanks for the images.
I use this plug-in for that on the Editor login and signup form.
Allan
hi @allan
Thanks a lot... There are so many classes, functions and tools in your product... Sometime I search many hours for something already existing...
Using your sample, I add a line type as :
and set css as
but I don't understant why line appears sometime dark and othertime gray (and dark again when closing form) just by clicking refresh.


I'm not sure either to be honest! Can you give me a link to your page so I can take a look please?
Thanks,
Allan
Hi @allan
Thanks.
I'll do ASAP...