first commit
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="actives_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/actives/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Name">Name</label>
|
||||
|
||||
<input type="text" class="form-control" id="name" name="name" value="<%= it.get_name() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__blank" href="/admin/actives-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
<span class="d-flex justify-content-md-end mr-1"><a class="btn btn-info btn-sm" target="_self" href="/admin/resync/actives">Resync with shopify</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.name %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= data.handle ?? "N/A" %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= data.description ?? "N/A" %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<% if(data.variables_scores){ %>
|
||||
<% const outputVariablesScoresObj = JSON.parse(data.variables_scores);
|
||||
Object.keys(outputVariablesScoresObj).forEach( var_score => { %>
|
||||
|
||||
<%~ outputVariablesScoresObj[var_score] ? `${var_score}: ${outputVariablesScoresObj[var_score]}</br>`: ''%>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/actives-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/actives-edit/<%= data.id %>">Edit</a> <a class="btn btn-link link-underline text-underline text-danger btn-sm" href="/admin/actives-delete/<%= data.id %>">Delete</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,69 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/actives-add" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-7 col-sm-9 col-12" style="max-width: 375px;">
|
||||
<label for="name" class="control-label">Name</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_name" name="name" value="<%= it.form_fields['name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-7 col-sm-9 col-12" style="max-width: 375px;">
|
||||
<label for="handle" class="control-label">Handle</label>
|
||||
|
||||
<small class="text-muted">This is used to create the qrcode.</small>
|
||||
<input type="text" required class="form-control data-input" id="text_handle" name="handle" value="<%= it.form_fields['handle'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-7 col-sm-9 col-12" style="max-width: 375px;">
|
||||
<label for="description" class="control-label">Description</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_description" name="description" value="<%= it.form_fields['description'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap mb-5">
|
||||
<% it.output_variables?.forEach(oVar => { %>
|
||||
<div class="form-group col-lg-3 col-md-5 col-12" style="max-width: 311px;">
|
||||
<label for="<%= oVar.name.replace(/ /g,"_")+'_id' %>" class="control-label"><%= oVar.name %></label>
|
||||
<input type="number" class="form-control data-input weight-active-score" id="<%= oVar.name.replace(/ /g,"_")+'_id' %>" oninput="weightScoreInputChange(this, event)" name="<%= oVar.name %>" />
|
||||
</div>
|
||||
<% }) %>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,120 @@
|
||||
<% if(it.layout_clean_mode) {%> <% layout("../layouts/admin/Clean") %> <% } else {%> <% layout("../layouts/admin/Main") %> <%}%>
|
||||
|
||||
<style>
|
||||
#answer-value {
|
||||
display: none;
|
||||
}
|
||||
#answer-image {
|
||||
display: none;
|
||||
}
|
||||
#answer-image.show {
|
||||
display: block;
|
||||
}
|
||||
#answer-value.show {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3"><%= it.heading %></h5>
|
||||
|
||||
<form action="/admin/answers-add" method="POST">
|
||||
<div class="form-group required col-md-5 col-sm-12">
|
||||
<label for="question_id" class="control-label">Question</label>
|
||||
<% const firstQuesType = it.questions[0].type; %>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select-question_id" name="question_id" required>
|
||||
<% it.questions.forEach(function(ques) { %>
|
||||
<option class="select_mapping_status_option" value="<%= ques.id %>" data-type="<%= ques.type %>"><%= ques.question %></option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12">
|
||||
<label for="answer" class="control-label">Answer</label>
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_answer" name="answer" value="<%= it.form_fields['answer'] %>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 <%= [4,5].includes(firstQuesType) ? 'show' : '' %>" id="answer-value">
|
||||
<label for="answer_value" class="control-label">Answer value</label>
|
||||
|
||||
<input id="integer_answer_value" name="answer_value" value="<%= it.form_fields['answer_value'] %>" class="form-control" type="number" pattern="d+" inputmode="numeric" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 <%= firstQuesType == 6 ? 'show' : '' %>" id="hide-answer-select">
|
||||
<label for="hide_answer" class="control-label">Hide answer label</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="bool_hide_answer" name="hide_answer">
|
||||
<option value="0" selected>No</option>
|
||||
<option value="1">Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12">
|
||||
<label for="order" class="control-label">Order</label>
|
||||
|
||||
<input type="number" required class="form-control data-input" id="number_order" name="order" value="<%= it.form_fields['order'] %>" step="1" min="1" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12">
|
||||
<label for="explaination" class="control-label">Explanation</label>
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_explaination" name="explaination" value="<%= it.form_fields['explaination'] %>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12" id="answer-image">
|
||||
<label for="image_id" class="control-label">Image</label>
|
||||
|
||||
<img id="media_image_id" src="<%= it.form_fields['image_id'] %>" class="mb-3" style="width: auto; height: 200px; object-fit: contain; background: #00000010; border-radius: 8px" />
|
||||
|
||||
<button id="button_file_image_id" type="button" class="btn btn-outline-primary btn-block mkd-uppload-image-button data-input" data-upload-for="image_id">Upload</button>
|
||||
<input id="file_image_id" name="image_id" type="text" hidden value="<%= it.form_fields['image_id'] %>" class="form-control-file" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12">
|
||||
<label for="response_header" class="control-label">Response header</label>
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_response_header" name="response_header" value="<%= it.form_fields['response_header'] %>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12">
|
||||
<label for="response_body" class="control-label">Response body</label>
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_response_body" name="response_body" value="<%= it.form_fields['response_body'] %>" />
|
||||
</div>
|
||||
|
||||
<% /*
|
||||
<div class="form-group col-md-5 col-sm-12">
|
||||
<label for="response_arguments" class="control-label">Response arguments</label>
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_response_arguments" name="response_arguments" value="<%= it.form_fields['response_arguments'] %>" />
|
||||
</div>
|
||||
*/ %>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12">
|
||||
<label for="black_list_actives" class="control-label">Black listed actives</label>
|
||||
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_black_list_actives" name="black_list_actives" multiple>
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<option class="select_mapping_status_option" value="<%= active.id %>"><%= active.name %></option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/add-answer.js?v=1.1"></script>
|
||||
@@ -0,0 +1,70 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/output-variables-add" method="POST">
|
||||
<div class="form-group required col-md-10 col-12 ">
|
||||
<label for="name" class="control-label">Name</label>
|
||||
<input type="text" required class="form-control data-input" id="text_name" name="name" value="<%= it.form_fields['name'] %>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-10 col-12 ">
|
||||
<label for="active_list" class="control-label">Actives list</label>
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="active_list_select" name="active_list" required multiple size="<%= it.actives?.length ?? 5 %>" style="height: 100%;">
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<option class="select_mapping_status_option" value="<%= active.id %>">
|
||||
<%= active.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-10 col-12" id="ranges-responses-container">
|
||||
<label for="ranges_response" class="control-label">Ranges responses</label>
|
||||
|
||||
<div class="d-flex flex-row col-12 px-0 align-items-end" data-box-id="0">
|
||||
<div class="form-group col-2 pl-0">
|
||||
<label for="range_0" class="control-label">Range</label>
|
||||
<input type="text" class="form-control data-input" id="range_0" placeholder="0-20" name="ranges" value="" />
|
||||
</div>
|
||||
<div class="form-group col-6 pl-0">
|
||||
<label for="response_0" class="control-label">Response</label>
|
||||
<input type="text" class="form-control data-input" id="response_0" placeholder="Response to accumlated weight between 0% and 20%" name="responses" value="" />
|
||||
</div>
|
||||
<button type="button" onclick="addRangeResponse(event, this)" class="form-group my-0 col-2 btn btn-primary mb-3 mx-1" style="height:max-content;height:-moz-max-content" data-next="1">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/add-output-variable.js"></script>
|
||||
@@ -0,0 +1,222 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
|
||||
<div class="tab-content m-xl-4 m-2">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card py-3">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/questions-add" method="POST" id="add-question-form">
|
||||
|
||||
|
||||
<div class="form-group required col-xl-6 col-12 ">
|
||||
<label for="quiz_id" class="control-label">Quiz</label>
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select-quiz_id" name="quiz_id" required onchange="questionSelectionChanged(this, event)">
|
||||
<% it.quizzes.forEach(function(quiz) { %>
|
||||
<option class="select_mapping_status_option" value="<%= quiz.id %>" data-last-order="<%= quiz.lastOrder ?? 1 %>">
|
||||
<%= quiz.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-xl-6 col-12">
|
||||
<label for="order" class="control-label">Order</label>
|
||||
|
||||
<input type="number" class="form-control data-input disabled" disabled id="shown_number_order" value="<%= it.quizzes[0].lastOrder ? parseInt(it.quizzes[0].lastOrder) + 1 : 1 %>" step="1" min="1" />
|
||||
<input type="number" required hidden class="form-control data-input disabled" id="number_order" name="order" value="<%= it.quizzes[0].lastOrder ? parseInt(it.quizzes[0].lastOrder) + 1 : 1 %>" step="1" min="1" />
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-xl-6 col-12 ">
|
||||
<label for="type" class="control-label">Type</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_type" name="type" required>
|
||||
<% Object.keys(it.type_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["type"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_type_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.type_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-xl-6 col-12 ">
|
||||
<label for="question" class="control-label">Question</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_question" name="question" value="<%= it.form_fields['question'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12" hidden id="image-dimensions">
|
||||
<label for="image_dimensions" class="control-label">Image dimensions</label></br>
|
||||
|
||||
<div id="image-dimensions" class="d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="image-width">Width</label>
|
||||
<input type="number" oninput="changeDimension('width',this)" class="form-control data-input" id="image-width" name="image_width" step="any" value="<%= it.form_fields['image_width'] %>" />
|
||||
|
||||
</div>
|
||||
<div class="d-flex ml-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="image-height">Height</label>
|
||||
<input type="number" oninput="changeDimension('height',this)" class="form-control data-input" id="image-height" name="image_width" step="any" value="<%= it.form_fields['image_height'] %>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3">Demo box</div>
|
||||
<div id="demo-box" style="width: <%= it.form_fields['image_width'] ? it.form_fields['image_width'] : 0 %>px; height: <%= it.form_fields['image_height'] ? it.form_fields['image_height'] : 0 %>px; border: 1px solid black;" class="mt-3 d-flex align-items-center justify-content-center text-center">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12">
|
||||
<label for="note" class="control-label">Note</label>
|
||||
|
||||
|
||||
|
||||
<textarea class="form-control data-input" id="text_note" name="note" rows="3"><%= it.form_fields['note'] %></textarea>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12">
|
||||
<label for="note_type" class="control-label">Note type</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_note_type" name="note_type">
|
||||
<option class="select_mapping_note_type_option"></option>
|
||||
|
||||
<% Object.keys(it.note_type_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["note_type"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_note_type_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.note_type_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12 ">
|
||||
<label for="depends_on" class="control-label">Depends on question</label></br>
|
||||
<small class="text-muted">If you want this question to depend on another question answer fill these.</small>
|
||||
|
||||
<input type="text" hidden class="form-control data-input" id="text_depends_on" name="depends_on" />
|
||||
|
||||
<div id="depends-container" class="d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="depended_question_id">Question</label>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="depended_question_id">
|
||||
<option class="select_mapping_status_option" value=""></option>
|
||||
<% it.questions.forEach(function(ques) { %>
|
||||
<option class="select_mapping_status_option" value="<%= ques.id %>">
|
||||
<%= ques.question %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="d-flex ml-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="depended_answer">Answer</label>
|
||||
<input type="text" class="form-control data-input" id="depended_answer" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12" hidden id="slider-select">
|
||||
<label for="slider_range" class="control-label">Slider range</label>
|
||||
<input type="text" hidden class="form-control data-input" id="text_slider_range" name="slider_range" value="<%= it.form_fields['slider_range'] %>" />
|
||||
<div id="slider-range-container" class="d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="min-slide-range">Min</label>
|
||||
<input type="number" class="form-control data-input" id="min-slide-range" />
|
||||
</div>
|
||||
<div class="d-flex ml-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="max-slide-range">Max</label>
|
||||
<input type="text" class="form-control data-input" id="max-slide-range" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12 ">
|
||||
<label for="output_variable_name" class="control-label">Main output variable</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker extra-output-var custom-picker d-block w-100" data-style="btn-light" data-live-search="true" name="output_variable_name" id="text_output_variable_name">
|
||||
<option class="select_main_output_variable_option" value=""></option>
|
||||
<% it.outputVariables.forEach(function(oVar) { %>
|
||||
<option class="select_main_output_variable_option" value="<%= oVar.name %>">
|
||||
<%= oVar.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12 ">
|
||||
<label for="weight" class="control-label">Weight</label>
|
||||
|
||||
|
||||
<input id="number_weight" name="weight" value="<%= it.form_fields['weight'] %>" class="form-control" type="number" min="0" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-xl-6 col-12" id="extra-outputs">
|
||||
<label for="extra_output_variable" class="control-label">Extra output variables</label>
|
||||
|
||||
<input type="text" class="form-control data-input" hidden id="text_extra_output_variable" name="extra_output_variable" value="<%= it.form_fields['extra_output_variable'] %>" />
|
||||
|
||||
<div class="output-variable-container mb-2 d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="extra-output-var">Output variable</label>
|
||||
<select class="selectpicker custom-picker d-block w-100 extra-output-var" id="extra-output-var" data-style="btn-light" data-live-search="true">
|
||||
<option class="select_mapping_status_option" value=""></option>
|
||||
<% it.outputVariables.forEach(function(oVar) { %>
|
||||
<option class="select_mapping_status_option" value="<%= oVar.name %>">
|
||||
<%= oVar.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="d-flex ml-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="extra-output-weight">Weight</label>
|
||||
<input type="number" class="form-control data-input extra-output-weight" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" class="add-another-extra btn btn-success my-3" onclick="addExtraOutputVariable()">Add another extra</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
const outputVariables = [<% it.outputVariables.forEach(function(oVar) { %><%~ `'${oVar.name}',` %> <% }) %>];
|
||||
</script>
|
||||
<script src="/js/main.js?v=1.2"></script>
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/quizzes-add" method="POST" >
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="name" class="control-label">Name</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input"
|
||||
id="text_name"
|
||||
name="name" value="<%= it.form_fields['name'] %>"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="description" class="control-label">Description</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input"
|
||||
id="text_description"
|
||||
name="description" value="<%= it.form_fields['description'] %>"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/profile-sections-add" method="POST">
|
||||
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="section_title" class="control-label">Section title</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_section_title" name="section_title" value="<%= it.form_fields['section_title'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="output_variable_list" class="control-label">Variables List</label>
|
||||
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_output_variable_list" name="output_variable_list" multiple size="<%= it.output_variables?.length ?? 5 %>" style="height: 100%;">
|
||||
<% it.output_variables?.forEach(ovar => { %>
|
||||
<option value="<%= ovar.id %>"><%= ovar.name %></option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,123 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/rules-add" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="output_variable_name" class="control-label">Output variable</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_output_variable_name" name="output_variable_name" required>
|
||||
<% it.outputVariables.forEach(function(outVar) { %>
|
||||
<option class="select_mapping_status_option" value="<%= outVar.name %>">
|
||||
<%= outVar.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="actives" class="control-label">Actives</label>
|
||||
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_actives" name="actives" required multiple>
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<option class="select_text_actives" value="<%= active.name %>">
|
||||
<%= active.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="operator" class="control-label">Condition operator</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_operator" name="operator" required>
|
||||
<% Object.keys(it.operator_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["operator"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_operator_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.operator_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="compare_value" class="control-label">Compare value</label>
|
||||
|
||||
|
||||
<input id="number_compare_value" required name="compare_value" value="<%= it.form_fields['compare_value'] %>" class="form-control" type="number" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="min" class="control-label">Between Min</label>
|
||||
|
||||
|
||||
<input id="number_min" name="min" value="<%= it.form_fields['min'] %>" class="form-control" type="number" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="max" class="control-label">Between Max</label>
|
||||
|
||||
|
||||
<input id="number_max" name="max" value="<%= it.form_fields['max'] %>" class="form-control" type="number" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="action" class="control-label">Action</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_action" name="action" required>
|
||||
<% Object.keys(it.action_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["action"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_action_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.action_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,116 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/users-add" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="email" class="control-label">Email</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_email" name="email" value="<%= it.form_fields['email'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="password" class="control-label">Password</label>
|
||||
|
||||
|
||||
<input id="password_password" required name="password" class="form-control" type="password" autocomplete="new-password">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="first_name" class="control-label">First Name</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_first_name" name="first_name" value="<%= it.form_fields['first_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="last_name" class="control-label">Last Name</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_last_name" name="last_name" value="<%= it.form_fields['last_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="image" class="control-label">Image</label>
|
||||
|
||||
|
||||
<img id="media_image" src="<%= it.form_fields['image'] %>" class="mb-3" style="width:auto; height:200px; object-fit:contain; background:#00000010; border-radius:8px" />
|
||||
|
||||
<button id="button_file_image" type="button" class="btn btn-outline-primary btn-block mkd-uppload-image-button data-input" data-upload-for="image">Upload</button>
|
||||
<input id="file_image" name="image" type="text" hidden value="<%= it.form_fields['image'] %>" class="form-control-file">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="role_id" class="control-label">Role ID</label>
|
||||
|
||||
|
||||
<input id="integer_role_id" name="role_id" value="<%= it.form_fields['role_id'] %>" class="form-control" type="number" step="1" pattern="d+" inputmode="numeric" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="phone" class="control-label">Phone #</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_phone" name="phone" value="<%= it.form_fields['phone'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="status" class="control-label">Status</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_status" name="status" required>
|
||||
<% Object.keys(it.status_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["status"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_status_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.status_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,187 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="answers_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/answers/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Question ID">Question ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="question_id" name="question_id" value="<%= it.get_question_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__blank" href="/admin/answers-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<% if(data.question?.quiz){ %>
|
||||
<small><strong><%= data.question.quiz.id %></strong>: <%= data.question.quiz.name %></small>
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<% if(data.question){ %>
|
||||
<small><strong><%= data.question.id %></strong>: <%= data.question.question %></small>
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
|
||||
<% if(data.answer){ %>
|
||||
<strong><%= data.id %></strong>: <%= data.answer %>
|
||||
<% }else{ %>
|
||||
N/A
|
||||
<% } %>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= data.order %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<% if(data.image){ %>
|
||||
<div class='mkd-image-container'>
|
||||
<img class='img-fluid modal-image' src='<%= data.image.url %>' onerror="if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg'" />
|
||||
</div>
|
||||
<% } else {%>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
|
||||
<!-- <td>
|
||||
<span class="font-weight-bold">Response header</span>: <%= data.response_header || "N/A" %>
|
||||
</br>
|
||||
<span class="font-weight-bold">Response body</span>: <%= data.response_body || "N/A" %>
|
||||
</br>
|
||||
</td> -->
|
||||
|
||||
|
||||
<td>
|
||||
<% if(data.black_list_actives){
|
||||
let blActives = JSON.parse(data.black_list_actives);
|
||||
blActives = Array.isArray(blActives) ? blActives : [blActives];
|
||||
%>
|
||||
<% blActives.forEach(blActive => { %>
|
||||
<%= blActive %></br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/answers-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/answers-edit/<%= data.id %>">Edit</a> <a class="btn btn-link link-underline text-underline text-danger btn-sm" href="/admin/answers-delete/<%= data.id %>">Delete</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,93 @@
|
||||
<% if(it.layout_clean_mode) {%> <% layout("../layouts/admin/Clean", {get_page_name:()=> "Dashboard"}) %><% } else {%> <% layout("../layouts/admin/Main",{get_page_name:()=> "Dashboard"}) %><%}%>
|
||||
|
||||
<style>
|
||||
.draggable-list {
|
||||
border: 1px solid var(--border-color);
|
||||
color: var(--text-color);
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.draggable-list li {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.draggable-list li:not(:last-of-type) {
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.draggable-list .number {
|
||||
background-color: var(--background-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28px;
|
||||
height: 60px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.draggable-list li.over .draggable {
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
|
||||
.draggable-list .qustion-text {
|
||||
margin: 0 20px 0 0;
|
||||
}
|
||||
|
||||
.draggable-list li.right .qustion-text {
|
||||
color: #3ae374;
|
||||
}
|
||||
|
||||
.draggable-list li.wrong .qustion-text {
|
||||
color: #ff3838;
|
||||
}
|
||||
|
||||
.draggable {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 15px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.check-btn {
|
||||
border: none;
|
||||
font-size: 16px;
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.check-btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.check-btn:focus {
|
||||
outline: none;
|
||||
}
|
||||
.draggable-list li {
|
||||
margin-bottom: 8px;
|
||||
box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
|
||||
}
|
||||
.question-text {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="tab-content mx-2 my-2 mx-lg-4 my-lg-4 bg-white p-3" id="nav-tabContent">
|
||||
<div id="main-image" class="mb-4 col-12 col-xl-8 col-lg-10 px-0">
|
||||
<div class="form-group col-12 px-0">
|
||||
<label for="image" class="control-label">Main screen image</label>
|
||||
|
||||
<img id="media_image" src="<%= it.config.image?.url ?? '' %>" class="mb-3" style="width: 100%; height: 500px; object-fit: contain; background: #00000010; border-radius: 8px" />
|
||||
|
||||
<button id="button_file_image" type="button" class="btn btn-outline-primary btn-block mkd-uppload-image-button data-input" data-upload-for="image">Upload</button>
|
||||
<input id="file_image" name="image" type="text" hidden value="<%= it.config.image?.url ?? '' %>" class="form-control-file" />
|
||||
</div>
|
||||
<a class="btn btn-primary text-white w-100" onclick="updateMainPicture(this, event)" id="submit-btn">Update image</a>
|
||||
</div>
|
||||
<div id="order-container" class="mb-4 col-12 col-xl-8 col-lg-10 px-0"></div>
|
||||
<a class="btn btn-primary text-white" onclick="submitChanges(this, event)" id="submit-btn">Submit changes</a>
|
||||
</div>
|
||||
@@ -0,0 +1,64 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/actives-edit/<%= it.form_fields['id'] %>" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="name" class="control-label">Name</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_name" name="name" value="<%= it.form_fields['name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-7 col-sm-9 col-12" style="max-width: 375px;">
|
||||
<label for="handle" class="control-label">Handle</label>
|
||||
|
||||
<small class="text-muted">This is used to create the qrcode.</small>
|
||||
<input type="text" required class="form-control data-input" id="text_handle" name="handle" value="<%= it.form_fields['handle'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="description" class="control-label">Description</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_description" name="description" value="<%= it.form_fields['description'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap mb-5">
|
||||
<% it.output_variables?.forEach(oVar => { %>
|
||||
<div class="form-group col-md-6 col-12" style="max-width: 311px;">
|
||||
<label for="<%= oVar.name.replace(/ /g,"_")+'_id' %>" class="control-label"><%= oVar.name %></label>
|
||||
<input type="number" class="form-control data-input weight-active-score <%= it.form_fields[oVar.name] ? 'has-value':'' %>" oninput="weightScoreInputChange(this, event)" id="<%= oVar.name.replace(/ /g,"_")+'_id' %>" value="<%= it.form_fields[oVar.name] %>" name="<%= oVar.name %>" />
|
||||
</div>
|
||||
<% }) %>
|
||||
</div>
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,142 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/answers-edit/<%= it.answer['id'] %>" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="question_id" class="control-label">Question</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select-question_id" name="question_id" required>
|
||||
<% it.questions.forEach(function(ques) { %>
|
||||
<option class="select_mapping_status_option" value="<%= ques.id %>" data-type="<%= ques.type %>" <%= it.answer['question_id'] == ques.id ? 'selected':'' %>>
|
||||
<%= ques.question %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="answer" class="control-label">Answer</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_answer" name="answer" value="<%= it.answer['answer'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 <%= [4,5].includes(it.question['type']) ? 'show' : '' %>" id="answer-value">
|
||||
<label for="answer_value" class="control-label">Answer value</label>
|
||||
|
||||
|
||||
<input id="integer_answer_value" name="answer_value" value="<%= it.answer['answer_value'] %>" class="form-control" type="number" step="any" pattern="d+" inputmode="numeric" />
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group col-md-5 col-sm-12 <%= it.question['type'] == 6 ? 'show' : '' %>" id="hide-answer-select">
|
||||
<label for="hide_answer" class="control-label">Hide answer label</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="bool_hide_answer" name="hide_answer">
|
||||
<option value="0" <%= it.answer['hide_answer'] == 0 ? 'selected' : '' %>>No</option>
|
||||
<option value="1" <%= it.answer['hide_answer'] == 1 ? 'selected' : '' %>>Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="order" class="control-label">Order</label>
|
||||
|
||||
|
||||
<input type="number" required class="form-control data-input" id="number_order" name="order" value="<%= it.answer['order'] %>" step="1" min="1" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="explaination" class="control-label">Explanation</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_explaination" name="explaination" value="<%= it.answer['explaination'] ?? '' %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 <%= [5,6].includes(it.question.type) ? 'show':'' %>" id="answer-image">
|
||||
<label for="image_id" class="control-label">Image</label>
|
||||
|
||||
|
||||
<img id="media_image_id" src="<%= it.answer.image?.url %>" class="mb-3" style="width:auto; height:200px; object-fit:contain; background:#00000010; border-radius:8px" />
|
||||
|
||||
<button id="button_file_image_id" type="button" class="btn btn-outline-primary btn-block mkd-uppload-image-button data-input" data-upload-for="image_id">Upload</button>
|
||||
<input id="file_image_id" name="image_id" type="text" hidden value="<%= it.answer.image?.id %>" class="form-control-file">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="response_header" class="control-label">Response header</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_response_header" name="response_header" value="<%= it.answer['response_header'] ?? '' %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="response_body" class="control-label">Response body</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_response_body" name="response_body" value="<%= it.answer['response_body'] ?? '' %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="black_list_actives" class="control-label">Black listed actives</label>
|
||||
|
||||
<% blActivesList = [];
|
||||
if(it.answer['black_list_actives']){
|
||||
blActivesList= JSON.parse(it.answer['black_list_actives'])
|
||||
}
|
||||
%>
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_black_list_actives" name="black_list_actives" required multiple>
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<option class="select_mapping_status_option" value="<%= active.name %>" <%= blActivesList.includes(active.name) ? 'selected': '' %>>
|
||||
<%= active.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/add-answer.js">
|
||||
</script>
|
||||
@@ -0,0 +1,98 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/output-variables-edit/<%= it.outputVariable['id'] %>" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-10 col-12 ">
|
||||
<label for="name" class="control-label">Name</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_name" name="name" value="<%= it.outputVariable['name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-10 col-12 ">
|
||||
<label for="active_list" class="control-label">Actives list</label>
|
||||
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="active_list_select" name="active_list" multiple size="<%= it.actives?.length ?? 5 %>" style="height: 100%;">
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<option class="select_mapping_status_option" value="<%= active.id %>" <%= it.outputVariable.active_list ? (JSON.parse(it.outputVariable.active_list).indexOf(`${active.id}`) > -1 ? 'selected' : '') : '' %>>
|
||||
<%= active.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-10 col-12 " id="ranges-responses-container">
|
||||
<label for="ranges_response" class="control-label">Ranges responses</label>
|
||||
|
||||
<% if(it.outputVariable['ranges_response'] && JSON.parse(it.outputVariable['ranges_response']).length) {%>
|
||||
<% JSON.parse(it.outputVariable['ranges_response']).forEach((rr,index) => { %>
|
||||
<div class="d-flex flex-row col-12 px-0 align-items-end" data-box-id="<%= index %>">
|
||||
<div class="form-group col-2 pl-0">
|
||||
<label for="range_<%= index %>" class="control-label">Range</label>
|
||||
<input type="text" class="form-control data-input" id="text_range_<%= index %>" name="ranges" value="<%= Object.keys(rr)[0] %>" />
|
||||
</div>
|
||||
<div class="form-group col-8 pl-0">
|
||||
<label for="response_<%= index %>" class="control-label">Response</label>
|
||||
<input type="text" class="form-control data-input" id="text_response_<%= index %>" name="responses" value="<%= rr[Object.keys(rr)[0]] %>" />
|
||||
</div>
|
||||
<button type="button" onclick="addRangeResponse(event, this)" class="form-group my-0 col-2 btn btn-primary mb-3 mx-1" style="height:max-content;height:-moz-max-content" data-next="1">
|
||||
Add
|
||||
</button>
|
||||
<% if(index > 0){ %>
|
||||
<button type="button" onclick="removeRange(event, this)" class="form-group my-0 col-2 btn btn-danger mb-3 mx-1" style="height:max-content;height:-moz-max-content" data-box-id="<%= index %>">
|
||||
Del
|
||||
</button>
|
||||
<% } %>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
<div class="d-flex flex-row col-12 px-0 align-items-end" data-box-id="0">
|
||||
<div class="form-group col-2 pl-0">
|
||||
<label for="range_0" class="control-label">Range</label>
|
||||
<input type="text" class="form-control data-input" id="range_0" placeholder="0-20" name="ranges" value="" />
|
||||
</div>
|
||||
<div class="form-group col-6 pl-0">
|
||||
<label for="response_0" class="control-label">Response</label>
|
||||
<input type="text" class="form-control data-input" id="response_0" placeholder="Response to accumlated weight between 0% and 20%" name="responses" value="" />
|
||||
</div>
|
||||
<button type="button" onclick="addRangeResponse(event, this)" class="form-group my-0 col-2 btn btn-primary mb-3 mx-1" style="height:max-content;height:-moz-max-content" data-next="1">
|
||||
Add
|
||||
</button>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/js/add-output-variable.js"></script>
|
||||
@@ -0,0 +1,513 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<div class='custom-flash-message error'></div>
|
||||
<div class='custom-flash-message success'></div>
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content m-xl-4 m-2">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-xl-3 p-2">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left d-flex justify-content-between">
|
||||
<%= it.heading %>
|
||||
<a class="btn btn-link" <%~ it.nextQuestionId ? `href="/admin/questions-edit/${it.nextQuestionId}"` : ''%>>Next Question</a>
|
||||
</h5>
|
||||
<form action="/admin/questions-edit/<%= it.form_fields['id'] %>" method="POST" id="edit-question-form" class="d-flex flex-lg-row flex-column flex-lg-wrap col-12 px-0">
|
||||
<div class="col-lg-6 px-0 pr-lg-2 col-12">
|
||||
<h6 class="mb-4 text-md-left">
|
||||
Question
|
||||
</h6>
|
||||
<div class="form-group required px-0 col-12">
|
||||
<label for="quiz_id" class="control-label">Quiz</label>
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select-quiz_id" name="quiz_id" required>
|
||||
<% it.quizzes.forEach(function(quiz) { %>
|
||||
<option class="select_mapping_status_option" value="<%= quiz.id %>" <%= it.form_fields['quiz_id'] == quiz.id ? 'selected' : '' %>>
|
||||
<%= quiz.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="form-group px-0 col-12">
|
||||
<label for="ques_id" class="control-label">Question Id</label>
|
||||
|
||||
|
||||
<input type="number" disabled class="form-control data-input disabled" value="<%= it.form_fields['id'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group required px-0 col-12">
|
||||
<label for="order" class="control-label">Order</label>
|
||||
|
||||
|
||||
<input type="number" required class="form-control data-input" id="number_order" name="question_order" value="<%= it.form_fields['order'] %>" step="1" min="1" />
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group required px-0 col-12">
|
||||
<label for="type" class="control-label">Type</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_type" name="type" required>
|
||||
<% Object.keys(it.type_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["type"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_type_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %> data-type="<%= prop %>">
|
||||
<%= it.type_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required px-0 col-12">
|
||||
<label for="question" class="control-label">Question</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_question" name="question" value="<%= it.form_fields['question'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 px-0 <%= it.form_fields['type'] == 5 ? 'required' : '' %>" <%= it.form_fields['type'] != 5 ? 'hidden' : '' %> id="image-dimensions">
|
||||
<label for="image_dimension" class="control-label">Image dimensions</label></br>
|
||||
<div id="image-dimensions" class="d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 mr-0 flex-column px-0 col-lg col-12">
|
||||
<label for="image-width">Width</label>
|
||||
<input type="number" oninput="changeDimension('width',this)" class="form-control data-input" value="<%= it.form_fields['image_width'] %>" id="image-width" name="image_width" step="any" <%= it.form_fields['type'] == 5 ? 'required' : '' %> />
|
||||
|
||||
</div>
|
||||
<div class=" d-flex ml-lg-2 ml-0 flex-column px-0 col-lg col-12">
|
||||
<label for="image-height">Height</label>
|
||||
<input type="number" oninput="changeDimension('height',this)" class="form-control data-input" value="<%= it.form_fields['image_height'] %>" id="image-height" name="image_height" step="any" <%= it.form_fields['type'] == 5 ? 'required' : '' %> />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3">Demo box</div>
|
||||
<div id="demo-box" style="width: <%= it.form_fields['image_width'] ? it.form_fields['image_width'] : 0 %>px; height: <%= it.form_fields['image_height'] ? it.form_fields['image_height'] : 0 %>px; border: 1px solid black;" class="mt-3 d-flex align-items-center justify-content-center text-center">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group px-0 col-12">
|
||||
<label for="note" class="control-label">Note</label>
|
||||
|
||||
|
||||
<textarea class="form-control data-input" id="text_note" name="note" rows="3"><%= it.form_fields['note'] %></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group px-0 col-12">
|
||||
<label for="note_type" class="control-label">Note type</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_note_type" name="note_type">
|
||||
<option class="select_mapping_note_type_option"></option>
|
||||
<% Object.keys(it.note_type_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["note_type"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_note_type_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.note_type_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group px-0 col-12">
|
||||
<label for="depends_on" class="control-label">Depends on question</label></br>
|
||||
<small class="text-muted">If you want this question to depend on another question answer fill these.</small>
|
||||
<input type="text" hidden class="form-control data-input" id="text_depends_on" name="depends_on" value="<%= it.form_fields['depends_on'] %>" />
|
||||
|
||||
<div id="depends-container" class="d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="depended_question_id">Question</label>
|
||||
<% if(it.form_fields['depends_on']){
|
||||
var dependedQuesId = it.form_fields['depends_on'].split('|')[0];
|
||||
var dependedQuesAnswer = it.form_fields['depends_on'].split('|')[1];
|
||||
} %>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="depended_question_id">
|
||||
<option class="select_mapping_status_option" value=""></option>
|
||||
<% it.questions.forEach(function(ques) { %>
|
||||
<option class="select_mapping_status_option" value="<%= ques.id %>" <%= dependedQuesId && dependedQuesId == ques.id ? 'selected':'' %>>
|
||||
<%= ques.question %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="d-flex ml-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="depended_answer">Answer</label>
|
||||
<input type="text" class="form-control data-input" id="depended_answer" value="<%= dependedQuesAnswer ?? '' %>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group px-0 col-12" <%= it.form_fields["type"] != 6 ? 'hidden' : '' %> id="slider-select">
|
||||
<label for="slider_range" class="control-label">Slider range</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" hidden id="text_slider_range" name="slider_range" value="<%= it.form_fields['slider_range'] %>" />
|
||||
|
||||
<% if(it.form_fields['slider_range']){
|
||||
var min = it.form_fields['slider_range'].split('-')[0];
|
||||
var max = it.form_fields['slider_range'].split('-')[1];
|
||||
}%>
|
||||
|
||||
<div id="slider-range-container" class="d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="min-slide-range">Min</label>
|
||||
<input type="number" class="form-control data-input" id="min-slide-range" value="<%= min || '' %>" />
|
||||
</div>
|
||||
<div class="d-flex ml-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="max-slide-range">Max</label>
|
||||
<input type="text" class="form-control data-input" id="max-slide-range" value="<%= max || '' %>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group px-0 col-12">
|
||||
<label for="output_variable_name" class="control-label">Main output variable</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker extra-output-var custom-picker d-block w-100" data-style="btn-light" data-live-search="true" name="output_variable_name" id="text_output_variable_name">
|
||||
<option class="select_main_output_variable_option" value=""></option>
|
||||
<% it.outputVariables.forEach(function(oVar) { %>
|
||||
<option class="select_main_output_variable_option" value="<%= oVar.name %>" <%= it.form_fields['output_variable_name'] == oVar.name ? 'selected':'' %>>
|
||||
<%= oVar.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group px-0 col-12">
|
||||
<label for="weight" class="control-label">Weight</label>
|
||||
<input id="number_weight" name="weight" value="<%= it.form_fields['weight'] %>" class="form-control" type="number" min="0" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group px-0 col-12" id="extra-outputs">
|
||||
<label for="extra_output_variable" class="control-label">Extra output variables</label>
|
||||
|
||||
<input type="text" class="form-control data-input" hidden id="text_extra_output_variable" name="extra_output_variable" value="<%= it.form_fields['extra_output_variable'] %>" />
|
||||
<% if(it.form_fields['extra_output_variable'])
|
||||
var extrasArray = JSON.parse(it.form_fields['extra_output_variable']);
|
||||
%>
|
||||
<% if(extrasArray && extrasArray.length > 0){ %>
|
||||
<% extrasArray.forEach(extra => {%>
|
||||
<div class="output-variable-container mb-2 d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="extra-output-var">Output variable</label>
|
||||
<select class="selectpicker extra-output-var custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="extra-output-var">
|
||||
<option class="select_mapping_status_option" value=""></option>
|
||||
<% it.outputVariables.forEach(function(oVar) { %>
|
||||
<option class="select_mapping_status_option" value="<%= oVar.name %>" <%= extra.name == oVar.name ? 'selected' : '' %>>
|
||||
<%= oVar.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="d-flex ml-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="extra-output-weight">Weight</label>
|
||||
<input type="number" class="form-control data-input extra-output-weight" value="<%= extra.weight %>" />
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
<div class="output-variable-container mb-2 d-flex flex-lg-row flex-column flex-lg-wrap col-lg-12 px-0 ">
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="extra-output-var">Output variable</label>
|
||||
<select class="selectpicker extra-output-var custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="extra-output-var">
|
||||
<option class="select_mapping_status_option" value=""></option>
|
||||
<% it.outputVariables.forEach(function(oVar) { %>
|
||||
<option class="select_mapping_status_option" value="<%= oVar.name %>">
|
||||
<%= oVar.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
<div class="d-flex mr-lg-2 flex-column px-0 col-lg col-12">
|
||||
<label for="extra-output-weight">Weight</label>
|
||||
<input type="number" class="form-control data-input extra-output-weight" />
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<button type="button" class="add-another-extra btn btn-success my-3" onclick="addExtraOutputVariable()">Add another extra</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 px-0 pl-lg-2 col-12 <%= it.form_fields['id'] == 1 ? 'd-none' : '' %>">
|
||||
<h6 class="mb-4 text-md-left">
|
||||
Answers
|
||||
</h6>
|
||||
<div class="text-muted text-uppercase mb-2">ordered by order of showing</div>
|
||||
<% if(it.form_fields['id'] == 20) {%>
|
||||
<div class="mb-3"><a href="/admin/answers/refill/20" class="btn btn-info">Refill</a></div>
|
||||
<% } %>
|
||||
<div class="form-group px-0 col-12 " id="sortable-list">
|
||||
<% if(it.question?.answers?.length){ %>
|
||||
<% it.question.answers.forEach((answer, index) => { %>
|
||||
<div class="accordion mb-2" id="answers_accordian_<%= answer.id %>" data-id="answer_<%= answer.id %>">
|
||||
<div class="card" id="card_answer_<%= answer.id %>">
|
||||
<div class="card-header p-1 d-flex align-items-center justify-content-between" id="heading_<%= answer.id %>">
|
||||
<h2 class="mb-0 p-0 col">
|
||||
<button class="p-0 btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#answer_<%= answer.id %>" aria-expanded="true" aria-controls="collapseOne">
|
||||
Answer #<%= answer.id %></br>
|
||||
<span class="text-muted text-capitalize"><%= answer.answer ?? '' %></span>
|
||||
</button>
|
||||
</h2>
|
||||
<a class="btn-danger btn px-3 mr-1" href="/admin/question/<%= answer.question_id %>/answer-delete/<%= answer.id %>" onclick="confirmDelete(this);">Delete</a>
|
||||
</div>
|
||||
<input type="number" hidden class="form-control data-input" id="answer_id_<%= answer.id %>" name="ids" value="<%= answer.id %>" />
|
||||
|
||||
<div id="answer_<%= answer.id %>" class="collapse" aria-labelledby="heading_<%= answer.id %>" data-parent="#answers_accordian_<%= answer.id %>">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group col-12 px-0">
|
||||
<label for="answer_id" class="control-label">ID</label>
|
||||
<input type="text" class="form-control data-input disabled" disabled id="answer_id_<%= answer.id %>" name="answer_id" value="<%= answer.id %>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-12 px-0">
|
||||
<label for="answer" class="control-label">Answer</label>
|
||||
<% if(it.form_fields['id'] == 20) {%>
|
||||
<input type="text" list="actives-list" required class="form-control data-input" id="text_answer_<%= answer.id %>" name="answer" value="<%= answer.answer ?? '' %>" />
|
||||
<datalist id="actives-list">
|
||||
<option value="Banana">
|
||||
<option value="Olive">
|
||||
<option value="Sunflowers">
|
||||
<% it.actives.forEach((active) => { %>
|
||||
<option value="<%= active.name %>">
|
||||
<% }) %>
|
||||
</datalist>
|
||||
<% } else {%>
|
||||
<input type="text" required class="form-control data-input" id="text_answer_<%= answer.id %>" name="answer" value="<%= answer.answer ?? '' %>" />
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 px-0 answer-value <%= [4,5].includes(it.question.type) ? 'show' : '' %>">
|
||||
<label for="answer_value" class="control-label">Answer value</label>
|
||||
|
||||
|
||||
<input id="integer_answer_value_<%= answer.id %>" name="answer_value" value="<%= answer.answer_value ?? '' %>" class="form-control" type="number" step="any" />
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group col-12 px-0 hide-answer-select <%= it.question.type == 6 ? 'show' : '' %>">
|
||||
<label for="hide_answer" class="control-label">Hide answer label</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="bool_hide_answer_<%= answer.id %>" name="hide_answer">
|
||||
<option class="text-muted" <%= ![1,2].includes(answer.hide_answer) ? 'selected' : '' %>></option>
|
||||
<option value="0" <%= answer.hide_answer == 0 ? 'selected' : '' %>>No</option>
|
||||
<option value="1" <%= answer.hide_answer == 1 ? 'selected' : '' %>>Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group required col-12 px-0">
|
||||
<label for="order" class="control-label">Order</label>
|
||||
|
||||
|
||||
<input type="number" required class="form-control data-input" id="number_order_<%= answer.id %>" name="order" value="<%= answer.order %>" step="1" min="1" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 px-0">
|
||||
<label for="explaination" class="control-label">Explanation</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_explaination_<%= answer.id %>" name="explaination" value="<%= answer.explaination ?? '' %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group answer-image col-12 px-0 <%= [5,6].includes(it.question.type) ? 'show': '' %>">
|
||||
<label for="image_id" class="control-label">Image</label>
|
||||
|
||||
|
||||
<img id="media_image_id" src="<%= answer.image?.url ?? '/image/placeholder-image.png' %>" class="mb-3" style="width:auto; height:200px; object-fit:contain; background:#00000010; border-radius:8px" />
|
||||
<input id="file_image_id" data-answer-box="<%= answer.id %>" name="image_id" type="text" hidden value="<%= answer.image?.id ?? '' %>" class="form-control-file">
|
||||
|
||||
<button id="button_file_image_id" type="button" class="btn btn-outline-primary btn-block mkd-uppload-image-button data-input mb-3" data-upload-for="image_id">Upload</button>
|
||||
<button id="clear_image_btn" type="button" class="btn btn-outline-danger btn-block" onclick="clearImage(this)">Clear image</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 px-0">
|
||||
<label for="response_header" class="control-label">Response header</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_response_header_<%= answer.id %>" name="response_header" value="<%= answer.response_header ?? '' %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 px-0">
|
||||
<label for="response_body" class="control-label">Response body</label>
|
||||
|
||||
|
||||
<textarea rows="3" class="form-control data-input" id="text_response_body_<%= answer.id %>" name="response_body"><%= answer.response_body ?? '' %></textarea>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-12 px-0">
|
||||
<label for="black_list_actives" class="control-label">Black listed actives</label>
|
||||
<% let blActivesList = [];
|
||||
if(answer.black_list_actives){
|
||||
blActivesList= JSON.parse(answer.black_list_actives)
|
||||
}
|
||||
%>
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_black_list_actives_<%= answer.id %>" name="black_list_actives_<%= answer.id %>" multiple>
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<option class="select_mapping_status_option" value="<%= active.id %>" <%= blActivesList.includes(`${active.id}`) ? 'selected': '' %>>
|
||||
<%= active.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
<button type="button" class="btn btn-success mb-3" data-toggle="modal" data-target="#addNewAnswer">
|
||||
+ Add new Answer
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 px-0">
|
||||
<button type="submit" class="px-5 btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="addNewAnswer" aria-labelledby="add new answer" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Add new answer</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="/admin/answers-add?question=<%= it.question.id %>" method="POST" id="add-answer-modal-form">
|
||||
<div class="form-group required col-12">
|
||||
<label for="question_id" class="control-label">Question</label>
|
||||
<% const currentQuestionSelected = it.question.type; %>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<input hidden name="question_id" value="<%= it.question.id %>">
|
||||
<input hidden id="add_form_question_type" value="<%= currentQuestionSelected %>">
|
||||
<select class="selectpicker custom-picker d-block disabled" data-width="fit" disabled data-style="btn-light" data-live-search="true" id="select-question_id">
|
||||
<option selected><%= it.question.question %></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-12">
|
||||
<label for="add_form_answer" class="control-label">Answer</label>
|
||||
<% if(it.question.id == 20) {%>
|
||||
<input type="text" list="actives-list" required class="form-control data-input" id="add_form_answer" name="answer" />
|
||||
<datalist id="actives-list">
|
||||
<option value="Banana">
|
||||
<option value="Olive">
|
||||
<option value="Sunflowers">
|
||||
<% it.actives.forEach((active) => { %>
|
||||
<option value="<%= active.name %>">
|
||||
<% }) %>
|
||||
</datalist>
|
||||
<% } else {%>
|
||||
<input type="text" required class="form-control data-input" id="add_form_answer" name="answer" />
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 answer-value <%= [4,5].includes(currentQuestionSelected) ? 'required show' : '' %>">
|
||||
<label for="add_form_answer_value" class="control-label">Answer value</label>
|
||||
|
||||
<input id="add_form_answer_value" name="answer_value" class="form-control" type="number" step="any" <%= [4,5].includes(currentQuestionSelected) ? 'required' : '' %> />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12 hide-answer-select <%= currentQuestionSelected == 6 ? 'show' : '' %>">
|
||||
<label for="hide_answer" class="control-label">Hide answer label</label>
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="bool_hide_answer" name="hide_answer">
|
||||
<option value="0" selected>No</option>
|
||||
<option value="1">Yes</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-12">
|
||||
<label for="order" class="control-label">Order</label>
|
||||
|
||||
<input type="number" required class="form-control data-input" hidden id="number_order" name="order" step="1" min="1" value="<%= it.lastOrderCount ? it.lastOrderCount + 1 : 1 %>" />
|
||||
<input type="number" required class="form-control data-input disabled" disabled value="<%= it.lastOrderCount ? it.lastOrderCount + 1 : 1 %>" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label for="explaination" class="control-label">Explanation</label>
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_explaination" name="explaination" />
|
||||
</div>
|
||||
|
||||
<div class="form-group answer-image col-12 <%= [5,6].includes(currentQuestionSelected) ? 'show': '' %>">
|
||||
<label for="image_id" class="control-label">Image</label>
|
||||
|
||||
<img id="media_image_id" src="/image/placeholder-image.png" class="mb-3" style="width: auto; height: 200px; object-fit: contain; background: #00000010; border-radius: 8px" />
|
||||
<input id="file_image_id" name="image_id" data-target="add_form_image" type="text" hidden class="form-control-file" />
|
||||
<button id="button_file_image_id" type="button" class="btn btn-outline-primary btn-block mkd-uppload-image-button data-input mb-3" data-upload-for="image_id">Upload</button>
|
||||
<button id="clear_image_btn" type="button" class="btn btn-outline-danger btn-block" onclick="clearImage(this)">Clear image</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label for="response_header" class="control-label">Response header</label>
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_response_header" name="response_header" />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label for="response_body" class="control-label">Response body</label>
|
||||
|
||||
<textarea rows="3" class="form-control data-input" id="text_response_body" name="response_body"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<label for="black_list_actives" class="control-label">Black listed actives</label>
|
||||
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_black_list_actives" name="black_list_actives" multiple>
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<option class="select_mapping_status_option" value="<%= active.id %>"><%= active.name %></option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary" onclick="submitAddAnswerForm()">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const outputVariables = [<% it.outputVariables.forEach(function(oVar) { %><%~ `'${oVar.name}',` %> <% }) %>];
|
||||
</script>
|
||||
<script src="/js/main.js?v=1.2"></script>
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/quizzes-edit/<%= it.form_fields['id'] %>" method="POST" >
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="name" class="control-label">Name</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input"
|
||||
id="text_name"
|
||||
name="name" value="<%= it.form_fields['name'] %>"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="description" class="control-label">Description</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input"
|
||||
id="text_description"
|
||||
name="description" value="<%= it.form_fields['description'] %>"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/profile-sections-edit/<%= it.form_fields['id'] %>" method="POST">
|
||||
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="section_title" class="control-label">Section title</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_section_title" name="section_title" value="<%= it.form_fields['section_title'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="output_variable_list" class="control-label">Variables List</label>
|
||||
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_output_variable_list" name="output_variable_list" multiple size="<%= it.output_variables?.length ?? 5 %>" style="height: 100%;">
|
||||
<% it.output_variables?.forEach(ovar => { %>
|
||||
<option value="<%= ovar.id %>" <%= it.form_fields['output_variable_list'].includes(ovar.name) ? 'selected' : ''%>><%= ovar.name %></option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,119 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/rules-edit/<%= it.form_fields['id'] %>" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="output_variable_name" class="control-label">Output variable</label>
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_output_variable_name" name="output_variable_name" required>
|
||||
<% it.outputVariables.forEach(function(outVar) { %>
|
||||
<option class="select_mapping_status_option" value="<%= outVar.name %>" <%= it.form_fields['output_variable_name'] == outVar.name ? 'selected':'' %>>
|
||||
<%= outVar.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="actives" class="control-label">Actives</label>
|
||||
|
||||
<small class="text-muted">Can select multiple</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="text_actives" name="actives" required multiple>
|
||||
<% it.actives.forEach(function(active) { %>
|
||||
<% const activesNames = JSON.parse(it.form_fields['actives'])%>
|
||||
<option class="select_text_actives" value="<%= active.name %>" <%= activesNames.includes(active.name) ? 'selected': ''%>>
|
||||
<%= active.name %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="operator" class="control-label">Condition operator</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_operator" name="operator" required>
|
||||
<% Object.keys(it.operator_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["operator"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_operator_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.operator_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="compare_value" class="control-label">Compare value</label>
|
||||
|
||||
|
||||
<input id="number_compare_value" required name="compare_value" value="<%= it.form_fields['compare_value'] %>" class="form-control" type="number" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="min" class="control-label">Between Min</label>
|
||||
|
||||
|
||||
<input id="number_min" name="min" value="<%= it.form_fields['min'] %>" class="form-control" type="number" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="max" class="control-label">Between Max</label>
|
||||
|
||||
|
||||
<input id="number_max" name="max" value="<%= it.form_fields['max'] %>" class="form-control" type="number" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="action" class="control-label">Action</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_action" name="action" required>
|
||||
<% Object.keys(it.action_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["action"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_action_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.action_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,113 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
<%= it.heading %>
|
||||
</h5>
|
||||
|
||||
<form action="/admin/users-edit/<%= it.form_fields['id'] %>" method="POST">
|
||||
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="email" class="control-label">Email</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_email" name="credential_email" value="<%= it.form_fields['credential.email'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="password" class="control-label">Password</label>
|
||||
|
||||
|
||||
<input id="password_password" name="credential_password" class="form-control" type="password" autocomplete="new-password">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="first_name" class="control-label">First Name</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_first_name" name="first_name" value="<%= it.form_fields['first_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="last_name" class="control-label">Last Name</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_last_name" name="last_name" value="<%= it.form_fields['last_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="role_id" class="control-label">Role ID</label>
|
||||
|
||||
|
||||
<input id="integer_role_id" name="role_id" value="<%= it.form_fields['role_id'] %>" class="form-control" type="number" step="1" pattern="d+" inputmode="numeric" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="image" class="control-label">Image</label>
|
||||
|
||||
|
||||
<img id="media_image" src="<%= it.form_fields['image'] %>" class="mb-3" style="width:auto; height:200px; object-fit:contain; background:#00000010; border-radius:8px" />
|
||||
|
||||
<button id="button_file_image" type="button" class="btn btn-outline-primary btn-block mkd-uppload-image-button data-input" data-upload-for="image">Upload</button>
|
||||
<input id="file_image" name="image" type="text" hidden value="<%= it.form_fields['image'] %>" class="form-control-file">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="phone" class="control-label">Phone #</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_phone" name="phone" value="<%= it.form_fields['phone'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="status" class="control-label">Status</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_status" name="status">
|
||||
<% Object.keys(it.status_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["status"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_status_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.status_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,227 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/all_letters.css?v=1.23">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
<script src="/js/qrcode.js"></script>
|
||||
<!-- <script defer>
|
||||
$(document).ready(function() {
|
||||
let divToPrint = document.getElementById('main-letter');
|
||||
let printBtn = document.querySelector(".print-btn");
|
||||
divToPrint.classList.add("print");
|
||||
|
||||
window.print();
|
||||
//window.close();
|
||||
});
|
||||
window.onafterprint = () => {
|
||||
window.close()
|
||||
}
|
||||
</script> -->
|
||||
<title>Letters</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="top">
|
||||
<div class="header-logo">
|
||||
<span class="cr-logo">CREATED BY</span>
|
||||
<span class="customer-name"><%= it.firstName ? `${it.firstName.trim()}` : "You" %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<div class="header">Welcome to your personalized skincare journey</div>
|
||||
<div class="body">
|
||||
<p><%= it.firstName ? `${it.firstName.trim()}, you ` : 'You ' %>are one of a kind. we believe your skincare should be too.</p>
|
||||
<p>A truly personalized skincare routine is based on science - not buzzwords. That's why our team of scientists, formulators and skincare experts have spent years
|
||||
researching ingredients and analyzing data to provide the best recommendations for your skin.
|
||||
</p>
|
||||
<p>In this box, you'll find additional cards detailing your skin profile, formula and mixing directions to get you started.</p>
|
||||
<p>Each formula is completely personalized using the results from your skin quiz. All that's missing to complete the product, is you.</p>
|
||||
<p>Happy mixing!</p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<h5>- The Created By ____ team</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
|
||||
<div id="profile-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="header">
|
||||
<span class="username"><%= it.firstName ? `${it.firstName.trim()}'s` : "Your" %></span> skin profile
|
||||
</div>
|
||||
<div class="body">
|
||||
<% if(it.profileCharcteristics) { %>
|
||||
<% Object.entries(it.profileCharcteristics).forEach(([name, values])=>{%>
|
||||
<div class="progress-container">
|
||||
<div class="profile-title">
|
||||
<h3><%= name %></h3>
|
||||
</div>
|
||||
<div class="profile-body">
|
||||
<% if(values && values.length) { %>
|
||||
<% values?.forEach(profile => { %>
|
||||
<div class="profile-container">
|
||||
<div class="title">
|
||||
<%= profile.name %>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="bar" style="width: <%= parseFloat(profile.percentage).toFixed(2) %>%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% }%>
|
||||
</div>
|
||||
</div>
|
||||
<%})%>
|
||||
<% }%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="formula-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="header">
|
||||
<span class="username"><%= it.firstName ? `${it.firstName.trim()}'s` : "Your" %></span> formula
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="step _one">
|
||||
<div class="title">Step 1: Understanding your base</div>
|
||||
<div class="content">
|
||||
<div class="qrcode"><canvas id="base-canvas"></canvas></div>
|
||||
<script>
|
||||
QRCode.toCanvas(document.getElementById("base-canvas"), "https://manaknightdigital.com/products/base", {
|
||||
width: 90,
|
||||
color: {
|
||||
dark: "#00000099"
|
||||
}
|
||||
}, function(error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
</script>
|
||||
<div class="explanation">
|
||||
Derived of water, sunflower, olive, and banana, your base is the foundation of your new skincare routine. We kept it simple and included only the essentials.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step _two">
|
||||
<div class="title">Step 2: Sources of Your Active Ingredients*</div>
|
||||
<div class="content">
|
||||
<% it.actives?.forEach(active => { %>
|
||||
<div class="active">
|
||||
<div class="name-qrcode">
|
||||
<span class="active-name"><%= active.name %></span>
|
||||
<div class="qrcode"><canvas id="canvas_<%= active.id %>" width="125px" height="125px"></canvas></div>
|
||||
<script>
|
||||
QRCode.toCanvas(document.getElementById("canvas_<%= active.id %>"), "<%= active.handle %>", {
|
||||
width: 80,
|
||||
color: {
|
||||
dark: "#00000099"
|
||||
}
|
||||
}, function(error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="description">
|
||||
<%= active.description ?? "" %>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% if(it.count < 10) { %>
|
||||
<% for(let i=it.count; i < 10; i++){ %>
|
||||
<div class="active">
|
||||
<div class="name-qrcode">
|
||||
<span class="active-name">Blank</span>
|
||||
<div class="qrcode"><canvas id="canvas_blank_<%= i %>" width="125px" height="125px"></canvas></div>
|
||||
<script>
|
||||
QRCode.toCanvas(document.getElementById("canvas_blank_<%= i %>"), "https://manaknightdigital.com/products/blank", {
|
||||
width: 80,
|
||||
color: {
|
||||
dark: "#00000099"
|
||||
}
|
||||
}, function(error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="description">
|
||||
<!-- Balances Forumula Concentration -->
|
||||
</div>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-note">
|
||||
*All actives contain varying amounts of same ingredients found in basecream - for full information scan the QR codes.
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
|
||||
<div id="instructions-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="header">
|
||||
Instructions
|
||||
</div>
|
||||
<div class="items section">
|
||||
<h3 class="sub-header">Items included:</h3>
|
||||
<ul class="list">
|
||||
<li>(1) Jar with Base Cream</li>
|
||||
<li>
|
||||
(1) Bag Containing:
|
||||
<ul>
|
||||
<li>
|
||||
(10) Actives Sachets
|
||||
</li>
|
||||
<li>
|
||||
(1) Wooden Mixing Stick
|
||||
</li>
|
||||
<li>
|
||||
(1) Marker
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mixing-steps section">
|
||||
<h3 class="sub-header">Step 3: Mixing Your Formula</h3>
|
||||
<ol class="list">
|
||||
<li>Open your jar of base cream.</li>
|
||||
<li>Carefully empty all 10 sachets into your base cream.</li>
|
||||
<li>Gently mix the base and sachet contents with the wooden mixing stick until a consistent color and texture is achieved.</li>
|
||||
<li>Optional: Customize your jar using the included marker.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="notes section">
|
||||
<h3 class="sub-header">* Things to make note of:</h3>
|
||||
<ul class="list">
|
||||
<li>Your formula may include sachets labeled "Blank." These contain supplementary base meant to balance the final volume and active concentrations.</li>
|
||||
<li>Actives may have some varying colors or scents coming from their natural plantsources.</li>
|
||||
<li>If cream separation occurs, simply remix gently.</li>
|
||||
<li>Do not throw out jar when done. All future orders will arrive in a refill pod.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,113 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/formula_letter.css?v=1.13">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
<script src="/js/qrcode.js"></script>
|
||||
<!-- <script defer>
|
||||
$(document).ready(function() {
|
||||
let divToPrint = document.getElementById('formula-letter');
|
||||
let printBtn = document.querySelector(".print-btn");
|
||||
divToPrint.classList.add("print");
|
||||
|
||||
window.print();
|
||||
});
|
||||
window.onafterprint = () => {
|
||||
window.close()
|
||||
}
|
||||
</script> -->
|
||||
<title>Formula Letter</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="formula-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="header">
|
||||
<span class="username"><%= it.firstName ? `${it.firstName.trim()}'s` : "Your" %></span> formula
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="step _one">
|
||||
<div class="title">Step 1: Understanding your base</div>
|
||||
<div class="content">
|
||||
<div class="qrcode"><canvas id="base-canvas"></canvas></div>
|
||||
<script>
|
||||
QRCode.toCanvas(document.getElementById("base-canvas"), "https://manaknightdigital.com/products/base", {
|
||||
width: 90,
|
||||
color: {
|
||||
dark: "#00000099"
|
||||
}
|
||||
}, function(error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
</script>
|
||||
<div class="explanation">
|
||||
Derived of water, sunflower, olive, and banana, your base is the foundation of your new skincare routine. We kept it simple and included only the essentials.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step _two">
|
||||
<div class="title">Step 2: Sources of Your Active Ingredients*</div>
|
||||
<div class="content">
|
||||
<% it.actives?.forEach(active => { %>
|
||||
<div class="active">
|
||||
<div class="name-qrcode">
|
||||
<span class="active-name"><%= active.name %></span>
|
||||
<div class="qrcode"><canvas id="canvas_<%= active.id %>" width="125px" height="125px"></canvas></div>
|
||||
<script>
|
||||
QRCode.toCanvas(document.getElementById("canvas_<%= active.id %>"), "<%= active.handle %>", {
|
||||
width: 80,
|
||||
color: {
|
||||
dark: "#00000099"
|
||||
}
|
||||
}, function(error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="description">
|
||||
<%= active.description ?? "" %>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% if(it.count < 10){%>
|
||||
<% for(let i=it.count; i < 10; i++){ %>
|
||||
<div class="active">
|
||||
<div class="name-qrcode">
|
||||
<span class="active-name">Blank</span>
|
||||
<div class="qrcode"><canvas id="canvas_blank_<%= i %>" width="125px" height="125px"></canvas></div>
|
||||
<script>
|
||||
QRCode.toCanvas(document.getElementById("canvas_blank_<%= i %>"), "https://manaknightdigital.com/products/blank", {
|
||||
width: 80,
|
||||
color: {
|
||||
dark: "#00000099"
|
||||
}
|
||||
}, function(error) {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="description">
|
||||
<!-- Balances Forumula Concentration -->
|
||||
</div>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-note">
|
||||
*All actives contain varying amounts of same ingredients found in basecream - for full information scan the QR codes.
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- <link rel="stylesheet" href="/css/styles.css" /> -->
|
||||
<link rel="stylesheet" href="/css/instructions_letter.css?v=1.13">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
|
||||
<!-- <script defer>
|
||||
$(document).ready(function() {
|
||||
let divToPrint = document.getElementById('instructions-letter');
|
||||
let printBtn = document.querySelector(".print-btn");
|
||||
divToPrint.classList.add("print");
|
||||
|
||||
window.print();
|
||||
});
|
||||
window.onafterprint = () => {
|
||||
window.close()
|
||||
}
|
||||
</script> -->
|
||||
<title>Instructions Letter</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="instructions-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="header">
|
||||
Instructions
|
||||
</div>
|
||||
<div class="items section">
|
||||
<h3 class="sub-header">Items included:</h3>
|
||||
<ul class="list">
|
||||
<li>(1) Jar with Base Cream</li>
|
||||
<li>
|
||||
(1) Bag Containing:
|
||||
<ul>
|
||||
<li>
|
||||
(10) Actives Sachets
|
||||
</li>
|
||||
<li>
|
||||
(1) Wooden Mixing Stick
|
||||
</li>
|
||||
<li>
|
||||
(1) Marker
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mixing-steps section">
|
||||
<h3 class="sub-header">Step 3: Mixing Your Formula</h3>
|
||||
<ol class="list">
|
||||
<li>Open your jar of base cream.</li>
|
||||
<li>Carefully empty all 10 sachets into your base cream.</li>
|
||||
<li>Gently mix the base and sachet contents with the wooden mixing stick until a consistent color and texture is achieved.</li>
|
||||
<li>Optional: Customize your jar using the included marker.</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="notes section">
|
||||
<h3 class="sub-header">* Things to make note of:</h3>
|
||||
<ul class="list">
|
||||
<li>Your formula may include sachets labeled "Blank." These contain supplementary base meant to balance the final volume and active concentrations.</li>
|
||||
<li>Actives may have some varying colors or scents coming from their natural plantsources.</li>
|
||||
<li>If cream separation occurs, simply remix gently.</li>
|
||||
<li>Do not throw out jar when done. All future orders will arrive in a refill pod.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/main_letter.css?v=1.13">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
<!-- <script defer>
|
||||
$(document).ready(function() {
|
||||
let divToPrint = document.getElementById('main-letter');
|
||||
let printBtn = document.querySelector(".print-btn");
|
||||
divToPrint.classList.add("print");
|
||||
|
||||
window.print();
|
||||
//window.close();
|
||||
});
|
||||
window.onafterprint = () => {
|
||||
window.close()
|
||||
}
|
||||
</script> -->
|
||||
<title>Main Letter</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="main-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="top">
|
||||
<div class="header-logo">
|
||||
<span class="cr-logo">CREATED BY</span>
|
||||
<span class="customer-name"><%= it.firstName ? `${it.firstName.trim()}` : "You" %></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle">
|
||||
<div class="header">Welcome to your personalized skincare journey</div>
|
||||
<div class="body">
|
||||
<p><%= it.firstName ? `${it.firstName.trim()}, you ` : 'You ' %>are one of a kind. we believe your skincare should be too.</p>
|
||||
<p>A truly personalized skincare routine is based on science - not buzzwords. That's why our team of scientists, formulators and skincare experts have spent years
|
||||
researching ingredients and analyzing data to provide the best recommendations for your skin.
|
||||
</p>
|
||||
<p>In this box, you'll find additional cards detailing your skin profile, formula and mixing directions to get you started.</p>
|
||||
<p>Each formula is completely personalized using the results from your skin quiz. All that's missing to complete the product, is you.</p>
|
||||
<p>Happy mixing!</p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<h5>- The Created By ____ team</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/profile_letter.css?v=1.13">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
<!-- <script defer>
|
||||
$(document).ready(function() {
|
||||
let divToPrint = document.getElementById('profile-letter');
|
||||
let printBtn = document.querySelector(".print-btn");
|
||||
divToPrint.classList.add("print");
|
||||
|
||||
window.print();
|
||||
});
|
||||
window.onafterprint = () => {
|
||||
window.close()
|
||||
}
|
||||
</script> -->
|
||||
<title>Profile Letter</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="profile-letter">
|
||||
<div class="left">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
<div class="center">
|
||||
<div class="header">
|
||||
<span class="username"><%= it.firstName ? `${it.firstName.trim()}'s` : "Your" %></span> skin profile
|
||||
</div>
|
||||
<div class="body">
|
||||
<% if(it.profileCharcteristics) { %>
|
||||
<% Object.entries(it.profileCharcteristics).forEach(([name, values])=>{%>
|
||||
<div class="progress-container">
|
||||
<div class="profile-title">
|
||||
<h3><%= name %></h3>
|
||||
</div>
|
||||
<div class="profile-body">
|
||||
<% if(values && values.length) { %>
|
||||
<% values?.forEach(profile => { %>
|
||||
<div class="profile-container">
|
||||
<div class="title">
|
||||
<%= profile.name %>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div class="bar" style="width: <%= parseFloat(profile.percentage).toFixed(2) %>%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% }%>
|
||||
</div>
|
||||
</div>
|
||||
<%})%>
|
||||
<% }%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">made with you. made for you. made by you. <img src="/image/CreatedBy_Icon_Black_RGB.png" class="logo-svg" width="30px" height="30px"> made with you. made for you. made by you.</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-10 col-xs-10 p-5 auth-wrap">
|
||||
<div class='text-center'>
|
||||
<h1>Login</h1>
|
||||
</div>
|
||||
<div class="form-container form-container-auth">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<form action="/admin/login" method="POST">
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="email">Email</label>
|
||||
<input type="email" required class="form-control site-input" id="email" name="email" required="true" value="<%= it.login_fields.email%>" />
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.email){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.email %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group required text-container">
|
||||
<label class='control-label' for="password">Password</label>
|
||||
<input type="password" required class="form-control site-input" id="password" name="password" required="true" >
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.password){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.password %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-block">Submit</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class='text-center'>
|
||||
<p>Copyright © 2021 Manaknightdigital Inc. All rights reserved.</p>
|
||||
|
||||
<p>Powered By <a href="https://manaknightdigital.com" target="__blank">Manaknightdigital Inc.</a></p>
|
||||
</div>
|
||||
@@ -0,0 +1,207 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="orders_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/orders/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Customer">Customer</label>
|
||||
|
||||
<input type="text" class="form-control" id="customer_shopify_id" name="customer_shopify_id" value="<%= it.get_customer_shopify_id() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Order shopify id">Order shopify id</label>
|
||||
|
||||
<input type="text" class="form-control" id="shopify_id" name="shopify_id" value="<%= it.get_shopify_id() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Financial status">Financial status</label>
|
||||
|
||||
<input type="text" class="form-control" id="financial_status" name="financial_status" value="<%= it.get_financial_status() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Fulfillment status">Fulfillment status</label>
|
||||
|
||||
<input type="text" class="form-control" id="fulfillment_status" name="fulfillment_status" value="<%= it.get_fulfillment_status() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="d-none ml-1"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.shopify_id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<% if(data.customer){ %>
|
||||
id: <%= JSON.parse(data.customer).id %></br>
|
||||
email: <%= JSON.parse(data.customer).email %>
|
||||
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.financial_status ?? "N/A" %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.fulfillment_status ?? "N/A" %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= data.created_at? it.date(data.created_at) : "N/A" %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a class="btn btn-link link-underline text-underline btn-sm" target="_blank" href="/admin/letters/all?order=<%= data.id %>">Print All</a>
|
||||
<a class="btn btn-link link-underline text-underline btn-sm" target="_blank" href="/admin/letters/main?order=<%= data.id %>">Main</a>
|
||||
<a class="btn btn-link link-underline text-underline btn-sm" target="_blank" href="/admin/letters/profile?order=<%= data.id %>">Profile</a>
|
||||
<a class="btn btn-link link-underline text-underline btn-sm" target="_blank" href="/admin/letters/formula?order=<%= data.id %>">Formula</a>
|
||||
<a class="btn btn-link link-underline text-underline btn-sm" target="_blank" href="/admin/letters/instructions?order=<%= data.id %>">Instructions</a>
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,168 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="output_variables_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/output-variables/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Name">Name</label>
|
||||
|
||||
<input type="text" class="form-control" id="name" name="name" value="<%= it.get_name() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__blank" href="/admin/output-variables-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.name %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<%= data.priority %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<% if(data.active_list) { %>
|
||||
<% data.active_list.forEach(active => { %>
|
||||
<%= `${active.id}: ${active.name}` %>
|
||||
</br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<% if(data.ranges_response) { %>
|
||||
<% JSON.parse(data.ranges_response).forEach(range => { %>
|
||||
<%= `Range: ${Object.keys(range)[0]}` %>
|
||||
-
|
||||
<%= `Response: ${range[Object.keys(range)[0]]}` %>
|
||||
</br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/output-variables-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/output-variables-edit/<%= data.id %>">Edit</a> <a class="btn btn-link link-underline text-underline text-danger btn-sm" href="/admin/output-variables-delete/<%= data.id %>">Delete</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,82 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
Profile
|
||||
</h5>
|
||||
<form action="/admin/profile" method="POST">
|
||||
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="first_name" class="control-label">First Name</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_first_name" name="first_name" value="<%= it.form_fields['first_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="last_name" class="control-label">Last Name</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_last_name" name="last_name" value="<%= it.form_fields['last_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="email" class="control-label">Email</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_email" name="credential_email" value="<%= it.form_fields['credential.email'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="password" class="control-label">Password</label>
|
||||
|
||||
|
||||
<input id="password_password" name="credential_password" class="form-control" type="password" autocomplete="new-password">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="status" class="control-label">Status</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_status" name="status">
|
||||
<% Object.keys(it.status_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["status"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_status_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.status_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,181 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="questions_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/questions/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Quiz ID">Quiz ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="quiz_id" name="quiz_id" value="<%= it.get_quiz_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Type">Type</label>
|
||||
|
||||
<select name="type" class="form-control">
|
||||
|
||||
<option value="">All</option>
|
||||
|
||||
<% Object.keys(it.type_mapping()).forEach(function(value){ %>
|
||||
|
||||
<option value="<%= value %>" <%= (it.get_type() == value && it.get_type() != '') ? 'selected' : '' %>> <%= it.type_mapping()[value]%> </option>
|
||||
<%}); %>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__self" href="/admin/questions-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
<td style="white-space:nowrap;">
|
||||
<strong><%= data.quiz.id %></strong>: <%= data.quiz.name %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<strong><%= data.id %></strong>: <%= data.question %>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.order %>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<%= it.ucFirst(it.type_mapping()[data.type]) %>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<% if(data.output_variable_name){ %>
|
||||
<span class="font-weight-bold"><%= data.output_variable_name %></span>:
|
||||
<span class=""><%= data.weight %></span>
|
||||
</br>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
|
||||
<% if(data.extra_output_variable){ %>
|
||||
<% JSON.parse(data.extra_output_variable).forEach(varName => { %>
|
||||
<span class="font-weight-bold"><%= varName.name %></span>:
|
||||
<span class=""><%= varName.weight %></span>
|
||||
</br>
|
||||
<% }) %>
|
||||
<% } %>
|
||||
</td>
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/questions-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/questions-edit/<%= data.id %>">Edit</a> <a class="btn btn-link link-underline text-underline text-danger btn-sm" href="/admin/questions-delete/<%= data.id %>">Delete</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,141 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="quizzes_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/quizzes/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Name">Name</label>
|
||||
|
||||
<input type="text" class="form-control" id="name" name="name" value="<%= it.get_name() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__blank" href="/admin/quizzes-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small;color: #aaa; <%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small;color: #aaa; <%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.name %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.description %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/quizzes-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/quizzes-edit/<%= data.id %>">Edit</a> <a class="btn btn-link link-underline text-underline text-danger btn-sm" href="/admin/quizzes-delete/<%= data.id %>">Delete</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,144 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="result_profile_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/profile-sections/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Section title">Section title</label>
|
||||
|
||||
<input type="text" class="form-control" id="section_title" name="section_title" value="<%= it.get_section_title() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__blank" href="/admin/profile-sections-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.section_title %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<% data.output_variable_list?.forEach(ovar => { %>
|
||||
<%= ovar %></br>
|
||||
<%}) %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/profile-sections-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/profile-sections-edit/<%= data.id %>">Edit</a> <a class="btn btn-link link-underline text-underline text-danger btn-sm" href="/admin/profile-sections-delete/<%= data.id %>">Delete</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,204 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="rules_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/rules/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Condition operator">Condition operator</label>
|
||||
|
||||
<select name="operator" class="form-control">
|
||||
|
||||
<option value="">All</option>
|
||||
|
||||
<% Object.keys(it.operator_mapping()).forEach(function(value){ %>
|
||||
|
||||
<option value="<%= value %>" <%= (it.get_operator() == value && it.get_operator() != '') ? 'selected' : '' %>> <%= it.operator_mapping()[value]%> </option>
|
||||
<%}); %>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Action">Action</label>
|
||||
|
||||
<select name="action" class="form-control">
|
||||
|
||||
<option value="">All</option>
|
||||
|
||||
<% Object.keys(it.action_mapping()).forEach(function(value){ %>
|
||||
|
||||
<option value="<%= value %>" <%= (it.get_action() == value && it.get_action() != '') ? 'selected' : '' %>> <%= it.action_mapping()[value]%> </option>
|
||||
<%}); %>
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Output variable">Output variable</label>
|
||||
|
||||
<input type="text" class="form-control" id="output_variable_name" name="output_variable_name" value="<%= it.get_output_variable_name() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__blank" href="/admin/rules-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.output_variable_name %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<% JSON.parse(data.actives).forEach(active => { %>
|
||||
<%= active %></br>
|
||||
<% }) %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= it.ucFirst(it.operator_mapping()[data.operator]) %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.compare_value %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= it.ucFirst(it.action_mapping()[data.action]) %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/rules-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/rules-edit/<%= data.id %>">Edit</a> <a class="btn btn-link link-underline text-underline text-danger btn-sm" href="/admin/rules-delete/<%= data.id %>">Delete</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,176 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<div class="card" id="users_filter_listing">
|
||||
<div class="card-body">
|
||||
<h5 class="primaryHeading2 text-md-left">
|
||||
<%= it.get_heading() %> Search
|
||||
</h5>
|
||||
<form action="/admin/users/0" method="get" accept-charset="utf-8">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="ID">ID</label>
|
||||
|
||||
<input type="text" class="form-control" id="id" name="id" value="<%= it.get_id() %>" onkeypress="return event.charCode >= 48 && event.charCode <= 57" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Credential Email">Credential Email</label>
|
||||
|
||||
<input type="text" class="form-control" id="credential_email" name="credential_email" value="<%= it.get_credential_email() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="First Name">First Name</label>
|
||||
|
||||
<input type="text" class="form-control" id="first_name" name="first_name" value="<%= it.get_first_name() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<label for="Last Name">Last Name</label>
|
||||
|
||||
<input type="text" class="form-control" id="last_name" name="last_name" value="<%= it.get_last_name() %>" />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="width:100%;height:10px;display:block;float:none;"></div>
|
||||
<div class="col-xl-4 col-lg-4 col-md-4 col-sm-12 col-12">
|
||||
<div class="form-group">
|
||||
<input type="submit" name="submit" class="btn btn-primary" value="Search">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h5 class="primaryHeading2 d-flex justify-content-between mt-2 my-4">
|
||||
<%= it.get_heading() %>
|
||||
</h5>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
|
||||
<span class="add-part d-flex justify-content-md-end ml-1"><a class="btn btn-primary btn-sm" target="__blank" href="/admin/users-add"><i class="fas fa-plus-circle"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<section class="table-placeholder bg-white mb-5 p-3 pl-4 pr-4 pt-4" style='height:auto;'>
|
||||
<div class="mb-2 d-flex align-items-center justify-content-between d-none">
|
||||
<div>
|
||||
<small class="d-flex align-items-baseline">
|
||||
Show <select name="page_length" class="form-control form-control-sm mx-2" style="max-width: 60px;" onchange="window.location='0?per_page='+this.value">
|
||||
<option <%= it.get_per_page() == 10 ? 'selected' : '' %>>10</option>
|
||||
<option <%= it.get_per_page() == 25 ? 'selected' : '' %>>25</option>
|
||||
<option <%= it.get_per_page() == 50 ? 'selected' : '' %>>50</option>
|
||||
<option <%= it.get_per_page() == 100 ? 'selected' : '' %>>100</option>
|
||||
</select>
|
||||
entries
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-mh br w-100 table-bordered table-striped">
|
||||
<thead class='thead-white text-nowrap'>
|
||||
|
||||
<% it.get_column().forEach(function(data, index) { %>
|
||||
<% if (it.get_order_by().length < 1 || it.get_field_column()[index] == '' || it.get_field_column()[index] == undefined) { %>
|
||||
<th scope="col" class="paragraphText text-left"><%= data %></th>
|
||||
<% } else { %>
|
||||
<th scope='col' class='paragraphText text-left'>
|
||||
<a class="text-dark" href="<%= `${it.get_sort_base_url()}?order_by=${it.get_field_column()[index]}&direction=${it.get_sort() == 'DESC' ? 'ASC' : 'DESC'}` %>"><%= data %>
|
||||
<span class="order-arrows">
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'DESC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-down"></i>
|
||||
<i style="margin-top: 0.45rem;float:right;font-size: small; color: #aaa;<%~ it.get_field_column()[index] == it.get_order_by() && it.get_sort() == 'ASC' ? 'color:black !important;' : ''%>" class="fas fa-long-arrow-alt-up"></i>
|
||||
</span>
|
||||
</a>
|
||||
</th>
|
||||
<% } %>
|
||||
<% }) %>
|
||||
</thead>
|
||||
<tbody class="tbody-light">
|
||||
<% it.get_list().forEach(function(data) { %>
|
||||
<tr>
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.id %>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<div class='mkd-image-container'>
|
||||
<img class='img-fluid modal-image' src='<%= data.image %>' onerror="if (this.src != '/uploads/placeholder.jpg') this.src = '/uploads/placeholder.jpg'" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
<%= data.credential.email %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><span class="font-weight-bold">First name</span>: <%= data.first_name %> </br><span class="font-weight-bold">Last name</span>: <%= data.last_name %> </br></td>
|
||||
|
||||
|
||||
<td>
|
||||
<%= it.ucFirst(it.status_mapping()[data.status]) %>
|
||||
</td>
|
||||
|
||||
|
||||
<td><a class="btn btn-link link-underline text-underline btn-sm" target="_self" href="/admin/users-view/<%= data.id %>">View</a> <a target="_self" class="btn btn-link link-underline text-underline btn-sm" href="/admin/users-edit/<%= data.id %>">Edit</a> </td>
|
||||
</tr>
|
||||
<% }) %>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="pagination_custom"><%~ it.get_links() %></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Name:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["name"] %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Handle:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["handle"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Description:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["description"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,122 @@
|
||||
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.answer["id"] || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Question ID:</th>
|
||||
<td>
|
||||
<%= it.answer["question_id"] || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Question:</th>
|
||||
<td>
|
||||
<%= it.answer.question?.question || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Answer:</th>
|
||||
<td>
|
||||
<%= it.answer["answer"] || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Answer value:</th>
|
||||
<td>
|
||||
<%= it.answer["answer_value"] || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order:</th>
|
||||
<td>
|
||||
<%= it.answer["order"] || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Explaination:</th>
|
||||
<td>
|
||||
<%= it.answer["explaination"]|| "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Image:</th>
|
||||
<td>
|
||||
<% if(it.answer.image){%>
|
||||
<img src="<%= it.answer.image.url %>" style="width:300px; height:auto; max-height:400px; object-fit: contain; border-radius:4px;">
|
||||
<% }else{%>
|
||||
N/A
|
||||
<% }%>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Response header:</th>
|
||||
<td>
|
||||
<%= it.answer["response_header"] || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Response body:</th>
|
||||
<td>
|
||||
<%= it.answer["response_body"] || "N/A" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Black listed actives:</th>
|
||||
<td>
|
||||
<% if(it.answer["black_list_actives"]) { %>
|
||||
<% JSON.parse(it.answer["black_list_actives"]).forEach(active => { %>
|
||||
<%= active %> </br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,73 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Name:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["name"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Actives list:</th>
|
||||
<td>
|
||||
<% if(it.detail_fields.active_list !== "N/A") { %>
|
||||
<% it.detail_fields.active_list.forEach(active => { %>
|
||||
<%= `${active.id}: ${active.name}` %>
|
||||
</br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Ranges responses:</th>
|
||||
<td>
|
||||
<% if(it.detail_fields.ranges_response) { %>
|
||||
<% JSON.parse(it.detail_fields.ranges_response).forEach(range => { %>
|
||||
<%= `Range: ${Object.keys(range)[0]}` %>
|
||||
-
|
||||
<%= `Response: ${range[Object.keys(range)[0]]}` %>
|
||||
</br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,118 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Name:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["quiz.name"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Question:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["question"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Order:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["order"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Note:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["note"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Note type:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["note_type"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Depends on question:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["depends_on"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Slider range:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["slider_range"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Main output variable:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["output_variable_name"] %>: <%= it.detail_fields["weight"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Extra output variables:</th>
|
||||
<td>
|
||||
<% if(it.detail_fields["extra_output_variable"] && it.detail_fields["extra_output_variable"] !== "N/A") { %>
|
||||
<% JSON.parse(it.detail_fields["extra_output_variable"]).forEach(oV => { %>
|
||||
<%= oV.name + ': ' + oV.weight %> </br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Type:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["type"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,50 @@
|
||||
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Name:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["name"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Description:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["description"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Section title:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["section_title"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Variables List:</th>
|
||||
<td>
|
||||
<% if(it.detail_fields["output_variable_list"] !== 'N/A' && it.detail_fields["output_variable_list"].length){ %>
|
||||
<% it.detail_fields["output_variable_list"].forEach(ovar => { %>
|
||||
<%= ovar %></br>
|
||||
<% }) %>
|
||||
<% }else{ %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,96 @@
|
||||
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Output variable:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["output_variable_name"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Actives:</th>
|
||||
<td>
|
||||
<% if(it.detail_fields["actives"]) { %>
|
||||
<% JSON.parse(it.detail_fields["actives"]).forEach(active => { %>
|
||||
<%= active %> </br>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
N/A
|
||||
<% } %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Condition operator:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["operator"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Compare value:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["compare_value"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Between Min:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["min"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Between Max:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["max"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Action:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["action"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/admin/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/admin/Main") %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<%~ includeFile("../partials/admin/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<div class="card" style='border-bottom:1px solid #ccc;'>
|
||||
<div class="card-body">
|
||||
<h4 class="primaryHeading2 text-md-left">
|
||||
<%= it.heading %>
|
||||
</h4>
|
||||
<table class="table table-striped">
|
||||
|
||||
<tr>
|
||||
<th>ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Email:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["credential.email"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>First Name:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["first_name"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Last Name:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["last_name"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Role ID:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["role_id"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Status:</th>
|
||||
<td>
|
||||
<%= it.detail_fields["status"] %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
<%~ includeFile("../../partials/admin/Header",it)%>
|
||||
<div class="wrapper container-fluid p-0">
|
||||
<%~ it.body %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<%~ includeFile("../../partials/admin/Header",it)%>
|
||||
<div class="wrapper container-fluid">
|
||||
<div class="row main-body">
|
||||
<div class="sidebar-container">
|
||||
<% if (!it.hideNav) {%>
|
||||
<%~ includeFile("../../partials/admin/Nav", it)%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div class="navigation-row">
|
||||
<button type="button" id="sidebarCollapse" class="btn btn-light">
|
||||
<span>☰</span>
|
||||
</button>
|
||||
</div>
|
||||
<%~ it.body %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% /* Footer */ %>
|
||||
<%~ includeFile("../../partials/admin/Footer", it)%>
|
||||
@@ -0,0 +1,6 @@
|
||||
<%~ includeFile("../../partials/member/Header",it)%>
|
||||
<div class="wrapper container-fluid p-0">
|
||||
<%~ it.body %>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<%~ includeFile("../../partials/member/Header",it)%>
|
||||
<div class="wrapper container-fluid">
|
||||
<div class="row main-body">
|
||||
<div class="sidebar-container">
|
||||
<% if (!it.hideNav) {%>
|
||||
<%~ includeFile("../../partials/member/Nav", it)%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div class="navigation-row">
|
||||
<button type="button" id="sidebarCollapse" class="btn btn-light">
|
||||
<span>☰</span>
|
||||
</button>
|
||||
</div>
|
||||
<%~ it.body %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% /* Footer */ %>
|
||||
<%~ includeFile("../../partials/member/Footer", it)%>
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/member/Clean", {get_page_name:() => "Dashboard"}) %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/member/Main",{get_page_name:() => "Dashboard"}) %>
|
||||
<%}%>
|
||||
|
||||
|
||||
<div class="tab-content mx-4 my-4" id="nav-tabContent">
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
<% layout("../layouts/member/Clean") %>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-10 col-xs-10 p-5 auth-wrap">
|
||||
<div class='text-center'>
|
||||
<h1>Forgot Password</h1>
|
||||
</div>
|
||||
<div class="form-container form-container-auth">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<form action="/member/forgot" method="POST">
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="Email">Email</label>
|
||||
<input type="email" required name="email" class="form-control site-input" placeholder="Email address" required="true" autofocus="true">
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.email){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.email %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" name='btn-login' class="btn btn-accent-light btn-block btn-primary" value="Reset Password">
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group mt-3 d-flex justify-content-center">
|
||||
<a href="/member/login" id="mkd-forgot-password-link">Back to Login</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,88 @@
|
||||
|
||||
<% layout("../layouts/member/Clean") %>
|
||||
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-10 col-xs-10 p-5 auth-wrap">
|
||||
<div class='text-center'>
|
||||
<h1>Login</h1>
|
||||
</div>
|
||||
<div class="form-container form-container-auth">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<form action="/member/login" method="POST">
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="email">Email</label>
|
||||
<input type="email" required class="form-control site-input" id="email" name="email" required="true" value="<%= it.login_fields.email%>" />
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.email){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.email %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group required text-container">
|
||||
<label class='control-label' for="password">Password</label>
|
||||
<input type="password" required class="form-control site-input" id="password" name="password" required="true" >
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.password){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.password %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group mt-3 d-flex justify-content-start">
|
||||
<a href="/member/forgot" id="mkd-forgot-password-link">Forgot Password ?</a>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary btn-block">Submit</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="remember_me" name="remember_me" >
|
||||
<label class="form-check-label" for="remember_me">
|
||||
Remember me
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-center mt-3">
|
||||
<span> OR </span>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-3 ">
|
||||
<a href="<%= it.google_auth_url%>" class="btn btn-accent-light-outline btn-sign-up google-button" >
|
||||
<i class="fab fa-google" aria-hidden="true"></i>
|
||||
Login with Google</a>
|
||||
</div>
|
||||
<div class="form-group mt-3">
|
||||
<a href="<%= it.facebook_auth_url%>" class="btn btn-accent-light-outline btn-sign-up facebook-button" >
|
||||
<i class="fab fa-facebook" aria-hidden="true"></i>
|
||||
Login with Facebook</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="text-center ">
|
||||
<span>Don't have an account yet?
|
||||
<a href="/member/register">Register</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class='text-center'>
|
||||
<p>Copyright © 2021 Manaknightdigital Inc. All rights reserved.</p>
|
||||
|
||||
<p>Powered By <a href="https://manaknightdigital.com" target="__blank">Manaknightdigital Inc.</a></p>
|
||||
</div>
|
||||
@@ -0,0 +1,82 @@
|
||||
<% if(it.layout_clean_mode) {%>
|
||||
<% layout("../layouts/member/Clean") %>
|
||||
<% } else {%>
|
||||
<% layout("../layouts/member/Main") %>
|
||||
<%}%>
|
||||
|
||||
<%~ includeFile("../partials/member/Breadcrumb", it)%>
|
||||
|
||||
<div class="tab-content mx-4 my-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||||
<%~ includeFile("../partials/member/GlobalResponse.eta", it) %>
|
||||
<div class="form-container card p-4">
|
||||
<h5 class="primaryHeading2 mb-4 text-md-left pl-3">
|
||||
Profile
|
||||
</h5>
|
||||
<form action="/member/profile" method="POST">
|
||||
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="first_name" class="control-label">First Name</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_first_name" name="first_name" value="<%= it.form_fields['first_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="last_name" class="control-label">Last Name</label>
|
||||
|
||||
|
||||
<input type="text" class="form-control data-input" id="text_last_name" name="last_name" value="<%= it.form_fields['last_name'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group required col-md-5 col-sm-12 ">
|
||||
<label for="email" class="control-label">Email</label>
|
||||
|
||||
|
||||
<input type="text" required class="form-control data-input" id="text_email" name="credential_email" value="<%= it.form_fields['credential.email'] %>" />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="password" class="control-label">Password</label>
|
||||
|
||||
|
||||
<input id="password_password" name="credential_password" class="form-control" type="password" autocomplete="new-password">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-5 col-sm-12 ">
|
||||
<label for="status" class="control-label">Status</label>
|
||||
|
||||
|
||||
<small class="text-muted">Can select one</small>
|
||||
<select class="selectpicker custom-picker d-block w-100" data-style="btn-light" data-live-search="true" id="select_mapping_status" name="status">
|
||||
<% Object.keys(it.status_mapping()).forEach(function(prop) { %>
|
||||
<% const same = it.form_fields["status"] == prop ? 'selected' : false %>
|
||||
<option class="select_mapping_status_option<%= same ? '_' + same : '' %>" value="<%= prop %>" <%= same %>>
|
||||
<%= it.status_mapping()[prop] %>
|
||||
</option>
|
||||
<% }) %>
|
||||
</select>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group pl-3">
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,107 @@
|
||||
|
||||
<% layout("../layouts/member/Clean") %>
|
||||
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-10 col-xs-10 p-5 auth-wrap">
|
||||
<div class='text-center'>
|
||||
<h1>Register</h1>
|
||||
</div>
|
||||
<div class="form-container form-container-auth ">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<form action="/member/register" method="POST">
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="first name">First Name</label>
|
||||
<input type="text" required class="form-control site-input" name="first_name" required="true" autofocus="true" value="<%= it.register_fields.first_name%>">
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.first_name){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.first_name %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="last name">Last Name</label>
|
||||
<input type="text" required class="form-control site-input" name="last_name" required="true" value="<%= it.register_fields.last_name%>">
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.last_name){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.last_name %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="email address">Email address</label>
|
||||
<input type="email" required class="form-control site-input" name="email" required="true" value="<%= it.register_fields.email%>">
|
||||
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.email){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.email %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="password">Password</label>
|
||||
<input type="password" required class="form-control site-input" name="password" required="true">
|
||||
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.password){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.password %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group required">
|
||||
<label class='control-label' for="password">Repeat Password</label>
|
||||
<input type="password" required class="form-control site-input" name="confirm_password" required="true">
|
||||
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.confirm_password){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.confirm_password %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-block">Submit</button>
|
||||
</form>
|
||||
|
||||
<div class="text-center mt-3">
|
||||
<span> OR </span>
|
||||
</div>
|
||||
|
||||
<div class="form-group mt-3">
|
||||
<a href="<%= it.google_auth_url%>" class="btn btn-accent-light-outline btn-sign-up google-button" >
|
||||
<i class="fab fa-google" aria-hidden="true"></i>
|
||||
Login with Google</a>
|
||||
</div>
|
||||
<div class="form-group mt-3">
|
||||
<a href="<%= it.facebook_auth_url%>" class="btn btn-accent-light-outline btn-sign-up facebook-button" >
|
||||
<i class="fab fa-facebook" aria-hidden="true"></i>
|
||||
Login with Facebook</a>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-4">
|
||||
<span>Already have an account?
|
||||
<a href="/member/login">Login</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class='text-center'>
|
||||
<p>Copyright © 2021 Manaknightdigital Inc. All rights reserved.</p>
|
||||
|
||||
<p>Powered By <a href="https://manaknightdigital.com" target="__blank">Manaknightdigital Inc.</a></p>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
<% layout("../layouts/member/Clean") %>
|
||||
|
||||
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-10 col-xs-10 p-5 auth-wrap">
|
||||
<div class='text-center'>
|
||||
<h1>Reset Password</h1>
|
||||
</div>
|
||||
<div class="form-container form-container-auth">
|
||||
<%~ includeFile("../partials/admin/GlobalResponse.eta", it) %>
|
||||
<form action="/member/reset/<%= it.resetToken%>" method='POST'>
|
||||
<div class="form-group required">
|
||||
<label class='required' for="reset-password">Password</label>
|
||||
<input name="password" required type="password" class="form-control site-input" required="true" id="reset-password">
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.password){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.password %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group required text-container">
|
||||
<label class='control-label' for="confirm-password">Confirm Password</label>
|
||||
<input name="confirm_password" required type="password" class="form-control site-input" required="true" id="confirm-password">
|
||||
<% if(it.validationError){ %>
|
||||
<% if(it.validationError.confirm_password){ %>
|
||||
<div class="alert alert-danger my-4" role="alert">
|
||||
<%= it.validationError.confirm_password %>
|
||||
</div>
|
||||
<%}%>
|
||||
<%}%>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" name='btn-login' class="btn btn-accent-light btn-block btn-primary" value="Reset">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="form-group mt-3 d-flex justify-content-center">
|
||||
<a href="/member/login" id="mkd-forgot-password-link">Back to Login</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-1 col-xs-1"></div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!-- Bread Crumb -->
|
||||
<div aria-label="breadcrumb">
|
||||
<ol class="breadcrumb pl-0 <%= it.breadcrumbs ? 'mb-4' : 'mb-0 p-0' %> bg-background d-flex justify-content-center justify-content-md-start">
|
||||
|
||||
<% if (it.breadcrumbs){%>
|
||||
<% for (let item of it.breadcrumbs) {%>
|
||||
<li class="breadcrumb-item <%= item.active ? 'breadcrumb-active' : '' %>" aria-current="page">
|
||||
<a href="<%= item.link %>" class="breadcrumb-link"><%= item.name %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
<%}%>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -0,0 +1,91 @@
|
||||
<div class="modal fade" id="mkd-media-gallery" tabindex="-1" role="dialog" aria-labelledby="media-gallery" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="media-gallery">Media Gallery</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid" id="mkd-media-gallery-container" style="height: 500px;overflow-y: scroll;">
|
||||
<div class="row" id="mkd-media-gallery-wrapper">
|
||||
|
||||
</div>
|
||||
<div class="text-center" id="mkd-load-more-container">
|
||||
<button class="btn btn-primary" id="mkd-load-more">Load More</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" id="mkd-media-upload-container">
|
||||
<div class="row" id="mkd-media-upload-wrapper">
|
||||
<div class="mkd-upload-btn-wrapper">
|
||||
<button class="mkd-upload-btn">Upload a file</button>
|
||||
<input type="file" name="imagefile" onchange="onFileSelected(event)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" id="mkd-media-crop-container">
|
||||
<div class="row" id="mkd-media-crop-wrapper">
|
||||
<div id="mkd-crop-upload-container-wrapper">
|
||||
<div id="mkd-crop-upload-container">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer mkd-media-panel-1">
|
||||
<button type="button" class="btn btn-primary" id="mkd-media-upload">Upload</button>
|
||||
<button type="button" class="btn btn-dark" id="mkd-media-choose">Choose</button>
|
||||
<button type="button" class="btn btn-warning mkd-close-modal" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
<div class="modal-footer mkd-media-panel-2">
|
||||
<button type="button" class="btn btn-warning mkd-close-modal" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
<div class="modal-footer mkd-media-panel-3">
|
||||
<button type="button" class="btn btn-primary js-crop" id="mkd-media-crop">Crop & Upload</button>
|
||||
<button type="button" class="btn btn-warning mkd-close-modal" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade " id="mkd-csv-import" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document" style='min-height:50vh;'>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">Import CSV</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="/v1/api/preview_csv/" enctype='multipart/form-data' id='import-csv'>
|
||||
<input type="file" name='file' class='d-none' id='csv-file' accept=".csv">
|
||||
<a href="#" class='btn btn-primary' id='btn-choose-csv'>Choose file</a>
|
||||
</form>
|
||||
<table id='csv-table' class='table-responsive d-none table-bordered'>
|
||||
<thead id='csv-table-head'></thead>
|
||||
<tbody id='csv-table-body'></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" id='btn-save-csv' class='btn btn-primary d-none' >Save Data</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modal-image-show" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body justify-content-center p1 text-center">
|
||||
<img id='modal-image-slot' src="" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,31 @@
|
||||
<% if (it.error) { %>
|
||||
<% if (typeof it.error === "object") { %>
|
||||
<% Object.keys(it.error).forEach(function(key) { %>
|
||||
<div class="row flash-response">
|
||||
<div class="col-md-12 mt-4 px-0">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<%= it.error[key] %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
<div class="row flash-response">
|
||||
<div class="col-md-12 mt-4 px-0">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<%= it.error %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (it.success) { %>
|
||||
<div class="row flash-response">
|
||||
<div class="col-md-12 px-0">
|
||||
<div class="alert alert-success" role="success">
|
||||
<%= it.success %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="description" content="<%= it.get_page_description ? it.get_page_description() : '' %>">
|
||||
|
||||
<title><%= it.get_page_name() %></title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta2/dist/css/bootstrap-select.min.css">
|
||||
<% /* css */ %>
|
||||
<link rel="stylesheet" href="/css/select2.min.css" />
|
||||
<link rel="stylesheet" href="/css/styles.css" />
|
||||
<link rel="stylesheet" href="/css/module.merge.css" />
|
||||
<!-- Our Vendor CSS -->
|
||||
<!-- Our Custom CSS -->
|
||||
|
||||
<% /* script */ %>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://use.fontawesome.com/releases/v5.0.13/js/solid.js" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta2/dist/js/bootstrap-select.min.js"></script>
|
||||
<script src="https://raw.githack.com/SortableJS/Sortable/master/Sortable.js"></script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/suneditor@latest/dist/suneditor.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/suneditor@latest/src/lang/en.js"></script>
|
||||
<% /* JS */ %>
|
||||
<script src="/js/select2.min.js" defer></script>
|
||||
<script src="/js/setting.js" defer></script>
|
||||
<script src="/js/mkd-image-gallery.js" defer></script>
|
||||
<script src="/js/media.js" defer></script>
|
||||
<script src="/js/core.js" defer></script>
|
||||
<script src="/js/module.merge.js" defer></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -0,0 +1,26 @@
|
||||
<!-- Sidebar -->
|
||||
<nav id="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<h3>manaknight</h3>
|
||||
</div>
|
||||
|
||||
<ul class="list-unstyled components">
|
||||
<li><a href="/admin/dashboard" class="menu-item <%= it._base_url === '/admin/dashboard' ? 'menu-active':''%>">Dashboard</a></li>
|
||||
<li><a href="/admin/users/0" class="menu-item <%= it._base_url === '/admin/users' ? 'menu-active':''%>">Users</a></li>
|
||||
<li><a href="/admin/orders/0" class="menu-item <%= it._base_url === '/admin/orders' ? 'menu-active':''%>">Orders</a></li>
|
||||
<li><a href="/admin/quizzes/0" class="menu-item <%= it._base_url === '/admin/quizzes' ? 'menu-active':''%>">Quizzes</a></li>
|
||||
<li><a href="/admin/questions/0" class="menu-item <%= it._base_url === '/admin/questions' ? 'menu-active':''%>">Questions</a></li>
|
||||
<li><a href="/admin/answers/0" class="menu-item <%= it._base_url === '/admin/answers' ? 'menu-active':''%>">Answers</a></li>
|
||||
<li><a href="/admin/rules/0" class="menu-item <%= it._base_url === '/admin/rules' ? 'menu-active':''%>">Rules</a></li>
|
||||
<li><a href="/admin/actives/0" class="menu-item <%= it._base_url === '/admin/actives' ? 'menu-active':''%>">Actives</a></li>
|
||||
<li><a href="/admin/output-variables/0" class="menu-item <%= it._base_url === '/admin/output-variables' ? 'menu-active':''%>">Output variables</a></li>
|
||||
<li><a href="/admin/profile-sections/0" class="menu-item <%= it._base_url === '/admin/profile-sections' ? 'menu-active':''%>">Profile sections</a></li>
|
||||
<li><a href="/admin/profile" class="menu-item <%= it._base_url === '/admin/profile' ? 'menu-active':''%>">Profile</a></li>
|
||||
<li><a href="/admin/logout" class="menu-item <%= it._base_url === '/admin/logout' ? 'menu-active':''%>">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="ml-3 d-none">
|
||||
<span class="copyright">Copyright © 2021 manaknight. All rights reserved.</span>
|
||||
<span class="copyright">Powered By <a href="https://manaknight.com" target="__blank">manaknight.</a></span>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!-- Bread Crumb -->
|
||||
<div aria-label="breadcrumb">
|
||||
<ol class="breadcrumb pl-0 <%= it.breadcrumbs ? 'mb-4' : 'mb-0 p-0' %> bg-background d-flex justify-content-center justify-content-md-start">
|
||||
|
||||
<% if (it.breadcrumbs){%>
|
||||
<% for (let item of it.breadcrumbs) {%>
|
||||
<li class="breadcrumb-item <%= item.active ? 'breadcrumb-active' : '' %>" aria-current="page">
|
||||
<a href="<%= item.link %>" class="breadcrumb-link"><%= item.name %></a>
|
||||
</li>
|
||||
<% } %>
|
||||
<%}%>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -0,0 +1,91 @@
|
||||
<div class="modal fade" id="mkd-media-gallery" tabindex="-1" role="dialog" aria-labelledby="media-gallery" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="media-gallery">Media Gallery</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid" id="mkd-media-gallery-container" style="height: 500px;overflow-y: scroll;">
|
||||
<div class="row" id="mkd-media-gallery-wrapper">
|
||||
|
||||
</div>
|
||||
<div class="text-center" id="mkd-load-more-container">
|
||||
<button class="btn btn-primary" id="mkd-load-more">Load More</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" id="mkd-media-upload-container">
|
||||
<div class="row" id="mkd-media-upload-wrapper">
|
||||
<div class="mkd-upload-btn-wrapper">
|
||||
<button class="mkd-upload-btn">Upload a file</button>
|
||||
<input type="file" name="imagefile" onchange="onFileSelected(event)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid" id="mkd-media-crop-container">
|
||||
<div class="row" id="mkd-media-crop-wrapper">
|
||||
<div id="mkd-crop-upload-container-wrapper">
|
||||
<div id="mkd-crop-upload-container">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer mkd-media-panel-1">
|
||||
<button type="button" class="btn btn-primary" id="mkd-media-upload">Upload</button>
|
||||
<button type="button" class="btn btn-dark" id="mkd-media-choose">Choose</button>
|
||||
<button type="button" class="btn btn-warning mkd-close-modal" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
<div class="modal-footer mkd-media-panel-2">
|
||||
<button type="button" class="btn btn-warning mkd-close-modal" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
<div class="modal-footer mkd-media-panel-3">
|
||||
<button type="button" class="btn btn-primary js-crop" id="mkd-media-crop">Crop & Upload</button>
|
||||
<button type="button" class="btn btn-warning mkd-close-modal" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade " id="mkd-csv-import" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl" role="document" style='min-height:50vh;'>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">Import CSV</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="/v1/api/preview_csv/" enctype='multipart/form-data' id='import-csv'>
|
||||
<input type="file" name='file' class='d-none' id='csv-file' accept=".csv">
|
||||
<a href="#" class='btn btn-primary' id='btn-choose-csv'>Choose file</a>
|
||||
</form>
|
||||
<table id='csv-table' class='table-responsive d-none table-bordered'>
|
||||
<thead id='csv-table-head'></thead>
|
||||
<tbody id='csv-table-body'></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#" id='btn-save-csv' class='btn btn-primary d-none' >Save Data</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="modal-image-show" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-md" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body justify-content-center p1 text-center">
|
||||
<img id='modal-image-slot' src="" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,31 @@
|
||||
<% if (it.error) { %>
|
||||
<% if (typeof it.error === "object") { %>
|
||||
<% Object.keys(it.error).forEach(function(key) { %>
|
||||
<div class="row flash-response">
|
||||
<div class="col-md-12 mt-4 px-0">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<%= it.error[key] %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% }) %>
|
||||
<% } else { %>
|
||||
<div class="row flash-response">
|
||||
<div class="col-md-12 mt-4 px-0">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<%= it.error %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (it.success) { %>
|
||||
<div class="row flash-response">
|
||||
<div class="col-md-12 px-0">
|
||||
<div class="alert alert-success" role="success">
|
||||
<%= it.success %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="description" content="<%= it.get_page_description ? it.get_page_description() : '' %>">
|
||||
|
||||
<title><%= it.get_page_name() %></title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css" integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta2/dist/css/bootstrap-select.min.css">
|
||||
<% /* css */ %>
|
||||
<link rel="stylesheet" href="/css/styles.css"></link>
|
||||
<link rel="stylesheet" href="/css/module.merge.css"></link>
|
||||
<!-- Our Vendor CSS -->
|
||||
<!-- Our Custom CSS -->
|
||||
|
||||
<% /* script */ %>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" crossorigin="anonymous"></script>
|
||||
<script src="https://use.fontawesome.com/releases/v5.0.13/js/solid.js" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta2/dist/js/bootstrap-select.min.js"></script>
|
||||
|
||||
|
||||
|
||||
<% /* JS */ %>
|
||||
<script src="/js/media.js" defer></script>
|
||||
<script src="/js/core.js" defer></script>
|
||||
<script src="/js/setting.js" defer></script>
|
||||
<script src="/js/mkd-image-gallery.js" defer></script>
|
||||
<script src="https://js.stripe.com/v3/"></script>
|
||||
<script src="/js/stripe_client.js" defer></script>
|
||||
<script src="https://www.paypal.com/sdk/js?client-id=<%= process.env.PAYPAL_CLIENT_ID %>&components=buttons,funding-eligibility"></script>
|
||||
<script src="/js/module.merge.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -0,0 +1,17 @@
|
||||
<!-- Sidebar -->
|
||||
<nav id="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<h3>manaknight</h3>
|
||||
</div>
|
||||
|
||||
<ul class="list-unstyled components">
|
||||
<li><a href="/member/dashboard" class="menu-item <%= it._base_url === '/member/dashboard' ? 'menu-active':''%>">Dashboard</a></li>
|
||||
<li><a href="/member/profile" class="menu-item <%= it._base_url === '/member/profile' ? 'menu-active':''%>">Profile</a></li>
|
||||
<li><a href="/member/logout" class="menu-item <%= it._base_url === '/member/logout' ? 'menu-active':''%>">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="ml-3 d-none">
|
||||
<span class="copyright">Copyright © 2021 manaknight. All rights reserved.</span>
|
||||
<span class="copyright">Powered By <a href="https://manaknight.com" target="__blank">manaknight.</a></span>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user