Skip to content

Commit 59ed6f7

Browse files
committed
fix profile form
1 parent 5aeb7f0 commit 59ed6f7

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

resources/views/profiles/edit.blade.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</div>
5656
</div>
5757
</div>
58-
{{ html()->model($user->profile) }}
58+
@php( html()->model($user->profile) )
5959
{{ html()->form('POST', route('profile.update', $user->name))
6060
->id('user_profile_form')
6161
->class('form-horizontal')
@@ -161,11 +161,11 @@
161161
</div>
162162
</div>
163163
{{ html()->form()->close() }}
164-
{{ html()->endModel() }}
164+
@php( html()->endModel() )
165165
</div>
166166

167167
<div class="tab-pane fade edit-settings-tab" role="tabpanel" aria-labelledby="edit-settings-tab">
168-
{{ html()->model($user) }}
168+
@php( html()->model($user) )
169169
{{ html()->form('POST', action([App\Http\Controllers\ProfilesController::class, 'updateUserAccount'], $user->id))
170170
->id('user_basics_form')
171171
->open() }}
@@ -265,7 +265,7 @@
265265
</div>
266266
</div>
267267
{{ html()->form()->close() }}
268-
{{ html()->endModel() }}
268+
@php( html()->endModel() )
269269
</div>
270270

271271
<div class="tab-pane fade edit-account-tab" role="tabpanel" aria-labelledby="edit-account-tab">
@@ -289,7 +289,7 @@
289289
{{ trans('profile.changePwTitle') }}
290290
</h3>
291291

292-
{{ html()->model($user) }}
292+
@php( html()->model($user) )
293293
{{ html()->form('POST', action([App\Http\Controllers\ProfilesController::class, 'updateUserPassword'], $user->id))
294294
->attribute('autocomplete', 'new-password')
295295
->open() }}
@@ -340,7 +340,7 @@
340340
</div>
341341
</div>
342342
{{ html()->form()->close() }}
343-
{{ html()->endModel() }}
343+
@php( html()->endModel() )
344344

345345
</div>
346346

@@ -357,7 +357,7 @@
357357
<div class="row">
358358
<div class="col-sm-6 offset-sm-3 margin-bottom-3 text-center">
359359

360-
{{ html()->model($user) }}
360+
@php( html()->model($user) )
361361
{{ html()->form('POST', action([App\Http\Controllers\ProfilesController::class, 'deleteUserAccount'], $user->id))
362362
->open() }}
363363

@@ -374,19 +374,19 @@
374374
</div>
375375

376376
{{ html()->button('<i class="fa fa-trash-o fa-fw" aria-hidden="true"></i>' . trans('profile.deleteAccountBtn'))
377-
->class('btn btn-block btn-danger')
378-
->id('delete_account_trigger')
379-
->disabled()
380-
->type('button')
381-
->attribute('data-toggle', 'modal')
382-
->attribute('data-submit', trans('profile.deleteAccountBtnConfirm'))
383-
->attribute('data-target', '#confirmForm')
384-
->attribute('data-modalClass', 'modal-danger')
385-
->attribute('data-title', trans('profile.deleteAccountConfirmTitle'))
386-
->attribute('data-message', trans('profile.deleteAccountConfirmMsg')) }}
377+
->class('btn btn-block btn-danger')
378+
->id('delete_account_trigger')
379+
->disabled()
380+
->type('button')
381+
->attribute('data-toggle', 'modal')
382+
->attribute('data-submit', trans('profile.deleteAccountBtnConfirm'))
383+
->attribute('data-target', '#confirmForm')
384+
->attribute('data-modalClass', 'modal-danger')
385+
->attribute('data-title', trans('profile.deleteAccountConfirmTitle'))
386+
->attribute('data-message', trans('profile.deleteAccountConfirmMsg')) }}
387387

388388
{{ html()->form()->close() }}
389-
{{ html()->endModel() }}
389+
@php( html()->endModel() )
390390

391391
</div>
392392
</div>

resources/views/scripts/form-modal-script.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script type="text/javascript">
2-
2+
$(function () {
33
var modalId = $('#confirmForm');
44
55
modalId.on('show.bs.modal', function (e) {
@@ -23,5 +23,5 @@
2323
modalId.find('.modal-footer #confirm').on('click', function(){
2424
$(this).data('form').submit();
2525
});
26-
26+
});
2727
</script>

0 commit comments

Comments
 (0)