Compare commits
6 Commits
861343b338
...
trifold
| Author | SHA1 | Date | |
|---|---|---|---|
|
977926a059
|
|||
|
8f89c14961
|
|||
|
6f5c0354cc
|
|||
|
6ef7c53001
|
|||
|
d4e7401586
|
|||
|
1688e61ccb
|
@@ -260,14 +260,16 @@ func (rc *shopItemController) ShopItemView(c *gin.Context) {
|
|||||||
shopItem, err := repositories.ShopItems.GetById(c.Param("id"))
|
shopItem, err := repositories.ShopItems.GetById(c.Param("id"))
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.HTML(http.StatusBadRequest, "shopitem.html", gin.H{"data": gin.H{"error": err}})
|
c.HTML(http.StatusBadRequest, "error.html", gin.H{"data": gin.H{"error": "Item does not exist"}})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: get tags by item
|
//TODO: get tags by item
|
||||||
tags, err := repositories.Tags.GetAll()
|
tags, err := repositories.Tags.GetAll()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.HTML(http.StatusBadRequest, "shopitem.html", gin.H{"data": gin.H{"error": err}})
|
c.HTML(http.StatusBadRequest, "error.html", gin.H{"data": gin.H{"error": err}})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data := CreateSessionData(c, gin.H{
|
data := CreateSessionData(c, gin.H{
|
||||||
@@ -275,10 +277,6 @@ func (rc *shopItemController) ShopItemView(c *gin.Context) {
|
|||||||
"tags": tags,
|
"tags": tags,
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
c.HTML(http.StatusBadRequest, "shopitem.html", data)
|
|
||||||
}
|
|
||||||
|
|
||||||
c.HTML(http.StatusOK, "shopitem.html", data)
|
c.HTML(http.StatusOK, "shopitem.html", data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -459,17 +457,11 @@ func GetCheckedTags(item models.ShopItem) ([]models.CheckedTag, error) {
|
|||||||
return tags, nil
|
return tags, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (rc *shopItemController) EditItemView(c *gin.Context) {
|
func (rc *shopItemController) getEditTemplatData(shopItem models.ShopItem) (gin.H, error) {
|
||||||
shopItem, err := repositories.ShopItems.GetById(c.Param("id"))
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
c.HTML(http.StatusBadRequest, "error.html", gin.H{"error": err})
|
|
||||||
}
|
|
||||||
|
|
||||||
tags, err := GetCheckedTags(shopItem)
|
tags, err := GetCheckedTags(shopItem)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.HTML(http.StatusBadRequest, "error.html", gin.H{"error": err})
|
return gin.H{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
priceBW := ""
|
priceBW := ""
|
||||||
@@ -484,15 +476,47 @@ func (rc *shopItemController) EditItemView(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data := CreateSessionData(c, gin.H{
|
templateData := gin.H{
|
||||||
"error": "",
|
"error": "",
|
||||||
"success": "",
|
"success": "",
|
||||||
"shopItem": shopItem,
|
"shopItem": shopItem,
|
||||||
"tags": tags,
|
"tags": tags,
|
||||||
"priceBW": priceBW,
|
"priceBW": priceBW,
|
||||||
"priceColored": priceColored,
|
"priceColored": priceColored,
|
||||||
})
|
}
|
||||||
|
|
||||||
|
id := fmt.Sprintf("%d", shopItem.ID)
|
||||||
|
nextShopItem, err := repositories.ShopItems.GetNextOfId(id)
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
fmt.Println("Setting nextitem")
|
||||||
|
fmt.Println(nextShopItem)
|
||||||
|
templateData["nextShopItem"] = nextShopItem
|
||||||
|
}
|
||||||
|
|
||||||
|
previousShopItem, err := repositories.ShopItems.GetPreviousOfId(id)
|
||||||
|
if err == nil {
|
||||||
|
templateData["previousShopItem"] = previousShopItem
|
||||||
|
}
|
||||||
|
|
||||||
|
return templateData, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rc *shopItemController) EditItemView(c *gin.Context) {
|
||||||
|
id := c.Param("id")
|
||||||
|
shopItem, err := repositories.ShopItems.GetById(id)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
c.HTML(http.StatusBadRequest, "error.html", gin.H{"error": err})
|
||||||
|
}
|
||||||
|
|
||||||
|
templateData, err := rc.getEditTemplatData(shopItem)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
c.HTML(http.StatusBadRequest, "error.html", gin.H{"error": err})
|
||||||
|
}
|
||||||
|
|
||||||
|
data := CreateSessionData(c, templateData)
|
||||||
c.HTML(http.StatusOK, "edititem.html", data)
|
c.HTML(http.StatusOK, "edititem.html", data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -533,49 +557,22 @@ func (rc *shopItemController) EditItemHandler(c *gin.Context) {
|
|||||||
|
|
||||||
newShopItem.PrintMode = shopItem.PrintMode
|
newShopItem.PrintMode = shopItem.PrintMode
|
||||||
|
|
||||||
tags, err := GetCheckedTags(newShopItem)
|
templateData, err := rc.getEditTemplatData(newShopItem)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.HTML(http.StatusBadRequest, "edititem.html", gin.H{"error": err})
|
c.HTML(http.StatusBadRequest, "error.html", gin.H{"error": err})
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
priceBW := ""
|
|
||||||
priceColored := ""
|
|
||||||
|
|
||||||
for _, variant := range newShopItem.Variants {
|
|
||||||
if variant.Name == "B/W" {
|
|
||||||
priceBW = fmt.Sprintf("%.2f", variant.Price)
|
|
||||||
}
|
|
||||||
|
|
||||||
if variant.Name == "Colored" {
|
|
||||||
priceColored = fmt.Sprintf("%.2f", variant.Price)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = repositories.ShopItems.Update(newShopItem)
|
_, err = repositories.ShopItems.Update(newShopItem)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
data := CreateSessionData(c, gin.H{
|
templateData["error"] = err
|
||||||
"error": err,
|
data := CreateSessionData(c, templateData)
|
||||||
"success": "",
|
|
||||||
"shopItem": newShopItem,
|
|
||||||
"tags": tags,
|
|
||||||
"priceBW": priceBW,
|
|
||||||
"priceColored": priceColored,
|
|
||||||
})
|
|
||||||
|
|
||||||
c.HTML(http.StatusOK, "edititem.html", data)
|
c.HTML(http.StatusOK, "edititem.html", data)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
data := CreateSessionData(c, gin.H{
|
templateData["success"] = fmt.Sprintf("Item '%s' Updated", newShopItem.Name)
|
||||||
"error": "",
|
data := CreateSessionData(c, templateData)
|
||||||
"success": fmt.Sprintf("Item '%s' Updated", newShopItem.Name),
|
|
||||||
"shopItem": newShopItem,
|
|
||||||
"tags": tags,
|
|
||||||
"priceBW": priceBW,
|
|
||||||
"priceColored": priceColored,
|
|
||||||
})
|
|
||||||
|
|
||||||
c.HTML(http.StatusOK, "edititem.html", data)
|
c.HTML(http.StatusOK, "edititem.html", data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -333,8 +333,20 @@ func (rc *UserController) InviteHandler(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (rc *UserController) MainView(c *gin.Context) {
|
func (rc *UserController) MainView(c *gin.Context) {
|
||||||
shopItems, _ := repositories.ShopItems.GetAll()
|
itemOrder := c.Query("order")
|
||||||
fmt.Println(len(shopItems))
|
|
||||||
|
var shopItems []models.ShopItem
|
||||||
|
if itemOrder == "newestFirst" {
|
||||||
|
shopItems, _ = repositories.ShopItems.GetAllNewestFirst()
|
||||||
|
} else if itemOrder == "oldestFirst" {
|
||||||
|
shopItems, _ = repositories.ShopItems.GetAllNewestLast()
|
||||||
|
} else if itemOrder == "az" {
|
||||||
|
shopItems, _ = repositories.ShopItems.GetAllLexicalFirst()
|
||||||
|
} else if itemOrder == "za" {
|
||||||
|
shopItems, _ = repositories.ShopItems.GetAllLexicalLast()
|
||||||
|
} else {
|
||||||
|
shopItems, _ = repositories.ShopItems.GetAllNewestFirst()
|
||||||
|
}
|
||||||
|
|
||||||
data := CreateSessionData(c, gin.H{
|
data := CreateSessionData(c, gin.H{
|
||||||
"title": "shopItem Page",
|
"title": "shopItem Page",
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ const (
|
|||||||
LongEdge PrintOption = ""
|
LongEdge PrintOption = ""
|
||||||
ShortEdge PrintOption = "-o Binding=TopBinding"
|
ShortEdge PrintOption = "-o Binding=TopBinding"
|
||||||
CreateBooklet PrintOption = "-o Combination=Booklet -o PageSize=A5"
|
CreateBooklet PrintOption = "-o Combination=Booklet -o PageSize=A5"
|
||||||
|
TriFold PrintOption = "-o Fold=TriFold -o Binding=RightBinding"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PrintJob struct {
|
type PrintJob struct {
|
||||||
@@ -32,6 +33,10 @@ func GetPrintMode(mode string) PrintOption {
|
|||||||
return ShortEdge
|
return ShortEdge
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if mode == "TriFold" {
|
||||||
|
return TriFold
|
||||||
|
}
|
||||||
|
|
||||||
return CreateBooklet
|
return CreateBooklet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package repositories
|
package repositories
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
@@ -10,8 +11,15 @@ import (
|
|||||||
type ShopItemRepository interface {
|
type ShopItemRepository interface {
|
||||||
Create(models.ShopItem) (models.ShopItem, error)
|
Create(models.ShopItem) (models.ShopItem, error)
|
||||||
GetAll() ([]models.ShopItem, error)
|
GetAll() ([]models.ShopItem, error)
|
||||||
|
GetAllSorted(string) ([]models.ShopItem, error)
|
||||||
|
GetAllNewestFirst() ([]models.ShopItem, error)
|
||||||
|
GetAllNewestLast() ([]models.ShopItem, error)
|
||||||
|
GetAllLexicalFirst() ([]models.ShopItem, error)
|
||||||
|
GetAllLexicalLast() ([]models.ShopItem, error)
|
||||||
GetAllPublic() ([]models.ShopItem, error)
|
GetAllPublic() ([]models.ShopItem, error)
|
||||||
GetById(string) (models.ShopItem, error)
|
GetById(string) (models.ShopItem, error)
|
||||||
|
GetNextOfId(string) (models.ShopItem, error)
|
||||||
|
GetPreviousOfId(string) (models.ShopItem, error)
|
||||||
GetByTagId(string) ([]models.ShopItem, error)
|
GetByTagId(string) ([]models.ShopItem, error)
|
||||||
GetVariantById(string) (models.ItemVariant, error)
|
GetVariantById(string) (models.ItemVariant, error)
|
||||||
Update(models.ShopItem) (models.ShopItem, error)
|
Update(models.ShopItem) (models.ShopItem, error)
|
||||||
@@ -44,6 +52,29 @@ func (r *GORMShopItemRepository) GetAll() ([]models.ShopItem, error) {
|
|||||||
return shopItems, result.Error
|
return shopItems, result.Error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *GORMShopItemRepository) GetAllSorted(sortString string) ([]models.ShopItem, error) {
|
||||||
|
var shopItems []models.ShopItem
|
||||||
|
result := r.DB.Preload("Tags").Preload("Variants").Order(sortString).Find(&shopItems)
|
||||||
|
|
||||||
|
return shopItems, result.Error
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *GORMShopItemRepository) GetAllNewestFirst() ([]models.ShopItem, error) {
|
||||||
|
return r.GetAllSorted("created_at desc")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *GORMShopItemRepository) GetAllNewestLast() ([]models.ShopItem, error) {
|
||||||
|
return r.GetAllSorted("created_at asc")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *GORMShopItemRepository) GetAllLexicalFirst() ([]models.ShopItem, error) {
|
||||||
|
return r.GetAllSorted("name asc")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *GORMShopItemRepository) GetAllLexicalLast() ([]models.ShopItem, error) {
|
||||||
|
return r.GetAllSorted("name desc")
|
||||||
|
}
|
||||||
|
|
||||||
func (r *GORMShopItemRepository) GetAllPublic() ([]models.ShopItem, error) {
|
func (r *GORMShopItemRepository) GetAllPublic() ([]models.ShopItem, error) {
|
||||||
var shopItems []models.ShopItem
|
var shopItems []models.ShopItem
|
||||||
result := r.DB.Preload("Tags").Preload("Variants").Where("is_public = 1").Find(&shopItems)
|
result := r.DB.Preload("Tags").Preload("Variants").Where("is_public = 1").Find(&shopItems)
|
||||||
@@ -68,6 +99,30 @@ func (r *GORMShopItemRepository) GetById(id string) (models.ShopItem, error) {
|
|||||||
return shopItem, nil
|
return shopItem, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *GORMShopItemRepository) GetNextOfId(id string) (models.ShopItem, error) {
|
||||||
|
var nextItem models.ShopItem
|
||||||
|
if err := r.DB.Where("id > ?", id).Order("id asc").First(&nextItem).Error; err != nil {
|
||||||
|
if err != gorm.ErrRecordNotFound {
|
||||||
|
return models.ShopItem{}, err
|
||||||
|
} else {
|
||||||
|
return models.ShopItem{}, fmt.Errorf("No Item found")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nextItem, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *GORMShopItemRepository) GetPreviousOfId(id string) (models.ShopItem, error) {
|
||||||
|
var previousItem models.ShopItem
|
||||||
|
if err := r.DB.Where("id < ?", id).Order("id desc").First(&previousItem).Error; err != nil {
|
||||||
|
if err != gorm.ErrRecordNotFound {
|
||||||
|
return models.ShopItem{}, err
|
||||||
|
} else {
|
||||||
|
return models.ShopItem{}, fmt.Errorf("No Item found")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return previousItem, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (r *GORMShopItemRepository) GetByTagId(id string) ([]models.ShopItem, error) {
|
func (r *GORMShopItemRepository) GetByTagId(id string) ([]models.ShopItem, error) {
|
||||||
tagId, err := strconv.Atoi(id)
|
tagId, err := strconv.Atoi(id)
|
||||||
|
|
||||||
|
|||||||
@@ -587,6 +587,10 @@ video {
|
|||||||
grid-column: span 12 / span 12;
|
grid-column: span 12 / span 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.col-span-3 {
|
||||||
|
grid-column: span 3 / span 3;
|
||||||
|
}
|
||||||
|
|
||||||
.m-2 {
|
.m-2 {
|
||||||
margin: 0.5rem;
|
margin: 0.5rem;
|
||||||
}
|
}
|
||||||
@@ -806,6 +810,10 @@ video {
|
|||||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grid-cols-6 {
|
||||||
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
.flex-col {
|
.flex-col {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@
|
|||||||
<option selected value="CreateBooklet">Create Booklet</option>
|
<option selected value="CreateBooklet">Create Booklet</option>
|
||||||
<option value="LongEdge">Long Edge</option>
|
<option value="LongEdge">Long Edge</option>
|
||||||
<option value="ShortEdge">Short Edge</option>
|
<option value="ShortEdge">Short Edge</option>
|
||||||
|
<option value="TriFold">Tri-Fold (Flyer)</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
{{ template "header.html" . }}
|
{{ template "header.html" . }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
|
<div class="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
|
||||||
<div class="sm:mx-auto sm:w-full sm:max-w-sm">
|
<div class="sm:mx-auto sm:w-full sm:max-w-sm">
|
||||||
<img class="mx-auto h-10 w-auto" src="/static/img/logo-black.png" alt="Your Company">
|
<img class="mx-auto h-10 w-auto" src="/static/img/logo-black.png" alt="Your Company">
|
||||||
@@ -12,11 +15,31 @@
|
|||||||
{{ .data.success }}
|
{{ .data.success }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a href="/shopitems/{{ .data.shopItem.ID }}">
|
|
||||||
|
<a href="/{{ .data.shopItem.Pdf }}" target="_blank">
|
||||||
<img src="/{{ .data.shopItem.Image }}" alt="Product Image" class="aspect-4/5 mx-auto rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80">
|
<img src="/{{ .data.shopItem.Image }}" alt="Product Image" class="aspect-4/5 mx-auto rounded-md bg-gray-200 object-cover group-hover:opacity-75 lg:aspect-auto lg:h-80">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="grid grid-cols-6 gap-4 mb-4">
|
||||||
|
<div class="col-span-3">
|
||||||
|
{{ if .data.previousShopItem }}
|
||||||
|
<form action="/shopitems/{{ .data.previousShopItem.ID }}/edit">
|
||||||
|
<button type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm/6 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Previous</button>
|
||||||
|
</form>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div class="col-span-3">
|
||||||
|
{{ if .data.nextShopItem }}
|
||||||
|
<form action="/shopitems/{{ .data.nextShopItem.ID }}/edit">
|
||||||
|
<button type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm/6
|
||||||
|
font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
|
||||||
|
focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Next</button>
|
||||||
|
</form>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -42,6 +65,19 @@
|
|||||||
<textarea id="description" name="description" type="textarea" class="block w-full px-4 py-2 mt-2 text-gray-900 bg-white border border-gray-300 rounded-md dark:bg-gray-800 dark:text-gray-900 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring">{{ .data.shopItem.Description}}</textarea>
|
<textarea id="description" name="description" type="textarea" class="block w-full px-4 py-2 mt-2 text-gray-900 bg-white border border-gray-300 rounded-md dark:bg-gray-800 dark:text-gray-900 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-500 focus:outline-none focus:ring">{{ .data.shopItem.Description}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label class="block text-sm/6 font-medium text-gray-900">
|
||||||
|
Print Mode
|
||||||
|
</label>
|
||||||
|
<select name="print-mode" required class="bg-white border border-gray-300 text-gray-900 text-sm rounded-lg
|
||||||
|
focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
|
<option selected value="{{ .data.shopItem.PrintMode }}">{{ .data.shopItem.PrintMode }}</option>
|
||||||
|
<option value="CreateBooklet">CreateBooklet</option>
|
||||||
|
<option value="LongEdge">Long Edge</option>
|
||||||
|
<option value="ShortEdge">Short Edge</option>
|
||||||
|
<option value="TriFold">Tri-Fold (Flyer)</option>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label class="block text-sm/6 text-gray-900">Select Categories</label>
|
<label class="block text-sm/6 text-gray-900">Select Categories</label>
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
@@ -137,17 +173,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="block text-sm font-medium text-gray-900">
|
|
||||||
Print Mode
|
|
||||||
</label>
|
|
||||||
<select name="print-mode" required class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
|
||||||
<option selected value="{{ .data.shopItem.PrintMode }}">{{ .data.shopItem.PrintMode }}</option>
|
|
||||||
<option value="CreateBooklet">CreateBooklet</option>
|
|
||||||
<option value="LongEdge">Long Edge</option>
|
|
||||||
<option value="ShortEdge">Short Edge</option>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm/6 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Update Item</button>
|
<button type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm/6 font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Update Item</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user