Fix in deleting items in admin class
This commit is contained in:
parent
716bf963ce
commit
d600d2d31c
3 changed files with 15 additions and 8 deletions
|
|
@ -3,10 +3,17 @@ ${add_js_home_local('spectrum.js', 'admin')}
|
||||||
${add_css_home_local('spectrum.css', 'admin')}
|
${add_css_home_local('spectrum.css', 'admin')}
|
||||||
<%
|
<%
|
||||||
|
|
||||||
if form.default_value:
|
|
||||||
form.default_value=str(hex(int(form.default_value))).replace('0x', '#')
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
form.default_value=str(hex(int(form.default_value))).replace('0x', '')
|
||||||
|
|
||||||
|
c=len(form.default_value)
|
||||||
|
|
||||||
|
if(c<6):
|
||||||
|
repeat=6-c
|
||||||
|
form.default_value=('0'*repeat)+form.default_value
|
||||||
|
|
||||||
|
form.default_value='#'+form.default_value
|
||||||
|
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<input type='text' id="${form.name_field_id}_field_form" name="${form.name}" value="${form.default_value}" />
|
<input type='text' id="${form.name_field_id}_field_form" name="${form.name}" value="${form.default_value}" />
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<form method="get" action="${url}">
|
<form method="post" action="${add_get_parameters(url, id=item_id, op_admin=op_admin, verified=verified)}">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<input type="hidden" name="id" value="${item_id}">
|
<!-- <input type="hidden" name="id" value="${item_id}">
|
||||||
<input type="hidden" name="op_admin" value="${op_admin}">
|
<input type="hidden" name="op_admin" value="${op_admin}">
|
||||||
<input type="hidden" name="verified" value="${verified}">
|
<input type="hidden" name="verified" value="${verified}">-->
|
||||||
<input type="submit" value="${lang('common', 'delete_item_you_sure', 'Are you sure for delete this item?')}" />
|
<input type="submit" value="${lang('common', 'delete_item_you_sure', 'Are you sure for delete this item?')}" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class ColorField(IntegerField):
|
||||||
value=('0'*repeat)+value
|
value=('0'*repeat)+value
|
||||||
|
|
||||||
value='#'+value
|
value='#'+value
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def show_formatted(self, value):
|
def show_formatted(self, value):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue