Skip to content
Snippets Groups Projects
Commit 1ce5fa62 authored by Sebastian Kehr's avatar Sebastian Kehr :rowboat_tone2:
Browse files

refs #16787 [fid]

* render job title field type-agnostic
* remove permissions headline
* set limited_access to granted for all
parent 7125e98f
Branches
Tags instance/local/staging/20211104_113228
No related merge requests found
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* *
* @author Sebastian Kehr <kehr@ub.uni-leipzig.de> * @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
* @author Gregor Gawol <gawol@ub.uni-leipzig.de>
* @author Alexander Purr <purr@ub.uni-leipzig.de>
* @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2 * @license http://opensource.org/licenses/gpl-2.0.php GNU GPLv2
*/ */
...@@ -25,7 +27,10 @@ class UserCreateFormInputFilter extends RootAwareBaseInputFilter ...@@ -25,7 +27,10 @@ class UserCreateFormInputFilter extends RootAwareBaseInputFilter
{ {
public function getValues() public function getValues()
{ {
$permissions = ['basic_access' => 'granted']; $permissions = [
'basic_access' => 'granted',
'limited_access' => 'granted'
];
return compact('permissions') + parent::getValues(); return compact('permissions') + parent::getValues();
} }
} }
\ No newline at end of file
...@@ -129,13 +129,17 @@ $elemHomeLibrary->setAttributes(['class' => 'form-control']); ...@@ -129,13 +129,17 @@ $elemHomeLibrary->setAttributes(['class' => 'form-control']);
<?php <?php
/** @var Element\Radio $elemJobTitle */ /** @var Element\Radio $elemJobTitle */
$elemJobTitle = $form->get('job_title'); $elemJobTitle = $form->get('job_title');
$elemJobTitle->setLabelAttributes(['class' => 'col-md-4']);
$elemJobTitle->setAttributes(['class' => 'form-control']);
?> ?>
<div class="form-group"> <div class="form-group row">
<?= $this->formLabel($elemJobTitle) ?> <div class="col-md-12">
<?= $this->formSelect($elemJobTitle) ?> <div class="col-md-4">
<?= $this->formElementErrors($elemJobTitle) ?> <?= $this->formLabel($elemJobTitle)?>
</div>
<div class="col-md-8 row">
<?= $this->formElement($elemJobTitle)?>
</div>
<?= $this->formElementErrors($elemJobTitle)?>
</div>
</div> </div>
<? /* Permissions */ ?> <? /* Permissions */ ?>
...@@ -155,7 +159,6 @@ foreach ($permissions as $permission) { ...@@ -155,7 +159,6 @@ foreach ($permissions as $permission) {
} }
?> ?>
<h3><?= $this->formLabel($elemPermissions) ?></h3>
<?php foreach ($elements ?? [] as $element): ?> <?php foreach ($elements ?? [] as $element): ?>
<div class="form-group"> <div class="form-group">
<?= $this->formLabel($element) ?> <?= $this->formLabel($element) ?>
...@@ -163,7 +166,6 @@ foreach ($permissions as $permission) { ...@@ -163,7 +166,6 @@ foreach ($permissions as $permission) {
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<? /* addresses */ ?> <? /* addresses */ ?>
<?= $this->render('fid/user/address-collection.phtml') ?> <?= $this->render('fid/user/address-collection.phtml') ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment