Remove old/unused feedback templates
This commit is contained in:
parent
c38dc8b842
commit
027d44e04a
|
@ -1,57 +0,0 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%inherit file="/base.mako" />
|
||||
|
||||
<%def name="title()">User Feedback</%def>
|
||||
|
||||
<%def name="head_tags()">
|
||||
${parent.head_tags()}
|
||||
<style type="text/css">
|
||||
.form p {
|
||||
margin: 1em 0;
|
||||
}
|
||||
div.field-wrapper div.field input[type=text] {
|
||||
width: 25em;
|
||||
}
|
||||
div.field-wrapper div.field textarea {
|
||||
width: 50em;
|
||||
}
|
||||
div.buttons {
|
||||
margin-left: 15em;
|
||||
}
|
||||
</style>
|
||||
</%def>
|
||||
|
||||
<div class="form">
|
||||
${form.begin()}
|
||||
${form.csrf_token()}
|
||||
${form.hidden('user', value=request.user.uuid if request.user else None)}
|
||||
|
||||
<p>
|
||||
Questions, suggestions, comments, complaints, etc. regarding this website
|
||||
are welcome and may be submitted below.
|
||||
</p>
|
||||
<p>
|
||||
Messages will be delivered to the local IT department, and possibly others.
|
||||
</p>
|
||||
|
||||
## % if error:
|
||||
## <div class="error">${error}</div>
|
||||
## % endif
|
||||
|
||||
% if request.user:
|
||||
${form.field_div('user_name', form.hidden('user_name', value=six.text_type(request.user)) + six.text_type(request.user), label="Your Name")}
|
||||
% else:
|
||||
${form.field_div('user_name', form.text('user_name'), label="Your Name")}
|
||||
% endif
|
||||
|
||||
${form.field_div('referrer', form.hidden('referrer', value=request.get_referrer()) + request.get_referrer(), label="Referring URL")}
|
||||
|
||||
${form.field_div('message', form.textarea('message', rows=15))}
|
||||
|
||||
<div class="buttons">
|
||||
${form.submit('send', "Send Message")}
|
||||
${h.link_to("Cancel", request.get_referrer(), class_='button')}
|
||||
</div>
|
||||
|
||||
${form.end()}
|
||||
</div>
|
|
@ -1,39 +0,0 @@
|
|||
## -*- coding: utf-8; -*-
|
||||
|
||||
<%def name="feedback_dialog()">
|
||||
<div id="feedback-dialog" style="display: none;">
|
||||
${h.form(url('feedback'))}
|
||||
${h.csrf_token(request)}
|
||||
${h.hidden('user', value=request.user.uuid if request.user else None)}
|
||||
|
||||
<p>
|
||||
Questions, suggestions, comments, complaints, etc. <span class="red">regarding this website</span>
|
||||
are welcome and may be submitted below.
|
||||
</p>
|
||||
|
||||
<div class="field-wrapper referrer">
|
||||
<label for="referrer">Referring URL</label>
|
||||
<div class="field"></div>
|
||||
</div>
|
||||
|
||||
% if request.user:
|
||||
${h.hidden('user_name', value=six.text_type(request.user))}
|
||||
% else:
|
||||
<div class="field-wrapper">
|
||||
<label for="user_name">Your Name</label>
|
||||
<div class="field">
|
||||
${h.text('user_name')}
|
||||
</div>
|
||||
</div>
|
||||
% endif
|
||||
|
||||
<div class="field-wrapper">
|
||||
<label for="referrer">Message</label>
|
||||
<div class="field">
|
||||
${h.textarea('message', cols=45, rows=15)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
${h.end_form()}
|
||||
</div>
|
||||
</%def>
|
|
@ -1,88 +0,0 @@
|
|||
## -*- coding: utf-8; -*-
|
||||
|
||||
<%def name="feedback_dialog()">
|
||||
<script type="text/x-template" id="feedback-template">
|
||||
<div>
|
||||
|
||||
<div class="level-item">
|
||||
<b-button type="is-primary"
|
||||
@click="showFeedback()"
|
||||
icon-pack="fas"
|
||||
icon-left="fas fa-comment">
|
||||
Feedback
|
||||
</b-button>
|
||||
</div>
|
||||
|
||||
<b-modal has-modal-card
|
||||
:active.sync="showDialog">
|
||||
<div class="modal-card">
|
||||
|
||||
<header class="modal-card-head">
|
||||
<p class="modal-card-title">User Feedback</p>
|
||||
</header>
|
||||
|
||||
<section class="modal-card-body">
|
||||
<p>
|
||||
Questions, suggestions, comments, complaints, etc.
|
||||
<span class="red">regarding this website</span> are
|
||||
welcome and may be submitted below.
|
||||
</p>
|
||||
|
||||
<b-field label="User Name">
|
||||
<b-input v-model="userName"
|
||||
% if request.user:
|
||||
disabled
|
||||
% endif
|
||||
>
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Referring URL">
|
||||
<b-input
|
||||
## :value="referrer"
|
||||
v-model="referrer"
|
||||
disabled="true">
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
<b-field label="Message">
|
||||
<b-input type="textarea"
|
||||
v-model="message"
|
||||
ref="textarea">
|
||||
</b-input>
|
||||
</b-field>
|
||||
|
||||
</section>
|
||||
|
||||
<footer class="modal-card-foot">
|
||||
<b-button @click="showDialog = false">
|
||||
Cancel
|
||||
</b-button>
|
||||
<once-button type="is-primary"
|
||||
@click="sendFeedback()"
|
||||
:disabled="!message.trim()"
|
||||
text="Send Message">
|
||||
</once-button>
|
||||
</footer>
|
||||
</div>
|
||||
</b-modal>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
FeedbackFormData.csrftoken = ${json.dumps(request.session.get_csrf_token() or request.session.new_csrf_token())|n}
|
||||
FeedbackFormData.referrer = location.href
|
||||
|
||||
% if request.user:
|
||||
FeedbackFormData.userUUID = ${json.dumps(request.user.uuid)|n}
|
||||
FeedbackFormData.userName = ${json.dumps(six.text_type(request.user))|n}
|
||||
% endif
|
||||
|
||||
FeedbackForm.data = function() { return FeedbackFormData }
|
||||
|
||||
Vue.component('feedback-form', FeedbackForm)
|
||||
|
||||
</script>
|
||||
</%def>
|
Loading…
Reference in a new issue