Files
UbuntuandClaude Opus 4.7 52e00216f7 Fix admin update forms — restore proper value="" quoting
The security hardening commit accidentally rendered every input value as
value=\"...\" (literal backslash-quote in HTML), which mangled all
submitted fields including the hidden worker_id/service_id, causing
UPDATE to match zero rows and silently no-op.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 12:40:50 +00:00

82 lines
5.2 KiB
PHP
Executable File

<div class="mainContentContainer" style="top:100px">
<div class="pageTitle"><?php echo $pageTitle;?></div>
<form method="post" action="<?php echo base_url();?>services/service-process">
<input type="hidden" name ="service_id" value="<?php echo htmlspecialchars($selectedItem->service_id, ENT_QUOTES, 'UTF-8');?>">
<div class="formRow">
<label class="formTitle">Típus</label>
<select class="formDropdownBox" style="padding:0;" name="service_type">
<option value="beauty" <?php echo $selectedItem->service_type=='beauty'?'selected':'';?>>beauty</option>
<option value="barber" <?php echo $selectedItem->service_type=='barber'?'selected':'';?>>barber</option>
</select>
</div>
<div class="formRow">
<label class="formTitle">Kategória (NO)</label>
<input type="text" class="formInputBox" name="service_category_no" value="<?php echo htmlspecialchars($selectedItem->service_category_no, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Kategória (EN)</label>
<input type="text" class="formInputBox" name="service_category_en" value="<?php echo htmlspecialchars($selectedItem->service_category_en, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Kategória (HU)</label>
<input type="text" class="formInputBox" name="service_category_hu" value="<?php echo htmlspecialchars($selectedItem->service_category_hu, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (NO)</label>
<input type="text" class="formInputBox" name="service_name_no" value="<?php echo htmlspecialchars($selectedItem->service_name_no, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (EN)</label>
<input type="text" class="formInputBox" name="service_name_en" value="<?php echo htmlspecialchars($selectedItem->service_name_en, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Megnevezés (HU)</label>
<input type="text" class="formInputBox" name="service_name_hu" value="<?php echo htmlspecialchars($selectedItem->service_name_hu, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Leírás (NO)</label>
<input type="text" class="formInputBox" name="service_description_no" value="<?php echo htmlspecialchars($selectedItem->service_description_no, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Leírás (EN)</label>
<input type="text" class="formInputBox" name="service_description_en" value="<?php echo htmlspecialchars($selectedItem->service_description_en, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Leírás (HU)</label>
<input type="text" class="formInputBox" name="service_description_hu" value="<?php echo htmlspecialchars($selectedItem->service_description_hu, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás ára</label>
<input type="number" class="formInputBox" name="service_price" value="<?php echo htmlspecialchars($selectedItem->service_price, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás időtartama</label>
<input type="time" class="formInputBox" name="service_time" value="<?php echo htmlspecialchars($selectedItem->service_time, ENT_QUOTES, 'UTF-8');?>">
</div>
<div class="formRow">
<label class="formTitle">Szolgáltatás kategória</label>
<select class="formDropdownBox" style="padding:0;" name="service_category_id">
<?php
if(!empty($serviceCategories)){
foreach($serviceCategories as $serviceCategoryItem){
echo '<option value="'.$serviceCategoryItem->service_category_id.'" '.($selectedItem->service_category_id == $serviceCategoryItem->service_category_id?' selected':'').'>'.htmlspecialchars($serviceCategoryItem->serv_cat_name, ENT_QUOTES, 'UTF-8').'</option>';
}
}
?>
</select>
</div>
<div class="formRow">
<label class="formTitle">Aktív</label>
<select class="formDropdownBox" style="padding:0;" name="is_enabled">
<option value="1" <?php echo $selectedItem->is_enabled?'selected':'';?>>igen</option>
<option value="0" <?php echo !$selectedItem->is_enabled?'selected':'';?>>nem</option>
</select>
</div>
<div class="formRow">
<input type="submit" class="submitButton" name="updateService" value="Módosítás">
<a href="<?php echo base_url();?>services" class="cancelButton" >Mégsem</a>
</div>
</form>
</div>