Improved survey edit page
This commit is contained in:
		
							parent
							
								
									d20be0c145
								
							
						
					
					
						commit
						f4393b95b4
					
				
					 1 changed files with 16 additions and 10 deletions
				
			
		| 
						 | 
					@ -11,9 +11,15 @@
 | 
				
			||||||
<Navbar title="Create a new survey" />
 | 
					<Navbar title="Create a new survey" />
 | 
				
			||||||
<form class="grid grid-cols-2 gap-2 p-4" method="post">
 | 
					<form class="grid grid-cols-2 gap-2 p-4" method="post">
 | 
				
			||||||
	<label for="title" class="justify-self-end">Survey Title</label>
 | 
						<label for="title" class="justify-self-end">Survey Title</label>
 | 
				
			||||||
	<input type="text" name="title" id="title" class="justify-self-start" value={data?.title} />
 | 
						<input
 | 
				
			||||||
 | 
							type="text"
 | 
				
			||||||
 | 
							name="title"
 | 
				
			||||||
 | 
							id="title"
 | 
				
			||||||
 | 
							class="min-w-80 justify-self-start"
 | 
				
			||||||
 | 
							value={data?.title}
 | 
				
			||||||
 | 
						/>
 | 
				
			||||||
	<label for="description" class="justify-self-end">Survey Description</label>
 | 
						<label for="description" class="justify-self-end">Survey Description</label>
 | 
				
			||||||
	<textarea name="description" id="description" class="justify-self-start"
 | 
						<textarea name="description" id="description" class="min-w-80 justify-self-start"
 | 
				
			||||||
		>{data?.description}</textarea
 | 
							>{data?.description}</textarea
 | 
				
			||||||
	>
 | 
						>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,7 +30,7 @@
 | 
				
			||||||
			type="email"
 | 
								type="email"
 | 
				
			||||||
			name="participants"
 | 
								name="participants"
 | 
				
			||||||
			id="participants"
 | 
								id="participants"
 | 
				
			||||||
			class="justify-self-start"
 | 
								class="min-w-80 justify-self-start"
 | 
				
			||||||
			value={data?.participants?.[idx]?.email}
 | 
								value={data?.participants?.[idx]?.email}
 | 
				
			||||||
		/>
 | 
							/>
 | 
				
			||||||
	{/each}
 | 
						{/each}
 | 
				
			||||||
| 
						 | 
					@ -36,14 +42,14 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<h2 class="col-span-2 text-2xl">Skills</h2>
 | 
						<h2 class="col-span-2 text-2xl">Skills</h2>
 | 
				
			||||||
	{#each Array(skills) as _, idx}
 | 
						{#each Array(skills) as _, idx}
 | 
				
			||||||
		<div class="col-span-2 ml-4 grid grid-cols-2">
 | 
							<div class="col-span-2 ml-4 grid grid-cols-2 gap-4">
 | 
				
			||||||
			<div class="justify-self-end">
 | 
								<div class="flex w-full flex-col justify-self-end">
 | 
				
			||||||
				<label for="skill">Skill title</label>
 | 
									<label for="skill" class="text-xs">Skill title</label>
 | 
				
			||||||
				<input name="skill" id="skill" value={data?.skills?.[idx]?.title} />
 | 
									<input name="skill" id="skill" class="w-full" value={data?.skills?.[idx]?.title} />
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
			<div class="justify-self-start">
 | 
								<div class="flex w-full flex-col justify-self-start">
 | 
				
			||||||
				<label for="skill-description">Skill description</label>
 | 
									<label for="skill-description" class="text-xs">Skill description</label>
 | 
				
			||||||
				<textarea name="skill-description" id="skill-description"
 | 
									<textarea name="skill-description" id="skill-description" class="min-h-36 w-full"
 | 
				
			||||||
					>{data?.skills?.[idx]?.description}</textarea
 | 
										>{data?.skills?.[idx]?.description}</textarea
 | 
				
			||||||
				>
 | 
									>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue