فهرست منبع

auto-check district, fixed <style> position

Juan Carlos 5 سال پیش
والد
کامیت
eac527f32b

+ 15 - 11
marktplatz/templates/marktplatz/form_newsletter.html

@@ -17,21 +17,21 @@
     <br>
     {{ form_content | safe }}
 
-      {% csrf_token %}
-      <!-- Left here in case we need to debug -->
-      {% if form_errors %}
-      <div class='invalid-feedback' style="display: none;">{{ form_errors }}</div>
-      {% endif %}
-      <!-- end of debug -->
+    {% csrf_token %}
+    <!-- Left here in case we need to debug -->
+    {% if form_errors %}
+    <div class='invalid-feedback' style="display: none;">{{ form_errors }}</div>
+    {% endif %}
+    <!-- end of debug -->
 
 
-      {% crispy form %}
+    {% crispy form %}
 
 
 
-      {% csrf_token %}
-      {{ signUp|crispy }}
-      <br><br>
+    {% csrf_token %}
+    {{ signUp|crispy }}
+    <br><br>
 
 
 
@@ -45,5 +45,9 @@
     <div class="">
       <br><br><br>
     </div>
-     </div>
+    <script>
+      $(':input[value="{{ bz }}"]').prop('checked', true);
+    </script>
+
+  </div>
 {% endblock %}

+ 5 - 3
marktplatz/templates/marktplatz/modal-sa.html

@@ -40,7 +40,7 @@
 
 
     <!-- Trigger/Open The Modal -->
-    <span id="myBtn" class="cursor-pointer"><i  class="fas fa-bell"></i> Suchagent aktivieren </span>
+    <span id="myBtn" class="cursor-pointer"><i  class="fas fa-bell"></i> Suchagent aktivieren</span>
 
     <!-- The Modal -->
     <div id="SearchAgentModal" class="modal" onclick="function hide(e){ e.style.display='None'; } hide(this);" >
@@ -49,7 +49,7 @@
         <!-- {% now "YFdHi-u" %} -->
 
         <span id="agentClose" class="close">&times;</span>
-        <iframe src="{% url 'search-agent-form-embed' %}" style="border:0px #ffffff none; width:100%;" name="myiFrame" height="600" allowfullscreen></iframe>
+        <iframe src="{% url 'search-agent-form-embed' %}?bz={{ product.ort }}" style="border:0px #ffffff none; width:100%;" name="myiFrame" height="600" allowfullscreen></iframe>
 
       </div>
     </div>
@@ -60,11 +60,13 @@
     var btn = document.getElementById("myBtn");
     var agentSpan = document.getElementById("agentClose");
     btn.onclick = function() {
-      console.log("BAAAAM");
       modal.style.display = "block";
     }
     agentSpan.onclick = function() {
       modal.style.display = "none";
     }
 
+
+
+
     </script>

+ 34 - 38
marktplatz/templates/marktplatz/product_detail.html

@@ -2,18 +2,20 @@
 {% load fullurl %}
 {% load tags %}
 {% load static %}
-{% block script %}
 {% load email_obfuscator %}
 
+
+{% block script %}
+
 <link href="{% static 'featherlight.min.css' %}" type="text/css" rel="stylesheet" />
 <script src="{% static 'featherlight.min.js' %}"></script>
 <link href="{% static 'featherlight.gallery.min.css' %}" type="text/css" rel="stylesheet" />
 <script src="{% static 'featherlight.gallery.min.js' %}"></script>
 
 <script>
-	$(document).ready(function(){
+	$(document).ready(function() {
 
-	$('.gallery').featherlightGallery({
+		$('.gallery').featherlightGallery({
 			previousIcon: '«',
 			nextIcon: '»',
 			galleryFadeIn: 250,
@@ -21,64 +23,58 @@
 		});
 
 	});
-
-
 </script>
 
-
-
-{% endblock %}
-
-{% block content %}
-
-
 <style>
+	.image-detail {
 
+		margin: 40px 60px 40px 0px;
 
-.image-detail{
-
-	margin:40px 60px 40px 0px;
-
-}
+	}
 
-.product-text strong{
+	.product-text strong {
 
-	font-weight: bolder;
-	font: "NeuzeitGro-Bla", sans-serif;
+		font-weight: bolder;
+		font: "NeuzeitGro-Bla", sans-serif;
 
-}
+	}
 
-.product-text{
+	.product-text {
 
-	line-height: 1.2;
-	color: #000;
-}
+		line-height: 1.2;
+		color: #000;
+	}
 
-.product-text h1, h2, h3, h4, h5{
+	.product-text h1,
+	h2,
+	h3,
+	h4,
+	h5 {
 
-	color: #469CA8;
-}
+		color: #469CA8;
+	}
 
-.product-color{
+	.product-color {
 
-color: #469CA8;
+		color: #469CA8;
 
-}
+	}
 
 
-.titlepro{
+	.titlepro {
 
-	margin-top: 40px;
-	font-family: NeuzeitGro-Bla;
-}
+		margin-top: 40px;
+		font-family: NeuzeitGro-Bla;
+	}
 
-@media (min-width: 500px) {
+	@media (min-width: 500px) {}
+</style>
 
 
-}
+{% endblock %}
 
+{% block content %}
 
-</style>
 
 <!-- <hr style="color: black; background-color: black; margin-top: 0px; width: 130%; display: flex; margin-left: -20px; margin-right:20px "> -->
 

+ 1 - 1
marktplatz/views.py

@@ -84,7 +84,7 @@ class AgentNewslwtterFormView(TemplateView):
     def get(self, request, *args, **kwargs):
         context = self.get_context_data()
         context['form'] = AgentNewslwtterForm(  )
-        # print (context)
+        context['bz'] = request.GET.get('bz', '') # used in template to check a district by default.
         return render(request, self.template_name, context )
 
 class AgentNewslwtterSubscribeView(SubscribeRequestView):

+ 1 - 1
project_base/templates/footer.html

@@ -19,7 +19,7 @@
       <span class="float-right" >
       </span>
       <span class="float-right" >
-          <p>&copy; {% now 'Y' %} RealityLab GmbH. Alle Rechte vorbehalten | Development: <a title="co++" href="https://co-plus-plus.eu/" target="_blank" rel="noopener"><img src="{% static 'copp_logo_cut_bw_sm.png' %}" alt="co++" style="max-width: 40px; "  /></a></p>
+          <p>&copy; {% now 'Y' %} RealityLab GmbH. Alle Rechte vorbehalten | Development: <a title="co++" href="https://co-plus-plus.eu/" target="_blank" rel="noopener"><img src="{% static 'copp_logo_cut_bw_sm.png' %}" alt="co++" style="max-width: 40px; "  /></a> & Lotti Tscherteu</p>
       </span>
 
     </div>