{
	"name": "form/local/input/person/person1/layout.json",
	"layout": {
		"component": "nc-form",
		"attribute": {
			"id": "person1"
		},
		"element": [
			{
				"component": "nc-form-fields",
				"attribute": {
					"class": ["nc-align-top"],
					"width": "auto"
				},
				"element": [
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Tunnus",
										"attribute": {
											"model": "hdr.per.person_id"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.person_id"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Etunimi / sukunimi",
										"attribute": {
											"model": "hdr.per.first_name"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "1.5/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.first_name"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "1.5/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.last_name"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Koko nimi",
										"attribute": {
											"model": "hdr.per.full_name"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.full_name"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Muistiinpano",
										"attribute": {
											"model": "hdr.per.json_data.note"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.json_data.note"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Titteli",
										"attribute": {
											"model": "hdr.per.title"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.title"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Asema",
										"attribute": {
											"model": "hdr.per.position"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.position"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-divider"
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Yritys",
										"attribute": {
											"model": "hdr.per.json_data.company_id"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.json_data.company_id"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Osasto",
										"attribute": {
											"model": "hdr.per.json_data.department"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.json_data.department"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Osoite",
										"attribute": {
											"model": "hdr.per.address"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.address"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Postitoimipaikka",
										"attribute": {
											"model": "hdr.per.post_office"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.post_code"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.post_office"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Puhelin",
										"attribute": {
											"model": "hdr.per.phone"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.phone"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Puhelin 2",
										"attribute": {
											"model": "hdr.per.json_data.phone2"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.json_data.phone2"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Sähköposti",
										"attribute": {
											"model": "hdr.per.email"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.email"
										}
									}
								]
							}
						]
					}
				]
			},
			{
				"component": "nc-form-fields",
				"attribute": {
					"class": ["nc-align-top"],
					"width": "auto"
				},
				"element": [
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Arv. kpl lista",
										"attribute": {
											"model": "hdr.per.json_data.keyword1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "4/8"
								},
								"element": [
									{
										"component": "nc-textarea",
										"attribute": {
											"model": "rec.per.json_data.keyword1",
											"rows": "1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.json_data.keyword1",
											"multiple": false,
											"save-as-text": true
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Kiinnostunut",
										"attribute": {
											"model": "hdr.per.json_data.keyword2"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "4/8"
								},
								"element": [
									{
										"component": "nc-textarea",
										"attribute": {
											"model": "rec.per.json_data.keyword2",
											"rows": "1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.json_data.keyword2",
											"multiple": false,
											"save-as-text": true
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Pdf jako",
										"attribute": {
											"model": "hdr.per.json_data.keyword6"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "4/8"
								},
								"element": [
									{
										"component": "nc-textarea",
										"attribute": {
											"model": "rec.per.json_data.keyword6",
											"rows": "1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.json_data.keyword6",
											"multiple": false,
											"save-as-text": true
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Luettelojako",
										"attribute": {
											"model": "hdr.per.json_data.keyword3"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "4/8"
								},
								"element": [
									{
										"component": "nc-textarea",
										"attribute": {
											"model": "rec.per.json_data.keyword3",
											"rows": "1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.json_data.keyword3",
											"multiple": false,
											"save-as-text": true
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Kutsu",
										"attribute": {
											"model": "hdr.per.json_data.keyword4"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "4/8"
								},
								"element": [
									{
										"component": "nc-textarea",
										"attribute": {
											"model": "rec.per.json_data.keyword4",
											"rows": "1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.json_data.keyword4",
											"multiple": false,
											"save-as-text": true
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "6/8"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Lähetetty kirja",
										"attribute": {
											"model": "hdr.per.json_data.keyword5"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "2/8"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.json_data.keyword5",
											"multiple": false,
											"save-as-text": true
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "8/8"
								},
								"element": [
									{
										"component": "nc-textarea",
										"attribute": {
											"model": "rec.per.json_data.keyword5",
											"rows": "9"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-label",
								"text": "Lisätietoja",
								"attribute": {
									"model": "hdr.per.info"
								}
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-textarea",
								"attribute": {
									"model": "rec.per.info",
									"rows": "3"
								}
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"v-if": "false"
				},
				"element": [
					{
						"component": "nc-col",
						"attribute": {
							"width": "1/2"
						},
						"element": [
							{
								"component": "nc-label-textarea",
								"text": "Json Data",
								"attribute": {
									"model": "rec.per.json_data",
									"rows": "12"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "auto"
						},
						"element": [
							{
								"component": "nc-json",
								"attribute": {
									"data": "rec.per.json_data"
								}
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"element": [
					{
						"component": "nc-col",
						"attribute": {
							"v-on:click": "showUserInfo = !showUserInfo",
							"width": "0.7em"
						},
						"element": [
							{
								"component": "nc-icon",
								"attribute": {
									":icon": "showUserInfo ? 'caret-down' : 'caret-right'"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "auto"
						},
						"element": [
							{
								"component": "nc-divider"
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"v-show": "showUserInfo"
				},
				"element": [
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Tyyppi / tila",
										"attribute": {
											"model": "hdr.per.record_type"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "1.5/4"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.record_type"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "1.5/4"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.person_state"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Kirjautumistunnus / tila",
										"attribute": {
											"model": "hdr.per.login_id"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "1.5/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.login_id"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "1.5/4"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.account_status"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"attribute": {
							"v-if": "false"
						},
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Ryhmä",
										"attribute": {
											"model": "hdr.per.group"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-dropdown",
										"attribute": {
											"model": "rec.per.json_data.group",
											"array": "rec.group",
											":multiple": "true"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Salasanan tiiviste",
										"attribute": {
											"model": "hdr.per.password_hash"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "3/4"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"model": "rec.per.password_hash"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"width": "1/4"
								},
								"element": [
									{
										"component": "nc-label",
										"text": "Uusi salasana / uudestaan",
										"attribute": {
											"model": "hdr.new_password1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"type": "password",
											":input-style": "rec.new_password1 !== rec.new_password2 ? 'color: darkred' : ''",
											"autocomplete": "new-password",
											"model": "rec.new_password1"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-input",
										"attribute": {
											"type": "password",
											":input-style": "rec.new_password1 !== rec.new_password2 ? 'color: darkred' : ''",
											"autocomplete": "new-password",
											"model": "rec.new_password2"
										}
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"class": ["nc-center-h"],
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											":disabled": "!passwordIsValid",
											"style": "max-width: 12em",
											"v-on:click": "changePassword(rec.new_password1)"
										},
										"element": [
											{
												"component": "nc-icon",
												"attribute": {
													"icon": "password"
												}
											},
											{
												"component": "nc-translate",
												"text": "Vaihda salasana",
												"attribute": {
													"model": "hdr.change_password"
												}
											}
										]
									}
								]
							}
						]
					}
				]
			}
		]
	}
}
