|
@@ -1,49 +0,0 @@
|
|
|
-<?php
|
|
|
-$contentData = [
|
|
|
- 'nickname'=>'',
|
|
|
- 'favoriteColor'=>''
|
|
|
-];
|
|
|
-if($section){
|
|
|
- $contentData = json_decode($section->content_data, true);
|
|
|
-}
|
|
|
-
|
|
|
-$nickname = isset($contentData['nickname'])?$contentData['nickname']:'nickname is not set';
|
|
|
-$favoriteColor = isset($contentData['favoriteColor'])?$contentData['favoriteColor']:'favorite color is not set';
|
|
|
-?>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-<div>
|
|
|
-
|
|
|
- <div class="card">
|
|
|
- <div class="card-header">
|
|
|
- <?php if(!$section):?>
|
|
|
- <div class="alert alert-info">Create section</div>
|
|
|
- <?php else: ?>
|
|
|
- <div class="alert alert-info">Update section</div>
|
|
|
- <?php endif; ?>
|
|
|
- </div>
|
|
|
- <div class="card-body">
|
|
|
- <form method="POST" action="/process_form_submit" up-history="false">
|
|
|
- <?php if($section): ?>
|
|
|
- <input type="hidden" name="section_uid" value="<?= $section->uid?>">
|
|
|
- <?php else: ?>
|
|
|
- <input type="hidden" name="note_uid" value="<?= $note->uid?>">
|
|
|
- <input type="hidden" name="section_template_uid" value="<?= $sectionTemplate->uid ?>">
|
|
|
- <?php endif; ?>
|
|
|
- <div class="form-group">
|
|
|
- <label for="">Nickname</label>
|
|
|
- <input type="text" class="form-control" name="nickname" value="<?= $nickname ?>" placeholder="nickname">
|
|
|
- </div>
|
|
|
- <div class="form-group">
|
|
|
- <label for="">Favorite color</label>
|
|
|
- <input type="text" class="form-control" name="favoriteColor" value="<?= $favoriteColor ?>" placeholder="Favorite color">
|
|
|
- </div>
|
|
|
- <div class="form-group">
|
|
|
- <button class="btn btn-primary">Submit</button>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
-</div>
|