Summary Files Commits Branches @commit @diff @stats
path: root / src / views / edit-offer.php
blob: b9fb4647dc68452e8d46cdf0746b62eee06b5d21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<form method="post">
	<input type="hidden" name="id" value="<?php echo self::$job->id?>">
	<label for="title">Job Title: </label>
	<input type="text" name="title" value="<?php echo self::$job->title ?>">
	<br>
	<label for="description">Job Description: </label>
	<textarea type="text" name="description"><?php echo self::$job->description ?></textarea>
	<br>
	<label for="company">Company: </label>
	<select name="company" selected="<?php echo self::$job->companyId ?>">
		<?php 
			foreach(self::$companies as $company) {
				echo "<option value=\"{$company->id}\"";
				echo (self::$job->companyId == $company->id ? "selected" : "") . ">{$company->name}</option>";
			}
		?>
	</select>
	<br>
	<label for="salary">Salary: </label>
	<input type="number" name="salary" min="1" placeholder="1" value="<?php echo self::$job->salary ?>">
	<br>
	<input type="hidden" name="_method" value="put">
	<input type="submit" value="Update">
</form>