2020-05-29 13:41:58 +02:00
< ? php
echo $this -> element ( 'genericElements/Form/genericForm' , array (
'data' => array (
2020-06-04 10:05:45 +02:00
'title' => __ ( 'Add new encryption key' ),
2020-05-29 13:41:58 +02:00
'description' => __ ( 'Alignments indicate that an individual belongs to an organisation in one way or another. The type of relationship is defined by the type field.' ),
'model' => 'Organisations' ,
'fields' => array (
2020-06-04 10:05:45 +02:00
array (
'field' => 'owner_type' ,
'label' => __ ( 'Owner type' ),
'options' => array_combine ( array_keys ( $dropdownData ), array_keys ( $dropdownData )),
'type' => 'dropdown'
),
array (
'field' => 'organisation_id' ,
'label' => __ ( 'Owner organisation' ),
'options' => $dropdownData [ 'organisation' ],
'type' => 'dropdown' ,
'stateDependence' => [
'source' => '#owner_type-field' ,
'option' => 'organisation'
]
),
array (
'field' => 'individual_id' ,
'label' => __ ( 'Owner individual' ),
'options' => $dropdownData [ 'individual' ],
'type' => 'dropdown' ,
'stateDependence' => [
'source' => '#owner_type-field' ,
'option' => 'individual'
]
),
2020-05-29 13:41:58 +02:00
array (
'field' => 'uuid' ,
'type' => 'uuid'
),
array (
'field' => 'type' ,
2020-06-04 10:05:45 +02:00
'options' => array ( 'pgp' => 'PGP' , 'smime' => 'S/MIME' ),
'type' => 'dropdown'
2020-05-29 13:41:58 +02:00
),
array (
'field' => 'encryption_key' ,
'label' => __ ( 'Public key' ),
'type' => 'textarea' ,
'rows' => 8
)
),
'submit' => array (
'action' => $this -> request -> getParam ( 'action' )
)
)
));