Skip to content

Commit

Permalink
closes #33 Ny inleverans: tvinga anv att välja kategori för nya produ…
Browse files Browse the repository at this point in the history
…kter
  • Loading branch information
edruid committed Aug 21, 2011
1 parent 7e0bc0d commit 5e8bf03
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions content/main/delivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,15 @@ function update_sum() {
value="<?=$old_values['sales_price'][$i]?>" /></td>
<td>
<select class="category" name="category[]" >
<option
value=""
disabled="disabled"
<? if(!$old_values || $old_values['category'][$i] == ''): ?>
selected="selected"
<? endif ?>
>
Välj kategori
</option>
<? foreach($categories as $category): ?>
<option value="<?=$category->id?>"
<?=$old_values['category'][$i]==$category->id?'selected="selected"':''?>>
Expand All @@ -270,6 +279,9 @@ function update_sum() {
<td><input type="text" class="sales_price" name="sales_price[]" /></td>
<td>
<select class="category" name="category[]" >
<option value="" disabled="disabled" selected="selected">
Välj kategori
</option>
<? foreach($categories as $category): ?>
<option value="<?=$category->id?>">
<?=$category->name?>
Expand Down

0 comments on commit 5e8bf03

Please sign in to comment.