47 lines
1.8 KiB
HTML
47 lines
1.8 KiB
HTML
{include "admin/layout.html"}
|
|
|
|
{block "content"}
|
|
<h1>{if spell.ID}Edit Spell: {spell.Name}{else}Add New Spell{/if}</h1>
|
|
|
|
<form class="standard" method="post">
|
|
{csrf}
|
|
<div>
|
|
<label for="name">Spell Name:</label>
|
|
<input type="text" name="name" id="name" value="{spell.Name}" required>
|
|
</div>
|
|
<div>
|
|
<label for="type">Spell Type:</label>
|
|
<select name="type" id="type" required>
|
|
<option value="0"{if spell.Type == 0} selected{/if}>Heal</option>
|
|
<option value="1"{if spell.Type == 1} selected{/if}>Damage</option>
|
|
<option value="2"{if spell.Type == 2} selected{/if}>Sleep</option>
|
|
<option value="3"{if spell.Type == 3} selected{/if}>Uber Attack</option>
|
|
<option value="4"{if spell.Type == 4} selected{/if}>Uber Defense</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="mp">MP Cost:</label>
|
|
<input type="number" name="mp" id="mp" value="{spell.MP}" min="0" required>
|
|
</div>
|
|
<div>
|
|
<label for="power">Power:</label>
|
|
<input type="number" name="power" id="power" value="{spell.Power}" min="0" required>
|
|
</div>
|
|
<div>
|
|
<label for="icon">Icon:</label>
|
|
<input type="text" name="icon" id="icon" value="{spell.Icon}" placeholder="spell_icon.png">
|
|
<small>Optional icon filename or path</small>
|
|
</div>
|
|
<div>
|
|
<label for="lore">Lore/Description:</label>
|
|
<textarea name="lore" id="lore" rows="3" placeholder="Spell description or lore text">{spell.Lore}</textarea>
|
|
</div>
|
|
<div>
|
|
<a href="/admin/spells"><button type="button" class="btn">Cancel</button></a>
|
|
<button type="submit" class="btn btn-primary">{if spell.ID}Update{else}Create{/if} Spell</button>
|
|
{if spell.ID}
|
|
<button type="submit" name="delete" value="1" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this spell?')">Delete Spell</button>
|
|
{/if}
|
|
</div>
|
|
</form>
|
|
{/block} |