-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
249 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
django_blog_it/django_blog_it/templates/dashboard/new_contact_us_settings.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{% extends 'dashboard/new_base.html' %} | ||
{% load staticfiles %} | ||
{% block title %} | ||
Configure Contact Us. | ||
{% endblock %} | ||
{% block extra_css %} | ||
{% endblock %} | ||
{% block content %} | ||
<div class="row no_row_margin heading_count"> | ||
<div class="heading col-md-6" id='page_title'></div> | ||
</div> | ||
<div class="row no_row_margin"> | ||
<div class="container-fluid"> | ||
<form action="" method="post" id="contact-us-configure-form" role="form"> | ||
{% csrf_token %} | ||
<div class="row form_row no_row_margin"> | ||
<div class="col-md-12"> | ||
<div class="col-md-6"> | ||
{% for field in form %} | ||
{% if field.name != 'email_admin' and field.name != 'subject' and field.name != 'body_admin' %} | ||
<div class="form-group"> | ||
<label>{{ field.label }} :</label> | ||
<div class="controls"> | ||
{{ field }} | ||
{% if field.help_text %} | ||
<p class="help-inline"><small>{{ field.help_text }}</small></p> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
<div class="col-md-6"> | ||
{% for field in form %} | ||
{% if field.name == 'email_admin' or field.name == 'subject' or field.name == 'body_admin' %} | ||
<div class="form-group"> | ||
<label>{{ field.label }} :</label> | ||
<div class="controls"> | ||
{{ field }} | ||
{% if field.help_text %} | ||
<p class="help-inline"><small>{{ field.help_text }}</small></p> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
</div> | ||
<br clear="all"> | ||
<div class=" col-md-12 buttons_row text-left"> | ||
<button type="submit" class="btn btn-default green_btn"> <i class="fa fa-floppy-o" aria-hidden="true"></i> Save</button> | ||
<button type="reset" class="btn btn-default blue_btn"> <i class="fa fa-refresh" aria-hidden="true"></i> Reset</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
<!-- end of add form div --> | ||
{% endblock content %} | ||
{% block js_script %} | ||
|
||
<script type="text/javascript"> | ||
$(document).ready(function(){ | ||
|
||
// for form submission | ||
CKEDITOR.replace('body_user',{ | ||
filebrowserUploadUrl: '{% url "upload_photos" %}', | ||
filebrowserBrowseUrl: '{% url "recent_photos" %}', | ||
uiColor: '#ffffff', | ||
height: 175, | ||
}); | ||
CKEDITOR.replace('body_admin',{ | ||
filebrowserUploadUrl: '{% url "upload_photos" %}', | ||
filebrowserBrowseUrl: '{% url "recent_photos" %}', | ||
uiColor: '#ffffff', | ||
height: 175, | ||
}); | ||
}); | ||
|
||
$('#contact-us-configure-form').submit(function(event){ | ||
event.preventDefault(); | ||
$('#id_body_user').val(CKEDITOR.instances.id_body_user.getData()); | ||
$('#id_body_admin').val(CKEDITOR.instances.id_body_admin.getData()); | ||
$.post("",$('#contact-us-configure-form').serialize(), function(data){ | ||
if(data.error){ | ||
$('p.error_required').remove(); | ||
for (var key in data.response) { | ||
$('#id_' + key).after('<p class="error_required">* ' + data.response[key] + '</p>'); | ||
} | ||
}else{ | ||
//alert(data['response']); | ||
window.location='/dashboard/blog/'; | ||
} | ||
}, 'json'); | ||
}); | ||
</script> | ||
{% endblock %} |
75 changes: 75 additions & 0 deletions
75
django_blog_it/django_blog_it/templates/posts/contact.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{% extends 'posts/new_base.html' %} | ||
{% load blog_tags %} | ||
{% block title %} Contact Us {% endblock %} | ||
{% block blog_content %} | ||
<!-- blog_detail_container starts here --> | ||
<div class="blog_detail_container"> | ||
<div class="blog_details"> | ||
<div class="panel panel-default blog_panel"> | ||
<div class="panel-body"> | ||
<div class="blog_detail_content contact_container"> | ||
<div class="blog_heading"> | ||
<span class="head_line"></span> | ||
<span class="heading">Contact Us</span> | ||
</div> | ||
<div class="contact_title"> | ||
<p href="#">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled </p> | ||
</div> | ||
<form action="" method="post" id="contact_form" role="form"> | ||
{% csrf_token %} | ||
<div class="contact_form"> | ||
<div class="row form_row no_row_margin"> | ||
<div class="col-md-12"> | ||
{% for field in contact_form %} | ||
<div class="form-group"> | ||
<div class="controls"> | ||
{{ field }} | ||
{% if field.help_text %} | ||
<p class="help-inline"><small>{{ field.help_text }}</small></p> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
<br clear="all"> | ||
<div class=" col-md-12 buttons_row text-left"> | ||
<button type="submit" class="btn btn-default green_btn"> <i class="fa fa-send" aria-hidden="true"></i> SUBMIT YOUR COMMENT</button> | ||
<button type="reset" class="btn btn-default blue_btn"> <i class="fa fa-refresh" aria-hidden="true"></i> RESET</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- blog_detail_container ends here --> | ||
{% endblock %} | ||
{% block js_script %} | ||
<script> | ||
$( document ).ready(function() { | ||
$('#myModal').modal('hide'); | ||
$('#myModal').on('hidden', function () { | ||
// Load up a new modal... | ||
$('#myModal1').modal('show') | ||
}) | ||
}); | ||
|
||
$('#contact_form').submit(function(event){ | ||
event.preventDefault(); | ||
$.post("",$('#contact_form').serialize(), function(data){ | ||
if(data.error){ | ||
$('p.error_required').remove(); | ||
for (var key in data.response) { | ||
$('#id_' + key).after('<p class="error_required">* ' + data.response[key] + '</p>'); | ||
} | ||
}else{ | ||
//alert(data['response']); | ||
window.location="{% url 'contact_us' %}"; | ||
} | ||
}, 'json'); | ||
}); | ||
|
||
</script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters