Mercurial > gemma
annotate client/src/components/importconfiguration/types/Waterwaygauges.vue @ 3667:c91bcb92e0b7
client: fix rendering of diagram on PDF (Fairwayprofile)
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Mon, 17 Jun 2019 11:00:21 +0200 |
parents | c64c47ff2ab1 |
children | 3d497077f888 |
rev | line source |
---|---|
1992 | 1 <template> |
2 <div> | |
3281
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
3 <div class="d-flex px-2"> |
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
4 <div class="flex-column w-100"> |
1992 | 5 <div class="flex-row text-left"> |
6 <small class="text-muted"> <translate>URL</translate> </small> | |
7 </div> | |
8 <div class="w-100"> | |
1996 | 9 <input |
2088
e972567100d3
input events for import schedule
Thomas Junk <thomas.junk@intevation.de>
parents:
2069
diff
changeset
|
10 @input="urlChanged" |
3281
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
11 class="url form-control form-control-sm" |
1996 | 12 type="url" |
13 :value="url" | |
1992 | 14 /> |
15 </div> | |
16 </div> | |
17 </div> | |
3281
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
18 <div v-if="!url" class="d-flex px-2"> |
1992 | 19 <small |
20 ><translate class="text-danger">Please enter a URL</translate></small | |
21 > | |
22 </div> | |
3281
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
23 <div class="d-flex px-2"> |
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
24 <div class="flex-column mt-2 mr-3 w-50"> |
1992 | 25 <div class="flex-row text-left"> |
26 <small class="text-muted"> <translate>Username</translate> </small> | |
27 </div> | |
28 <div class="w-100"> | |
1996 | 29 <input |
2088
e972567100d3
input events for import schedule
Thomas Junk <thomas.junk@intevation.de>
parents:
2069
diff
changeset
|
30 @input="usernameChanged" |
3281
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
31 class="username form-control form-control-sm" |
1996 | 32 type="text" |
33 :value="username" | |
34 /> | |
1992 | 35 </div> |
36 <div v-if="!username" class="d-flex flex-row"> | |
37 <small | |
38 ><translate class="text-danger" | |
39 >Please enter a Username</translate | |
40 ></small | |
41 > | |
42 </div> | |
43 </div> | |
3281
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
44 <div class="flex-column mt-2 w-50"> |
1992 | 45 <div class="flex-row text-left"> |
46 <small class="text-muted"> <translate>Password</translate> </small> | |
47 </div> | |
48 <div class="w-100 d-flex flex-row"> | |
1996 | 49 <input |
2088
e972567100d3
input events for import schedule
Thomas Junk <thomas.junk@intevation.de>
parents:
2069
diff
changeset
|
50 @input="passwordChanged" |
3281
439e1865a2d2
client: define stretches/imports: code cleanup / style improvements
Markus Kottlaender <markus@intevation.de>
parents:
2979
diff
changeset
|
51 class="password form-control form-control-sm" |
1996 | 52 :type="showPassword" |
53 :value="password" | |
54 /> | |
1992 | 55 <span |
56 class="input-group-text ml-2" | |
57 @click="passwordVisible = !passwordVisible" | |
58 > | |
2919
6c5364ff0abb
client: removed a lot of unnecessary closing tags
Markus Kottlaender <markus@intevation.de>
parents:
2269
diff
changeset
|
59 <font-awesome-icon :icon="passwordVisible ? 'eye-slash' : 'eye'" /> |
1992 | 60 </span> |
61 </div> | |
3515
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
62 <div |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
63 v-if="!password && !this.currentSchedule.id" |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
64 class="d-flex flex-row" |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
65 > |
1992 | 66 <small |
67 ><translate class="text-danger" | |
68 >Please enter a Password</translate | |
69 ></small | |
70 > | |
71 </div> | |
72 </div> | |
73 </div> | |
74 </div> | |
75 </template> | |
76 | |
77 <script> | |
2069 | 78 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
79 * without warranty, see README.md and license for details. | |
80 * | |
81 * SPDX-License-Identifier: AGPL-3.0-or-later | |
82 * License-Filename: LICENSES/AGPL-3.0.txt | |
83 * | |
84 * Copyright (C) 2018 by via donau | |
85 * – Österreichische Wasserstraßen-Gesellschaft mbH | |
86 * Software engineering by Intevation GmbH | |
87 * | |
88 * Author(s): | |
89 * Thomas Junk <thomas.junk@intevation.de> | |
90 */ | |
3515
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
91 |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
92 import { mapState } from "vuex"; |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
93 |
1992 | 94 export default { |
1996 | 95 name: "waterwaygauges", |
96 props: ["username", "password", "url"], | |
97 data() { | |
98 return { | |
99 passwordVisible: false | |
100 }; | |
101 }, | |
102 computed: { | |
3515
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
103 ...mapState("importschedule", [ |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
104 "importScheduleDetailVisible", |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
105 "currentSchedule" |
c64c47ff2ab1
import: fix for passwordleakage. No passwords are received/sent if configuration is edited.
Thomas Junk <thomas.junk@intevation.de>
parents:
3281
diff
changeset
|
106 ]), |
1996 | 107 showPassword() { |
108 if (this.passwordVisible) return "text"; | |
109 return "password"; | |
110 } | |
111 }, | |
112 methods: { | |
113 urlChanged(e) { | |
114 this.$emit("urlChanged", e.target.value); | |
115 }, | |
116 usernameChanged(e) { | |
117 this.$emit("usernameChanged", e.target.value); | |
118 }, | |
119 passwordChanged(e) { | |
120 this.$emit("passwordChanged", e.target.value); | |
121 } | |
122 } | |
1992 | 123 }; |
124 </script> | |
125 | |
126 <style></style> |