Parcourir la source

Remove stray sections

Vijayakrishnan Krishnan il y a 4 ans
Parent
commit
36d71c8088

+ 0 - 34
storage/sections/name/form.blade.php

@@ -1,34 +0,0 @@
-<?php
-
-
-$contentData = json_decode($section->content_data, true);
-
-$firstName = isset($contentData['firstName']) ? $contentData['firstName'] : '';
-$lastName = isset($contentData['lastName']) ? $contentData['lastName'] : '';
-
-?>
-
-<div>
-
-    <div class="card">
-        <div class="card-body">
-            <form method="POST" action="/process_form_submit">
-                <input type="hidden" name="section_uid" value="<?= $section->uid ?>">
-                
-                <div class="form-group">
-                    <label for="">First Name</label>
-                    <input type="text" class="form-control" name="firstName" value="<?= $firstName ?>" placeholder="first name">
-                </div>
-
-                <div class="form-group">
-                    <label for="">Last Name</label>
-                    <input type="text" class="form-control" name="lastName" value="<?= $lastName ?>" placeholder="last name">
-                </div>
-                <div class="form-group">
-                    <button class="btn btn-primary">Submit</button>
-                </div>
-            </form>
-        </div>
-
-    </div>
-</div>

+ 0 - 17
storage/sections/name/processor.php

@@ -1,17 +0,0 @@
-<?php 
-
-/**
- * Use this to generate newContentData
- * $request 
- * $note 
- * $section 
- */
-
-
-$firstName = $request->get('firstName');
-$lastName = $request->get('lastName');
-
-$newContentData = [
-    'firstName'=>$firstName,
-    'lastName'=>$lastName
-];

+ 0 - 12
storage/sections/name/summary.php

@@ -1,12 +0,0 @@
-<?php 
-    $content_data = json_decode($section->content_data, true);
-
-    $firstName = isset($content_data['firstName'])?$content_data['firstName']:'';
-    $lastName = isset($content_data['lastName'])?$content_data['lastName']:'';
-
-?>
-
-<div>
-    <strong>First name: </strong> <?= $firstName ?> <br/>
-    <strong>Last name: </strong> <?= $lastName ?>
-</div>

+ 0 - 43
storage/sections/test1/form.blade.php

@@ -1,43 +0,0 @@
-<?php
-$contentData = [
-    'nickname'=>'',
-    'favoriteColor'=>''
-]; 
-if($section){
-    $contentData = json_decode($section->content_data, true);
-}
-?>
-<div id="section_form">
-
-    <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" up-target="#note-container" 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="<?= $contentData['nickname'] ?>" placeholder="nickname">
-                </div>
-                <div class="form-group">
-                    <label for="">Favorite color</label>
-                    <input type="text" class="form-control" name="favoriteColor" value="<?= $contentData['favoriteColor'] ?>" placeholder="Favorite color">
-                </div>
-                <div class="form-group">
-                    <button class="btn btn-primary">Submit</button>
-                </div>
-            </form>
-        </div>
-
-    </div>
-</div>

+ 0 - 9
storage/sections/test1/processor.php

@@ -1,9 +0,0 @@
-<?php 
-
-$nickname = $request->get('nickname');
-$favoriteColor = $request->get('favoriteColor');
-
-$newContentData = [
-    'nickname'=>$nickname,
-    'favoriteColor'=>$favoriteColor
-];

+ 0 - 3
storage/sections/test1/summary.php

@@ -1,3 +0,0 @@
-<div class="p-5" style="background-color:<?= $newContentData['favoriteColor']; ?>; ">
-    <h1><?= $newContentData['nickname']; ?></h1>
-</div>

+ 0 - 43
storage/sections/test2/form.blade.php

@@ -1,43 +0,0 @@
-<?php
-$contentData = [
-    'nickname'=>'',
-    'favoriteColor'=>''
-]; 
-if($section){
-    $contentData = json_decode($section->content_data, true);
-}
-?>
-<div id="section_form">
-
-    <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" up-target="#note-container" 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="<?= $contentData['nickname'] ?>" placeholder="nickname">
-                </div>
-                <div class="form-group">
-                    <label for="">Favorite color</label>
-                    <input type="text" class="form-control" name="favoriteColor" value="<?= $contentData['favoriteColor'] ?>" placeholder="Favorite color">
-                </div>
-                <div class="form-group">
-                    <button class="btn btn-primary">Submit</button>
-                </div>
-            </form>
-        </div>
-
-    </div>
-</div>

+ 0 - 9
storage/sections/test2/processor.php

@@ -1,9 +0,0 @@
-<?php 
-
-$nickname = $request->get('nickname');
-$favoriteColor = $request->get('favoriteColor');
-
-$newContentData = [
-    'nickname'=>$nickname,
-    'favoriteColor'=>$favoriteColor
-];

+ 0 - 3
storage/sections/test2/summary.php

@@ -1,3 +0,0 @@
-<div class="p-5" style="background-color:<?= $newContentData['favoriteColor']; ?>; ">
-    <h1><?= $newContentData['nickname']; ?></h1>
-</div>

+ 0 - 40
storage/sections/weight/form.blade.php

@@ -1,40 +0,0 @@
-<?php
-
-
-$contentData = json_decode($section->content_data, true);
-
-$currentWeight = [];
-
-if(isset($contentData['currentWeight'])){
-    $currentWeight  = $contentData['currentWeight'];
-}
-
-$weight = isset($currentWeight['weight']) ? $currentWeight['weight'] : '';
-$effectiveDate = isset($currentWeight['effectiveDate']) ? $currentWeight['effectiveDate'] : '';
-
-?>
-
-<div>
-
-    <div class="card">
-        <div class="card-body">
-            <form method="POST" action="/process_form_submit">
-                <input type="hidden" name="section_uid" value="<?= $section->uid ?>">
-                
-                <div class="form-group">
-                    <label for="">Weight</label>
-                    <input type="text" class="form-control" name="weight" value="<?= $weight ?>" placeholder="weight">
-                </div>
-
-                <div class="form-group">
-                    <label for="">Effective Date</label>
-                    <input type="date" class="form-control" name="effectiveDate" value="<?= $effectiveDate ?>" placeholder="effective date">
-                </div>
-                <div class="form-group">
-                    <button class="btn btn-primary">Submit</button>
-                </div>
-            </form>
-        </div>
-
-    </div>
-</div>

+ 0 - 47
storage/sections/weight/processor.php

@@ -1,47 +0,0 @@
-<?php 
-
-/**
- * Use this to generate newContentData
- * $request 
- * $note 
- * $section 
- */
-
- $contentData = json_decode($section->content_data, true);
-
- if(!isset($contentData['weights'])){
-     $contentData['weightLog'] = [];
- }
-
-
-$weight = $request->get('weight');
-$effectiveDate = $request->get('effectiveDate');
-
-$currentWeight = [
-    'weight'=>$weight, 
-    'effectiveDate' => $effectiveDate
-];
-
-
-$weightLog = [];
-
-if(isset($contentData['weightLog'])){
-    $weightLog = $contentData['weightLog'];
-}
-
-$weightLog[] = $currentWeight;
-
-
-
-$newContentData = [
-    'currentWeight' => $currentWeight,
-    'weightLog' => $weightLog, 
-    'measurements' => [
-        [
-            'label'=> 'weight',
-            'value' => $weight, 
-            'effectiveDate' => $effectiveDate,
-            'memo' => 'Created from note.'
-        ]
-    ]
-];

+ 0 - 33
storage/sections/weight/summary.php

@@ -1,33 +0,0 @@
-<?php
-$content_data = json_decode($section->content_data, true);
-
-$currentWeight = [];
-
-if (isset($content_data['currentWeight'])) {
-    $currentWeight  = $content_data['currentWeight'];
-}
-
-
-$weight = isset($currentWeight['weight']) ? $currentWeight['weight'] : '';
-$effectiveDate = isset($currentWeight['effectiveDate']) ? $currentWeight['effectiveDate'] : '';
-
-$weightLog = [];
-if(isset($content_data['weightLog'])){
-    $weightLog = $content_data['weightLog'];
-}
-
-?>
-
-<div>
-    <strong>Current weight: </strong>  <?= $weight ?> <br/>
-    <strong>Effective date: </strong> <?= $effectiveDate ?><br/>
-    <strong>Weight log</strong>
-    <table>
-    <?php foreach($weightLog as $weight): ?>
-        <tr>
-            <td><?= $weight['effectiveDate'] ?></td>
-            <td><?= $weight['weight'] ?></td>
-        </tr>
-    <?php endforeach; ?>
-    </table>
-</div>