forked from ZwiiCMS-Team/ZwiiCMS
Empêcher l'édition nom prenom par un membre simple -optimisation écriture
This commit is contained in:
parent
4c348e44f0
commit
a4ac385577
@ -1,7 +1,4 @@
|
|||||||
<?php echo template::formOpen('userEditForm'); ?>
|
<?php echo template::formOpen('userEditForm'); ?>
|
||||||
<?php if( $this->getUser('group') > 2): $readonly = false;
|
|
||||||
else: $readonly = true;
|
|
||||||
endif;?>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<?php if($this->getUrl(3)): ?>
|
<?php if($this->getUrl(3)): ?>
|
||||||
@ -32,7 +29,7 @@
|
|||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::text('userEditFirstname', [
|
<?php echo template::text('userEditFirstname', [
|
||||||
'autocomplete' => 'off',
|
'autocomplete' => 'off',
|
||||||
'disabled' => $readonly,
|
'disabled' => $this->getUser('group') > 2 ? false : true,
|
||||||
'label' => 'Prénom',
|
'label' => 'Prénom',
|
||||||
'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
|
'value' => $this->getData(['user', $this->getUrl(2), 'firstname'])
|
||||||
]); ?>
|
]); ?>
|
||||||
@ -40,7 +37,7 @@
|
|||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::text('userEditLastname', [
|
<?php echo template::text('userEditLastname', [
|
||||||
'autocomplete' => 'off',
|
'autocomplete' => 'off',
|
||||||
'disabled' => $readonly,
|
'disabled' => $this->getUser('group') > 2 ? false : true,
|
||||||
'label' => 'Nom',
|
'label' => 'Nom',
|
||||||
'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
|
'value' => $this->getData(['user', $this->getUrl(2), 'lastname'])
|
||||||
]); ?>
|
]); ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user