|
@@ -93,7 +93,11 @@ if(!function_exists('renderNoteTemplates')) {
|
|
function _renderNoteTemplate($template, $topLevel) {
|
|
function _renderNoteTemplate($template, $topLevel) {
|
|
echo
|
|
echo
|
|
'<div class="note-template-item" template="' . @$template->template . '">' .
|
|
'<div class="note-template-item" template="' . @$template->template . '">' .
|
|
- '<div class="note-template-text"><span class="label">' . $template->text . '</span></div>';
|
|
|
|
|
|
+ '<div class="note-template-text">';
|
|
|
|
+ echo '<span class="label">' .
|
|
|
|
+ '<input type="checkbox" />' .
|
|
|
|
+ '<span>' . $template->text . '</span>' .
|
|
|
|
+ '</span></div>';
|
|
if(isset($template->children) && count($template->children)) {
|
|
if(isset($template->children) && count($template->children)) {
|
|
echo '<i class="fa fa-chevron-right has-children"></i>';
|
|
echo '<i class="fa fa-chevron-right has-children"></i>';
|
|
echo '<div class="note-template-children">';
|
|
echo '<div class="note-template-children">';
|
|
@@ -102,6 +106,12 @@ if(!function_exists('renderNoteTemplates')) {
|
|
}
|
|
}
|
|
echo '</div>';
|
|
echo '</div>';
|
|
}
|
|
}
|
|
|
|
+ else if(isset($template->type) && $template->type === 'text') {
|
|
|
|
+ echo '<i class="fa fa-chevron-right has-children"></i>';
|
|
|
|
+ echo '<div class="note-template-children">';
|
|
|
|
+ echo '<textarea class="form-control form-control-sm"></textarea>';
|
|
|
|
+ echo '</div>';
|
|
|
|
+ }
|
|
echo '</div>';
|
|
echo '</div>';
|
|
}
|
|
}
|
|
|
|
|
|
@@ -111,6 +121,12 @@ if(!function_exists('renderNoteTemplates')) {
|
|
// print_r($templates);
|
|
// print_r($templates);
|
|
// echo '</pre>';
|
|
// echo '</pre>';
|
|
echo '<div class="note-template-container">';
|
|
echo '<div class="note-template-container">';
|
|
|
|
+ echo '<div class="position-relative w-100">' .
|
|
|
|
+ '<div class="note-template-buttons d-flex align-items-center">' .
|
|
|
|
+ '<button class="btn btn-sm btn-default bg-white border text-primary border-primary">Apply</button>' .
|
|
|
|
+ '<button class="btn btn-sm btn-default bg-light border text-secondary border-secondary note-template-close-trigger">Close</button>' .
|
|
|
|
+ '</div>' .
|
|
|
|
+ '</div>';
|
|
foreach ($templates as $template) {
|
|
foreach ($templates as $template) {
|
|
_renderNoteTemplate($template, true);
|
|
_renderNoteTemplate($template, true);
|
|
}
|
|
}
|