From ca979655af12c944d730d8692865ec0d3417f58e Mon Sep 17 00:00:00 2001
From: "michael.daniel" <michael@pcsg.de>
Date: Wed, 4 Sep 2019 14:13:10 +0200
Subject: [PATCH] refactor: Small changes in coupon code input appearance.

---
 bin/frontend/controls/CouponCodeInput.css  | 11 ++++++++---
 bin/frontend/controls/CouponCodeInput.html |  7 ++++---
 bin/frontend/controls/CouponCodeInput.js   |  5 +++--
 locale.xml                                 |  4 ++++
 4 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/bin/frontend/controls/CouponCodeInput.css b/bin/frontend/controls/CouponCodeInput.css
index d3d2a61..d292430 100644
--- a/bin/frontend/controls/CouponCodeInput.css
+++ b/bin/frontend/controls/CouponCodeInput.css
@@ -11,11 +11,16 @@ div + .quiqqer-coupons-field {
     padding: 5px;
 }
 
-.quiqqer-coupons-couponcodeinput button {
-    border-radius: 0 3px 3px 0;
+.quiqqer-coupons-couponcodeinput-input {
+    min-width: 220px;
+}
+
+.quiqqer-coupons-couponcodeinput-title,
+.quiqqer-coupons-couponcodeinput-input {
+    margin-right: 1rem;
 }
 
 .quiqqer-coupons-couponcodeinput input {
-    border-radius: 3px 0 0 3px;
     line-height: 36px;
+    margin-right: 1rem;
 }
\ No newline at end of file
diff --git a/bin/frontend/controls/CouponCodeInput.html b/bin/frontend/controls/CouponCodeInput.html
index 93c214b..e43048a 100644
--- a/bin/frontend/controls/CouponCodeInput.html
+++ b/bin/frontend/controls/CouponCodeInput.html
@@ -1,9 +1,10 @@
 <div class="quiqqer-coupons-couponcodeinput">
     <label>
-        <span>{{labelInput}}</span>
-        <input type="text" name="code"/>
+        <span class="quiqqer-coupons-couponcodeinput-title">{{labelInput}}</span>
+        <input class="quiqqer-coupons-couponcodeinput-input" type="text" name="code"
+               placeholder="{{labelInputPlaceholder}}"/>
     </label>
-    <button class="quiqqer-coupons-couponcodeinput-btn">
+    <button class="quiqqer-coupons-couponcodeinput-btn btn btn-success">
         <span>{{submitBtnText}}</span>
     </button>
 </div>
\ No newline at end of file
diff --git a/bin/frontend/controls/CouponCodeInput.js b/bin/frontend/controls/CouponCodeInput.js
index a602010..53de490 100644
--- a/bin/frontend/controls/CouponCodeInput.js
+++ b/bin/frontend/controls/CouponCodeInput.js
@@ -53,8 +53,9 @@ define('package/quiqqer/coupons/bin/frontend/controls/CouponCodeInput', [
             this.$Elm.addClass('quiqqer-coupons-field');
 
             this.$Elm.set('html', Mustache.render(template, {
-                labelInput   : QUILocale.get(lg, lgPrefix + 'labelInput'),
-                submitBtnText: QUILocale.get(lg, lgPrefix + 'submitBtnText')
+                labelInput           : QUILocale.get(lg, lgPrefix + 'labelInput'),
+                labelInputPlaceholder: QUILocale.get(lg, lgPrefix + 'labelInputPlaceholder'),
+                submitBtnText        : QUILocale.get(lg, lgPrefix + 'submitBtnText')
             }));
 
             this.Loader.inject(this.$Elm);
diff --git a/locale.xml b/locale.xml
index 14c0a36..02b516e 100644
--- a/locale.xml
+++ b/locale.xml
@@ -382,6 +382,10 @@
             <de><![CDATA[Gutschein-Code]]></de>
             <en><![CDATA[Coupon code]]></en>
         </locale>
+        <locale name="controls.frontend.CouponCodeInput.template.labelInputPlaceholder">
+            <de><![CDATA[Gutschein-Code eintippen]]></de>
+            <en><![CDATA[Enter coupon code]]></en>
+        </locale>
         <locale name="controls.frontend.CouponCodeInput.template.submitBtnText">
             <de><![CDATA[Einlösen]]></de>
             <en><![CDATA[Redeem]]></en>
-- 
GitLab