Skip to content

Commit

Permalink
adjusted some templates for better looks (nothing exciting)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karinon committed Nov 9, 2023
1 parent bdbb360 commit afe36c8
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 37 deletions.
2 changes: 2 additions & 0 deletions templates/history/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ <h1 id='result_caption'>{{ result_caption }}</h1>
</div>
{% endif %}
<div class="row">
<div class="col-md-12">
<div class="alert alert-success alert-dismissible" role="alert" id='alert_send_developer_success' style='display:none'>
Mail sent to {{developer.name}}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
Expand All @@ -48,6 +49,7 @@ <h1 id='result_caption'>{{ result_caption }}</h1>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<strong>Unfollowing!</strong> You will not get further email notifications for this result.
</div> <!-- alert unfollow -->
</div>
</div> <!-- row -->
<div class="row">
{# Render a Bootstrap sendmail dialog #}
Expand Down
33 changes: 22 additions & 11 deletions templates/history/templatetags/mailfield.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
{% load resulttags %}

<input type="hidden" class="col-md-12" role='combobox' value="{% if value %}{{ value }}{%endif%}" id="mail_to_field" name="{{name}}" style="margin:0px; padding:0px;" data-facet="{{facet}}" data-group="{{group}}" data-multiple="{{multiple}}">
<input
type="hidden"
class="col-md-12"
role="combobox"
value="{% if value %}{{ value }}{%endif%}"
id="mail_to_field"
name="{{name}}"
style="margin: 0px; padding: 0px"
data-facet="{{facet}}"
data-group="{{group}}"
data-multiple="{{multiple}}"
/>

<script>
$(document).ready(function() {
$("#mail_to_field").select2({
data: {{user_data|mask_safe_uid:is_guest}},
placeholder: "Select recipients",
minimumInputLength: 2,
allowClear: true,
multiple:true,
maximumSelectionSize: 5,
});
$(document).ready(function() {
$("#mail_to_field").select2({
data: {{user_data|mask_safe_uid:is_guest}},
placeholder: "Select recipients",
minimumInputLength: 2,
allowClear: true,
multiple:true,
maximumSelectionSize: 5,
});

});
});
</script>
52 changes: 26 additions & 26 deletions templates/history/templatetags/sendmail_dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@
{% load dialogtags %}
{% load settingstags %}

<!-- Beware that this is not part of the dialog! -->
<div class="alert alert-success " role="alert" id='alert_send_success' style='display:none'>
<div class="d-flex justify-content-between">
<span id="span_send_success"></span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div> <!-- alert success -->

<!-- Beware that this is not part of the dialog! -->
<div class="alert alert-danger" role="alert" id='alert_send_failed' style='display:none'>
<div class="d-flex justify-content-between">
<span id="span_send_failed"></span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div> <!-- alert failed -->
<div class="col-12">
<!-- Beware that this is not part of the dialog! -->
<div class="alert alert-success " role="alert" id='alert_send_success' style='display:none'>
<div class="d-flex justify-content-between">
<span id="span_send_success"></span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div> <!-- alert success -->

<!-- Beware that this is not part of the dialog! -->
<div class="alert alert-danger" role="alert" id='alert_send_failed' style='display:none'>
<div class="d-flex justify-content-between">
<span id="span_send_failed"></span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</div> <!-- alert failed -->
</div>

<!-- Modal Sendmail Dialog-->
<div class="modal fade" id="sendmail_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal fade" id="sendmail_modal" tabindex="-1" role="dialog" aria-labelledby="Share results via mail" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
Expand All @@ -28,27 +30,25 @@ <h4 class="modal-title">Send email to {% settings_val 'INSTITUTION_NAME' %} user
</div>
<div class="modal-body" id="browsefield">
<div class="form-group">
<p class="help-block">Select user to mail to</p>
<p class="help-block mb-2">Select user to mail to</p>
<input type="hidden" id="myurl" name="myurl" value='{{url}}'>
{% mailfield is_guest %}
<p class="help-block">Message:</p>
<p class="help-block my-2">Message</p>
<textarea class='form-control' id="user_text" name="user_text" rows=3></textarea>
</div>
</div>
<div class="modal-footer">
<div class='col-md-5'>
<div>
<label>
<input type="checkbox" id='copy4me' name='copy4me' data-bs-toggle='tooltip' title='Receive a copy via email' checked>Send me a copy</input>
<input class="me-1" type="checkbox" id='copy4me' name='copy4me' data-bs-toggle='tooltip' title='Receive a copy via email' checked>Send me a copy</input>
</label>
</div> <!-- col-md-4 -->
<div class='col-md-5'>
<label>
<input type="checkbox" id='one4all' name='one4all' data-bs-toggle='tooltip' title='When checked one single mail will addressed to all recepients. Otherwise each recepient will receive her own mail.' checked>One mail to all</input>
<input class="me-1" type="checkbox" id='one4all' name='one4all' data-bs-toggle='tooltip' title='When checked one single mail will addressed to all recepients. Otherwise each recepient will receive her own mail.' checked>One mail to all</input>
</label>
</div> <!-- col-md-4 -->
<div class='col-md-2'>
</div>
<div>
<button type="button" class="btn btn-primary" name="sendBtn" id="sendBtn">Send</button>
</div> <!-- col-md-2 -->
</div>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
Expand Down

0 comments on commit afe36c8

Please sign in to comment.