{
	"name": "form/local/input/person/person1/person1.json",
	"layout": {
		"component": "nc-form",
		"attribute": {
			"id": "person1"
		},
		"element": [
			{
				"component": "nc-row",
				"element": [
					{
						"component": "nc-form-fields",
						"attribute": {
							"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",
								"attribute": {
									"class": ["nc-align-top"]
								},
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "1/4"
										},
										"element": [
											{
												"component": "nc-label",
												"text": "Arv. kpl lista",
												"attribute": {
													"model": "hdr.per.json_data.keyword1"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "3/4"
										},
										"element": [
											{
												"component": "nc-textarea",
												"attribute": {
													"model": "rec.per.json_data.keyword1",
													"multiple": true,
													"rows": "1",
													"save-as-text": true
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-row",
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "1/4"
										},
										"element": [
											{
												"component": "nc-label",
												"text": "Kiinnostunut",
												"attribute": {
													"model": "hdr.per.json_data.keyword2"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "3/4"
										},
										"element": [
											{
												"component": "nc-textarea",
												"attribute": {
													"model": "rec.per.json_data.keyword2",
													"multiple": true,
													"rows": "1",
													"save-as-text": true
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-row",
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "1/4"
										},
										"element": [
											{
												"component": "nc-label",
												"text": "Pdf jako",
												"attribute": {
													"model": "hdr.per.json_data.keyword6"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "3/4"
										},
										"element": [
											{
												"component": "nc-textarea",
												"attribute": {
													"model": "rec.per.json_data.keyword6",
													"multiple": true,
													"rows": "1",
													"save-as-text": true
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-row",
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "1/4"
										},
										"element": [
											{
												"component": "nc-label",
												"text": "Luettelojako",
												"attribute": {
													"model": "hdr.per.json_data.keyword3"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "3/4"
										},
										"element": [
											{
												"component": "nc-textarea",
												"attribute": {
													"model": "rec.per.json_data.keyword3",
													"multiple": true,
													"rows": "1",
													"save-as-text": true
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-row",
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "1/4"
										},
										"element": [
											{
												"component": "nc-label",
												"text": "Kutsu",
												"attribute": {
													"model": "hdr.per.json_data.keyword4"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "3/4"
										},
										"element": [
											{
												"component": "nc-textarea",
												"attribute": {
													"model": "rec.per.json_data.keyword4",
													"multiple": true,
													"rows": "1",
													"save-as-text": true
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-row",
								"element": [
									{
										"component": "nc-col",
										"attribute": {
											"width": "1/4"
										},
										"element": [
											{
												"component": "nc-label",
												"text": "Lähetetty kirja",
												"attribute": {
													"model": "hdr.per.json_data.keyword5"
												}
											}
										]
									},
									{
										"component": "nc-col",
										"attribute": {
											"width": "3/4"
										},
										"element": [
											{
												"component": "nc-textarea",
												"attribute": {
													"model": "rec.per.json_data.keyword5",
													"multiple": true,
													"rows": "12",
													"save-as-text": true
												}
											}
										]
									}
								]
							},
							{
								"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": "2"
										}
									}
								]
							}
						]
					},
					{
						"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",
								"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"
														}
													}
												]
											}
										]
									}
								]
							}
						]
					}
				]
			}
		]
	}
}
