Skip to content
Snippets Groups Projects
Commit 040d34bc authored by Gregor Gawol's avatar Gregor Gawol Committed by Dorian Merz
Browse files

refs #15405 [fid] changes user data

* display only ils user data
* modified update template
* added link to edit data
* added translations
parent 71974e04
No related merge requests found
...@@ -68,3 +68,4 @@ password_change_error_expired = "Der Link ist abgelaufen." ...@@ -68,3 +68,4 @@ password_change_error_expired = "Der Link ist abgelaufen."
password_change_error_autologon = "Ihr Passwort wurde gespeichert. Jedoch ist ein unerwarteteter Fehler bei der automatischen Anmeldung aufgetreten." password_change_error_autologon = "Ihr Passwort wurde gespeichert. Jedoch ist ein unerwarteteter Fehler bei der automatischen Anmeldung aufgetreten."
password_change_success = "Passwort erfolgreich gespeichert." password_change_success = "Passwort erfolgreich gespeichert."
Edit Account = "Profildaten ändern"
...@@ -68,3 +68,4 @@ password_change_error = "An unexpected error has occurred." ...@@ -68,3 +68,4 @@ password_change_error = "An unexpected error has occurred."
password_change_error_expired = "The link has already expired." password_change_error_expired = "The link has already expired."
password_change_error_autologon = "You password has been update. However, an unexpected error has occurred during the process of logging on." password_change_error_autologon = "You password has been update. However, an unexpected error has occurred during the process of logging on."
Edit Account = "Edit Account"
...@@ -186,12 +186,13 @@ $elemJobTitle->setValue($user->getJobTitle()); ...@@ -186,12 +186,13 @@ $elemJobTitle->setValue($user->getJobTitle());
<?php <?php
/** @var Submit $elemSubmit */ /** @var Submit $elemSubmit */
$elemSubmit = $form->get('submit'); $elemSubmit = $form->get('submit');
$elemSubmit->setAttributes(['class' => 'btn btn-primary right']); $elemSubmit->setAttributes(['class' => 'btn btn-primary']);
?> ?>
<div class="form-group"> <div class="form-group">
<div class="col-lg-11 col-md-9 col-sm-11 col-xs-12"> <div class="col-lg-11 col-md-9 col-sm-11 col-xs-12">
<?= $this->formSubmit($elemSubmit) ?> <?= $this->formSubmit($elemSubmit) ?>
</div> <a href="<?=$this->url('myresearch-profile')?>" class="btn btn-primary"><?=$this->transEsc('Cancel')?></a>
</div>
</div> </div>
<?= $this->form()->closeTag($form) ?> <?= $this->form()->closeTag($form) ?>
\ No newline at end of file
...@@ -14,55 +14,7 @@ $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; ...@@ -14,55 +14,7 @@ $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>';
<h2><?=$this->transEsc('Your Profile')?></h2> <h2><?=$this->transEsc('Your Profile')?></h2>
<?=$this->flashmessages();?> <?=$this->flashmessages();?>
<table class="table table-striped">
<?=$this->renderArray(
$arrTemplate, $this->user,
[
$this->transEsc('First Name') => 'firstname',
$this->transEsc('Last Name') => 'lastname',
// finc: show e-mail in table below
// $this->transEsc('Email') => 'email',
]
)?>
<?php if (count($this->pickup ?? []) > 1): // Skip form if only one location: ?>
<tr><th><?=$this->transEsc('Preferred Library')?>:</th>
<?php
$selected = (strlen($this->profile['home_library'] ?? '') > 0)
? $this->profile['home_library'] : $this->defaultPickupLocation
?>
<td>
<form id="profile_form" class="form-inline" method="post">
<select id="home_library" name="home_library" class="form-control">
<?php foreach ($this->pickup as $lib): ?>
<option
value="<?=$this->escapeHtmlAttr($lib['locationID'])?>"<?=($selected == $lib['locationID']) ? ' selected="selected"' : ''?>><?=$this->transEsc('location_' . $lib['locationDisplay'], null, $lib['locationDisplay'])?></option>
<?php endforeach; ?>
</select>
<input class="btn btn-default" type="submit" value="<?=$this->transEsc('Save')?>"/>
</form>
</td>
<?php endif; ?>
</table>
<div id="account-actions">
<?php if ($this->auth()->getManager()->supportsPasswordChange()): ?>
<a class="btn btn-default" href="<?=$this->url('myresearch-changepassword') ?>">
<i class="fa fa-fw fa-lock" aria-hidden="true"></i> <?=$this->transEsc('Change Password') ?>
</a>
<?php endif; ?>
<?php if ($this->accountDeletion): ?>
<a class="btn btn-default" href="<?=$this->url('myresearch-deleteaccount') ?>" data-lightbox>
<i class="fa fa-times"></i> <?=$this->transEsc('delete_account_title') ?>
</a>
<?php endif; ?>
</div>
<?php if (is_array($this->profile)): ?> <?php if (is_array($this->profile)): ?>
<h3><?=$this->transEsc('Library Catalog Profile')?></h3>
<p>
<?=$this->context($this)->renderInContext('librarycards/selectcard.phtml', ['user' => $this->user]); ?>
</p>
<table class="table table-striped"> <table class="table table-striped">
<?=$this->renderArray( <?=$this->renderArray(
$arrTemplate, $this->profile, $arrTemplate, $this->profile,
...@@ -83,6 +35,7 @@ $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>'; ...@@ -83,6 +35,7 @@ $arrTemplate = '<tr><th>%%LABEL%%:</th><td> %%VALUE%%</td></tr>';
] ]
)?> )?>
</table> </table>
<a href="<?=$this->url('fid/user/update')?>" class="btn btn-primary"><?=$this->transEsc('fid::Edit Account')?></a>
<?php elseif ('ils-none' !== $this->ils()->getOfflineMode() && $this->patronLoginView && !empty($this->patronLoginView->getTemplate())): ?> <?php elseif ('ils-none' !== $this->ils()->getOfflineMode() && $this->patronLoginView && !empty($this->patronLoginView->getTemplate())): ?>
<?=$this->partial($this->patronLoginView);?> <?=$this->partial($this->patronLoginView);?>
<?php endif; ?> <?php endif; ?>
......
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