summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-04-25 17:30:51 +0200
committermsquare <msquare@notrademark.de>2019-04-25 17:56:23 +0200
commit7c3a0c70e8d23f47287ead148c6b8682216352c6 (patch)
tree40d7a7fab99134223774f61ba291a92ad7b0bf35 /includes/pages
parent99306688370874b3153ec6ab185a58044881cb1a (diff)
Bugfix: default value for planned_arrival_date and don't overwrite dect
Fixed registration form formatting Fixed profile request attributes fallback values
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/guest_login.php10
-rw-r--r--includes/pages/user_settings.php8
2 files changed, 9 insertions, 9 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index 5a760319..a4bf4808 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -203,7 +203,7 @@ function guest_register()
'first_name' => $preName,
'last_name' => $lastName,
'shirt_size' => $tshirt_size,
- 'planned_arrival_date' => Carbon::createFromTimestamp($planned_arrival_date),
+ 'planned_arrival_date' => $enable_planned_arrival ? Carbon::createFromTimestamp($planned_arrival_date) : null,
]);
$personalData->user()
->associate($user)
@@ -303,13 +303,13 @@ function guest_register()
])
]),
div('row', [
- div('col-sm-6', [
- $enable_planned_arrival ? form_date(
+ $enable_planned_arrival ? div('col-sm-6', [
+ form_date(
'planned_arrival_date',
__('Planned date of arrival') . ' ' . entry_required(),
$planned_arrival_date, $buildup_start_date, $teardown_end_date
- ) : ''
- ]),
+ )
+ ]) : '',
div('col-sm-6', [
$enable_tshirt_size ? form_select('tshirt_size',
__('Shirt size') . ' ' . entry_required(),
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index 9099f658..ae29e4d8 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -70,15 +70,15 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
}
// Trivia
- $user_source->personalData->last_name = strip_request_item('lastname', $user_source['Name']);
- $user_source->personalData->first_name = strip_request_item('prename', $user_source['Vorname']);
+ $user_source->personalData->last_name = strip_request_item('lastname', $user_source->personalData->last_name);
+ $user_source->personalData->first_name = strip_request_item('prename', $user_source->personalData->first_name);
if (strlen(strip_request_item('dect')) <= 40) {
- $user_source->contact->dect = strip_request_item('dect', $user_source['DECT']);
+ $user_source->contact->dect = strip_request_item('dect', $user_source->contact->dect);
} else {
$valid = false;
error(__('For dect numbers are only 40 digits allowed.'));
}
- $user_source->contact->mobile = strip_request_item('mobile', $user_source['Handy']);
+ $user_source->contact->mobile = strip_request_item('mobile', $user_source->contact->mobile);
if ($valid) {
$user_source->save();