comand-component-library 3.1.91 → 3.1.92

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "3.1.91",
3
+ "version": "3.1.92",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -36,26 +36,27 @@
36
36
  <li><a href="#section-boxes">Boxes</a></li>
37
37
  <li><a href="#section-breadcrumbs">Breadcrumbs</a></li>
38
38
  <li><a href="#section-cookie-disclaimer">Cookie-Disclaimer</a></li>
39
+ <li><a href="#section-custom-headline">Custom Headline</a></li>
39
40
  </ul>
40
41
  <ul>
41
- <li><a href="#section-custom-headline">Custom Headline</a></li>
42
42
  <li><a href="#section-fancybox">Fancybox</a></li>
43
43
  <li><a href="#section-google-maps-integration">Google-Maps&trade;-Integration</a></li>
44
44
  <li><a href="#section-image-gallery">Image Gallery</a></li>
45
45
  <li><a href="#section-image-zoom">Image-Zoom</a></li>
46
46
  <li><a href="#section-login-form">Login Form</a></li>
47
- </ul>
48
- <ul>
49
47
  <li><a href="#section-main-navigation">Main-Navigation</a></li>
50
48
  <li><a href="#section-multistep-form-progress-bar">Multistepform-Progressbar</a></li>
49
+ </ul>
50
+ <ul>
51
51
  <li><a href="#section-pager">Pager</a></li>
52
52
  <li><a href="#section-share-buttons">Share Buttons</a></li>
53
+ <li><a href="#section-site-search">Site Search</a></li>
53
54
  <li><a href="#section-slideshow">Slideshow</a></li>
54
55
  <li><a href="#section-system-message">System-Message</a></li>
55
- </ul>
56
- <ul>
57
56
  <li><a href="#section-tables">Tables</a></li>
58
57
  <li><a href="#section-tabs">Tabs</a></li>
58
+ </ul>
59
+ <ul>
59
60
  <li><a href="#section-thumbnail-scroller">Thumbnail-Scroller</a></li>
60
61
  <li><a href="#section-toggle-darkmode">ToggleDarkMode</a></li>
61
62
  <li><a href="#section-tooltip">Tooltip</a></li>
@@ -840,7 +841,7 @@
840
841
  </CmdBox>
841
842
  </div>
842
843
  <div class="grid-small-item">
843
- <CmdBox :cmdHeadline="{headlineText: 'nase', headlineLevel: 4}" :collapsible="true" :stretchVertically="false">
844
+ <CmdBox :cmdHeadline="{headlineText: 'Collapsible box', headlineLevel: 4}" :collapsible="true" :stretchVertically="false">
844
845
  <template v-slot:header>
845
846
  <h3>
846
847
  Collapsible box with image
@@ -885,25 +886,6 @@
885
886
  <CmdBox boxType="user" :user="user" :cmdHeadline="{headlineLevel: 4}"/>
886
887
  </div>
887
888
  </div>
888
- <h3>Box Site Search</h3>
889
- <CmdBoxSiteSearch
890
- v-model:modelValueInput1="siteSearchInput1"
891
- v-model:modelValueInput2="siteSearchInput2"
892
- v-model:modelValueRadius="radius"
893
- v-model:modelValueSearchFilters="filters"
894
- @search="siteSearchOutput"
895
- textLegend="Search"
896
- :cmdFakeSelect="siteSearchFilters"/>
897
- <dl>
898
- <dt>siteSearchInput1:</dt>
899
- <dd>{{ siteSearchInput1 }}</dd>
900
- <dt>siteSearchInput2:</dt>
901
- <dd>{{ siteSearchInput2 }}</dd>
902
- <dt>Radius:</dt>
903
- <dd>{{ radius }}</dd>
904
- <dt>Filters:</dt>
905
- <dd>{{ filters }}</dd>
906
- </dl>
907
889
  </CmdWidthLimitationWrapper>
908
890
  <!-- end boxes ------------------------------------------------------------------------------------------------------------------------------------------------------->
909
891
 
@@ -973,7 +955,9 @@
973
955
  <a id="section-login-form"></a>
974
956
  <CmdWidthLimitationWrapper>
975
957
  <h2 class="headline-demopage">Login Form</h2>
976
- <CmdLoginForm v-model="loginData" v-focus/>
958
+ <CmdForm :use-validation="true" :use-fieldset="false">
959
+ <CmdLoginForm v-model="loginData" textLegendLoginForm="Please log in" />
960
+ </CmdForm>
977
961
  <p>LoginData: {{ loginData }}</p>
978
962
  </CmdWidthLimitationWrapper>
979
963
 
@@ -1019,7 +1003,7 @@
1019
1003
  <a id="section-newsletter-subscription"></a>
1020
1004
  <CmdWidthLimitationWrapper>
1021
1005
  <h2 class="headline-demopage">Newsletter Subscription</h2>
1022
- <CmdForm textLegend="Stay-up-to-date">
1006
+ <CmdForm textLegend="Stay-up-to-date" :use-fieldset="false">
1023
1007
  <CmdNewsletterSubscription v-model="newsletter" buttonType="submit" @buttonClick="submitNewsletterRegistration" />
1024
1008
  </CmdForm>
1025
1009
  </CmdWidthLimitationWrapper>
@@ -1048,6 +1032,22 @@
1048
1032
  </CmdWidthLimitationWrapper>
1049
1033
  <!-- end share-buttons ------------------------------------------------------------------------------------------------------------------------------------------------------->
1050
1034
 
1035
+ <!-- begin site-search ------------------------------------------------------------------------------------------------------------------------------------------------------->
1036
+ <a id="section-site-search"></a>
1037
+ <CmdWidthLimitationWrapper>
1038
+ <h2 class="headline-demopage">Site Search</h2>
1039
+ <CmdSiteSearch
1040
+ v-model:modelValueInput1="siteSearchInput1"
1041
+ v-model:modelValueInput2="siteSearchInput2"
1042
+ v-model:modelValueRadius="radius"
1043
+ v-model:modelValueSearchFilters="filters"
1044
+ @search="siteSearchOutput"
1045
+ textLegend="Search"
1046
+ :cmdFakeSelect="siteSearchFilters"
1047
+ />
1048
+ </CmdWidthLimitationWrapper>
1049
+ <!-- end site-search ------------------------------------------------------------------------------------------------------------------------------------------------------->
1050
+
1051
1051
  <!-- begin slideshow ------------------------------------------------------------------------------------------------------------------------------------------------------->
1052
1052
  <a id="section-slideshow"></a>
1053
1053
  <CmdWidthLimitationWrapper>
@@ -1281,7 +1281,6 @@ import CmdAddressData from "@/components/CmdAddressData"
1281
1281
  import CmdBackToTopButton from "@/components/CmdBackToTopButton.vue"
1282
1282
  import CmdBankAccountData from "./components/CmdBankAccountData"
1283
1283
  import CmdBox from "@/components/CmdBox.vue"
1284
- import CmdBoxSiteSearch from "@/components/CmdBoxSiteSearch.vue"
1285
1284
  import CmdBreadcrumbs from "@/components/CmdBreadcrumbs.vue"
1286
1285
  import CmdCompanyLogo from "@/components/CmdCompanyLogo.vue"
1287
1286
  import CmdCopyrightInformation from "@/components/CmdCopyrightInformation.vue"
@@ -1307,6 +1306,7 @@ import CmdProgressBar from "@/components/CmdProgressBar.vue"
1307
1306
  import CmdShareButtons from "@/components/CmdShareButtons.vue"
1308
1307
  import CmdSiteFooter from "./components/CmdSiteFooter"
1309
1308
  import CmdSiteHeader from "./components/CmdSiteHeader"
1309
+ import CmdSiteSearch from "@/components/CmdSiteSearch.vue"
1310
1310
  import CmdSlideshow from "@/components/CmdSlideshow.vue"
1311
1311
  import CmdSwitchLanguage from "@/components/CmdSwitchLanguage.vue"
1312
1312
  import CmdSystemMessage from "@/components/CmdSystemMessage.vue"
@@ -1332,7 +1332,6 @@ export default {
1332
1332
  CmdBackToTopButton,
1333
1333
  CmdBankAccountData,
1334
1334
  CmdBox,
1335
- CmdBoxSiteSearch,
1336
1335
  CmdBreadcrumbs,
1337
1336
  CmdCompanyLogo,
1338
1337
  CmdCopyrightInformation,
@@ -1357,6 +1356,7 @@ export default {
1357
1356
  CmdShareButtons,
1358
1357
  CmdSiteFooter,
1359
1358
  CmdSiteHeader,
1359
+ CmdSiteSearch,
1360
1360
  CmdSlideshow,
1361
1361
  CmdSwitchLanguage,
1362
1362
  CmdSystemMessage,
@@ -1375,6 +1375,10 @@ export default {
1375
1375
  showTooltip: false,
1376
1376
  disabledStatus: undefined,
1377
1377
  validationStatus: "",
1378
+ loginData: {
1379
+ username: "",
1380
+ password: ""
1381
+ },
1378
1382
  newsletter: {
1379
1383
  subscription: "",
1380
1384
  email: ""
@@ -1423,7 +1427,6 @@ export default {
1423
1427
  selectedCountry: "de",
1424
1428
  selectedColor: "",
1425
1429
  rangeValue: 50,
1426
- loginData: {},
1427
1430
  siteSearchFilters: {
1428
1431
  show: true,
1429
1432
  selectData: fakeSelectFilterOptionsData,
@@ -1433,7 +1436,7 @@ export default {
1433
1436
  },
1434
1437
  siteSearchInput1: "Doctor",
1435
1438
  siteSearchInput2: "New York",
1436
- radius: 10,
1439
+ radius: 5,
1437
1440
  filters: ["2"],
1438
1441
  switchButtonRadio: "radio1",
1439
1442
  switchButtonCheckboxToggleSwitch: false,
@@ -1517,10 +1520,9 @@ export default {
1517
1520
  this.disabledStatus = disabledStatus
1518
1521
  },
1519
1522
  siteSearchOutput(event) {
1520
- console.log(event)
1523
+ alert(JSON.stringify(event))
1521
1524
  },
1522
- showError(event) {
1523
- console.log("EventMessages", event.messages)
1525
+ showError() {
1524
1526
  alert("Error")
1525
1527
  },
1526
1528
  showFancyBox(type, content, altText) {
@@ -52,7 +52,6 @@
52
52
  }
53
53
 
54
54
  #component-library {
55
- border: 1px solid red;
56
55
  scroll-padding-top: unset !important;
57
56
  scroll-snap-type: unset !important;
58
57
  }
@@ -343,13 +343,14 @@ export default {
343
343
 
344
344
  > .toggle-icon, .toggle-icon > [class*="icon"] {
345
345
  font-size: 1rem;
346
- margin-left: auto;
347
346
  }
347
+ }
348
348
 
349
+ .box-header {
349
350
  &:hover, &:active, &:focus {
350
351
  background: var(--pure-white);
351
352
 
352
- > * {
353
+ * {
353
354
  color: var(--primary-color);
354
355
  }
355
356
  }
@@ -295,9 +295,25 @@ export default {
295
295
 
296
296
  .cmd-box {
297
297
  .box-header {
298
- label.disabled {
299
- .label-text span {
300
- color: var(--pure-white) !important;
298
+ justify-content: unset; /* overwrite setting for collapsible boxes */
299
+
300
+ label {
301
+ &.disabled {
302
+ .label-text span {
303
+ color: var(--pure-white) !important; /* required to set label-text in header to white */
304
+ }
305
+ }
306
+
307
+ & + .toggle-icon {
308
+ width: 100%;
309
+ justify-content: flex-end;
310
+ text-align: right;
311
+ }
312
+ }
313
+
314
+ &:hover, &:active, &:focus {
315
+ label.disabled .label-text span {
316
+ color: var(--disabled-color) !important; /* required to set label-text on hover back to disabled-color */
301
317
  }
302
318
  }
303
319
  }
@@ -687,6 +687,17 @@ export default {
687
687
  }
688
688
  },
689
689
  methods: {
690
+ additionalStandardRequirements() {
691
+ const requirements = []
692
+ // check if field is type "email"
693
+ if(this.$attrs.type === "email") {
694
+ requirements.push({
695
+ message: this.getMessage("cmdformelement.validationTooltip.is_valid_email"),
696
+ valid: () => this.$refs.input.checkValidity()
697
+ })
698
+ }
699
+ return requirements
700
+ },
690
701
  getDomElement() {
691
702
  return this.$refs.label
692
703
  },
@@ -706,8 +717,6 @@ export default {
706
717
  const useValidation = event.target.closest("form")?.dataset.useValidation === "true"
707
718
 
708
719
  if (useValidation) {
709
- this.validationStatus = ""
710
-
711
720
  // if input is filled, set status to success (expect for checkboxes and radiobuttons)
712
721
  if (!["checkbox", "radio"].includes(this.$attrs.type) && this.modelValue) {
713
722
  this.validationStatus = "success"
@@ -792,7 +801,7 @@ export default {
792
801
  watch: {
793
802
  status: {
794
803
  handler() {
795
- this.validationStatus = this.status
804
+ this.validationStatus = this.status || ""
796
805
  },
797
806
  immediate: true
798
807
  }
@@ -1,10 +1,12 @@
1
1
  <template>
2
2
  <!-- begin login-form -->
3
- <fieldset v-if="!sendLogin" class="cmd-login-form flex-container">
4
- <legend :class="{hidden : !showLegend}">{{ textLegend }}</legend>
3
+ <fieldset v-show="!sendLogin" class="cmd-login-form flex-container">
4
+ <legend :class="{hidden : !showLegend}">{{ textLegendLoginForm }}</legend>
5
5
  <!-- begin CmdHeadline -->
6
- <CmdHeadline v-if="cmdHeadlineLoginForm"
7
- v-bind="cmdHeadlineLoginForm"/>
6
+ <CmdHeadline
7
+ v-if="cmdHeadlineLoginForm"
8
+ v-bind="cmdHeadlineLoginForm"
9
+ />
8
10
  <!-- end CmdHeadline -->
9
11
 
10
12
  <!-- being form elements -->
@@ -19,6 +21,8 @@
19
21
  :fieldIconClass="cmdFormElementUsername.innerIconClass"
20
22
  :labelText="cmdFormElementUsername.labelText"
21
23
  :placeholder="cmdFormElementUsername.placeholder"
24
+ :required="cmdFormElementUsername.required"
25
+ @validationStatusChange="checkValidationStatus($event, 'username')"
22
26
  />
23
27
  <!-- end CmdFormElement -->
24
28
 
@@ -32,6 +36,8 @@
32
36
  v-model="password"
33
37
  :labelText="cmdFormElementPassword.labelText"
34
38
  :placeholder="cmdFormElementPassword.placeholder"
39
+ :required="cmdFormElementPassword.required"
40
+ @validationStatusChange="checkValidationStatus($event, 'password')"
35
41
  />
36
42
  <!-- end CmdFormElement -->
37
43
  </div>
@@ -39,6 +45,7 @@
39
45
 
40
46
  <div class="option-wrapper flex-container" v-focus>
41
47
  <template v-if="options.forgotPassword || options.createAccount">
48
+ <!-- begin link for 'forgot password' -->
42
49
  <a v-if="options.forgotPassword" href="#" @click.prevent="sendLogin = true">
43
50
  <span v-if="options.forgotPassword.icon && options.forgotPassword.icon.show && options.forgotPassword.icon.iconClass"
44
51
  :class="options.forgotPassword.icon.iconClass"
@@ -46,7 +53,9 @@
46
53
  </span>
47
54
  <span v-if="options.forgotPassword.text">{{ options.forgotPassword.text }}</span>
48
55
  </a>
49
- <!-- begin link-type 'href' -->
56
+ <!-- end link for 'forgot password' -->
57
+
58
+ <!-- begin link-type 'href' for 'create account' -->
50
59
  <a v-if="options.createAccount && options.createAccount.linkType === 'href'" :href="options.createAccount.path">
51
60
  <span v-if="options.createAccount.icon && options.createAccount.icon.show && options.createAccount.icon.iconClass"
52
61
  :class="options.createAccount.icon.iconClass"
@@ -54,9 +63,9 @@
54
63
  </span>
55
64
  <span v-if="options.createAccount.text">{{ options.createAccount.text }}</span>
56
65
  </a>
57
- <!-- end link-type 'href' -->
66
+ <!-- end link-type 'href' for 'create account' -->
58
67
 
59
- <!-- begin link-type 'router' -->
68
+ <!-- begin link-type 'router' for 'create account' -->
60
69
  <router-link v-else-if="options.createAccount && options.createAccount.linkType === 'router'" :to="options.createAccount.path">
61
70
  <span v-if="options.createAccount.icon && options.createAccount.icon.show && options.createAccount.icon.iconClass"
62
71
  :class="options.createAccount.icon.iconClass"
@@ -64,47 +73,16 @@
64
73
  </span>
65
74
  <span v-if="options.createAccount.text">{{ options.createAccount.text }}</span>
66
75
  </router-link>
67
- <!-- end link-type 'router -->
76
+ <!-- end link-type 'router' for 'create account' -->
68
77
  </template>
69
78
 
70
- <!-- begin link-type 'href' -->
71
- <a
72
- v-if="buttons.login.linkType === 'href'"
73
- :class="['button', { primary: buttons.login.primary }]"
74
- :href="buttons.login.path"
75
- @click.prevent="onClick"
76
- >
77
- <span
78
- v-if="buttons.login.icon.iconClass"
79
- :class="buttons.login.icon.iconClass"
80
- :title="buttons.login.icon.tooltip"
81
- ></span>
82
- <span v-if="buttons.login.text">{{ buttons.login.text }}</span>
83
- </a>
84
- <!-- begin link-type 'href' -->
85
-
86
- <!-- begin link-type 'router' -->
87
- <router-link
88
- v-if="buttons.login.linkType === 'router'"
89
- :class="['button', { primary: buttons.login.primary }]"
90
- :to="buttons.login.path"
91
- @click.prevent="onClick"
92
- >
93
- <span
94
- v-if="buttons.login.icon.iconClass"
95
- :class="buttons.login.icon.iconClass"
96
- :title="buttons.login.icon.tooltip"
97
- ></span>
98
- <span v-if="buttons.login.text">{{ buttons.login.text }}</span>
99
- </router-link>
100
- <!-- begin link-type 'router' -->
101
-
102
79
  <!-- begin link-type 'button' -->
103
80
  <button
104
81
  v-if="buttons.login.linkType === 'button'"
105
82
  :type="buttons.login.type === 'submit' ? 'submit' : 'button'"
106
83
  :class="['button', { primary: buttons.login.primary }]"
107
84
  @click="onClick"
85
+ :disabled="buttonLoginDisabled"
108
86
  >
109
87
  <span
110
88
  v-if="buttons.login.icon.iconClass"
@@ -119,14 +97,13 @@
119
97
  <!-- end login-form -->
120
98
 
121
99
  <!-- begin send-login-form -->
122
- <fieldset v-else class="cmd-login-form flex-container">
123
- <legend :class="{'hidden' : !legendSendLoginForm.show}">{{ legendSendLoginForm.text }}</legend>
100
+ <fieldset v-show="sendLogin" class="cmd-login-form flex-container">
101
+ <legend :class="{'hidden' : !showLegend}">{{ textLegendForgotLoginForm }}</legend>
124
102
  <!-- begin CmdHeadline -->
125
- <CmdHeadline v-if="cmdHeadlineSendLoginForm"
126
- :iconClass="cmdHeadlineSendLoginForm.iconClass"
127
- :preHeadline="cmdHeadlineSendLoginForm.preHeadline"
128
- :headlineLevel="cmdHeadlineSendLoginForm.preHeadline"
129
- :headlineText="cmdHeadlineSendLoginForm.headlineText"/>
103
+ <CmdHeadline
104
+ v-if="cmdHeadlineSendLoginForm"
105
+ v-bind="cmdHeadlineSendLoginForm"
106
+ />
130
107
  <!-- end CmdHeadline -->
131
108
 
132
109
  <!-- begin CmdFormElement -->
@@ -137,8 +114,10 @@
137
114
  :labelText="cmdFormElementSendLogin.labelText"
138
115
  :placeholder="cmdFormElementSendLogin.placeholder"
139
116
  :name="cmdFormElementSendLogin.name"
117
+ :required="cmdFormElementSendLogin.required"
140
118
  :id="cmdFormElementSendLogin.id"
141
- v-model:value="sendLoginMail"
119
+ @validationStatusChange="checkValidationStatus($event, 'email')"
120
+ v-model="sendLoginMail"
142
121
  />
143
122
  <!-- end CmdFormElement -->
144
123
 
@@ -153,43 +132,12 @@
153
132
  </span>
154
133
  </a>
155
134
 
156
- <!-- begin link-type 'href' -->
157
- <a
158
- v-if="buttons.sendLogin.linkType === 'href'"
159
- :class="['button', { primary: buttons.sendLogin.primary }]"
160
- :href="buttons.sendLogin.path"
161
- @click.prevent="sendLogin"
162
- >
163
- <span
164
- v-if="buttons.sendLogin.icon.iconClass"
165
- :class="buttons.sendLogin.icon.iconClass"
166
- :title="buttons.sendLogin.icon.tooltip"
167
- ></span>
168
- <span v-if="buttons.sendLogin.text">{{ buttons.sendLogin.text }}</span>
169
- </a>
170
- <!-- end link-type 'href' -->
171
-
172
- <!-- begin link-type 'router' -->
173
- <router-link
174
- v-if="buttons.sendLogin.linkType === 'router'"
175
- :class="['button', { primary: buttons.sendLogin.primary }]"
176
- :to="buttons.sendLogin.path"
177
- @click.prevent="sendLogin"
178
- >
179
- <span
180
- v-if="buttons.sendLogin.icon.iconClass"
181
- :class="buttons.sendLogin.icon.iconClass"
182
- :title="buttons.sendLogin.icon.tooltip"
183
- ></span>
184
- <span v-if="buttons.sendLogin.text">{{ buttons.sendLogin.text }}</span>
185
- </router-link>
186
- <!-- end link-type 'router' -->
187
-
188
135
  <!-- begin link-type 'button' -->
189
136
  <button
190
137
  v-if="buttons.sendLogin.linkType === 'button'"
191
138
  :type="buttons.sendLogin.type === 'submit' ? 'submit' : 'button'"
192
139
  :class="['button', { primary: buttons.sendLogin.primary }]"
140
+ :disabled="buttonSendLoginDisabled"
193
141
  >
194
142
  <span
195
143
  v-if="buttons.sendLogin.icon?.iconClass"
@@ -216,8 +164,9 @@ export default {
216
164
  name: "CmdLoginForm",
217
165
  data() {
218
166
  return {
219
- username: "",
220
- password: "",
167
+ usernameValidationStatus: false,
168
+ passwordValidationStatus: false,
169
+ emailValidationStatus: false,
221
170
  sendLoginMail: "",
222
171
  sendLogin: false
223
172
  }
@@ -244,7 +193,7 @@ export default {
244
193
  *
245
194
  * @requiredForAccessibility: true
246
195
  */
247
- textLegend: {
196
+ textLegendLoginForm: {
248
197
  type: String,
249
198
  default: "Login form"
250
199
  },
@@ -256,18 +205,13 @@ export default {
256
205
  default: true
257
206
  },
258
207
  /**
259
- * legend for send-login-fieldset
208
+ * legend for forgot-login-fieldset
260
209
  *
261
210
  * @requiredForAccessibility: true
262
- */
263
- legendSendLoginForm: {
264
- type: Object,
265
- default() {
266
- return {
267
- show: false,
268
- text: "Forgot login form"
269
- }
270
- }
211
+ */
212
+ textLegendForgotLoginForm: {
213
+ type: String,
214
+ default: "Forgot login form"
271
215
  },
272
216
  /**
273
217
  * properties for CmdHeadline-component for login-form
@@ -281,13 +225,7 @@ export default {
281
225
  */
282
226
  cmdHeadlineSendLoginForm: {
283
227
  type: Object,
284
- default() {
285
- return {
286
- show: true,
287
- headlineText: "Send Login",
288
- headlineLevel: 2
289
- }
290
- }
228
+ required: false
291
229
  },
292
230
  /**
293
231
  * properties for CmdFormElement-component for username-field
@@ -302,7 +240,8 @@ export default {
302
240
  placeholder: "Type in username",
303
241
  innerIconClass: "icon-user-profile",
304
242
  name: "login-username",
305
- id: "login-username"
243
+ id: "login-username",
244
+ required: true
306
245
  }
307
246
  }
308
247
  },
@@ -319,7 +258,8 @@ export default {
319
258
  placeholder: "Type in password",
320
259
  innerIconClass: "icon-security-settings",
321
260
  name: "login-password",
322
- id: "login-password"
261
+ id: "login-password",
262
+ required: true
323
263
  }
324
264
  }
325
265
  },
@@ -336,7 +276,8 @@ export default {
336
276
  placeholder: "Type in email-address you are registered with",
337
277
  innerIconClass: "icon-mail",
338
278
  name: "login-send-login",
339
- id: "login-send-login"
279
+ id: "login-send-login",
280
+ required: true
340
281
  }
341
282
  }
342
283
  },
@@ -416,6 +357,30 @@ export default {
416
357
  }
417
358
  }
418
359
  },
360
+ computed: {
361
+ buttonLoginDisabled() {
362
+ return !(this.usernameValidationStatus && this.passwordValidationStatus)
363
+ },
364
+ buttonSendLoginDisabled() {
365
+ return !this.emailValidationStatus
366
+ },
367
+ username: {
368
+ get() {
369
+ return this.modelValue.username
370
+ },
371
+ set(value) {
372
+ this.$emit("update:modelValue", {username: value, password: this.password})
373
+ }
374
+ },
375
+ password: {
376
+ get() {
377
+ return this.modelValue.password
378
+ },
379
+ set(value) {
380
+ this.$emit("update:modelValue", {username: this.username, password: value})
381
+ }
382
+ }
383
+ },
419
384
  methods: {
420
385
  modelChange() {
421
386
  this.$emit("update:modelValue", { "username": this.username, "password": this.password })
@@ -425,6 +390,18 @@ export default {
425
390
  },
426
391
  getRoute(language) {
427
392
  return getRoute(language)
393
+ },
394
+ checkValidationStatus(event, fieldType) {
395
+ if (event == null) {
396
+ return
397
+ }
398
+ if(fieldType === "username") {
399
+ this.usernameValidationStatus = event === "success";
400
+ } else if(fieldType === "password") {
401
+ this.passwordValidationStatus = event === "success";
402
+ } else {
403
+ this.emailValidationStatus = event === "success";
404
+ }
428
405
  }
429
406
  },
430
407
  watch: {
@@ -1,4 +1,9 @@
1
1
  <template>
2
+ <fieldset class="cmd-newsletter-subscription flex-container">
3
+ <!-- begin legend -->
4
+ <legend :class="{'hidden' : !showLegend}">{{ textLegend }}</legend>
5
+ <!-- end legend -->
6
+
2
7
  <!-- begin cmd-input-group -->
3
8
  <CmdInputGroup
4
9
  inputTypes="radio"
@@ -34,6 +39,7 @@
34
39
  />
35
40
  <!-- end cmd-form-element -->
36
41
  </div>
42
+ </fieldset>
37
43
  </template>
38
44
 
39
45
  <script>
@@ -67,8 +73,8 @@ export default {
67
73
  }
68
74
  },
69
75
  buttonType: {
70
- type: String,
71
- default: "button",
76
+ type: String,
77
+ default: "button",
72
78
  validator(value) {
73
79
  return value === "submit" || value === "button"
74
80
  }