Fix in pokerform
This commit is contained in:
parent
528a99eb6d
commit
878ab666be
3 changed files with 16 additions and 12 deletions
|
|
@ -1,12 +1,12 @@
|
|||
${add_js_home_local('jquery.min.js', 'admin')}
|
||||
|
||||
<input type="text" name="${form}_day" id="time_${form}_day" value="${d}" size="2" maxlength="2"/>
|
||||
<input type="text" name="${form}_month" id="time_${form}_month" value="${m}" size="2" maxlength="2"/>
|
||||
<input type="text" name="${form}_year" id="time_${form}_year" value="${y}" size="4" maxlength="4"/>
|
||||
<input type="number" min="1" max="31" name="${form}_day" id="time_${form}_day" class="form_day" value="${d}" size="2" maxlength="2"/>
|
||||
<input type="number" min="1" max="12" name="${form}_month" id="time_${form}_month" class="form_month" value="${m}" size="2" maxlength="2"/>
|
||||
<input type="number" name="${form}_year" id="time_${form}_year" class="form_year" value="${y}" size="4" maxlength="4"/>
|
||||
%if yes_time==True:
|
||||
<input type="text" name="${form}_hour" id="time_${form}_hour" value="${h}" size="2" maxlength="2"/>
|
||||
<input type="text" name="${form}_minute" id="time_${form}_minute" value="${min}" size="2" maxlength="2"/>
|
||||
<input type="text" name="${form}_second" id="time_${form}_second" value="${s}" size="2" maxlength="2"/>
|
||||
<input type="text" min="0" max="23" name="${form}_hour" id="time_${form}_hour" class="form_hour" value="${h}" size="2" maxlength="2"/>
|
||||
<input type="text" min="0" max="60" name="${form}_minute" id="time_${form}_minute" class="form_minute" value="${min}" size="2" maxlength="2"/>
|
||||
<input type="text" min="0" max="60" name="${form}_second" id="time_${form}_second" class="form_second" value="${s}" size="2" maxlength="2"/>
|
||||
<input type="hidden" name="${form}" id="time_${form}" value="" />
|
||||
% endif
|
||||
|
||||
|
|
@ -17,4 +17,4 @@ ${add_js_home_local('jquery.min.js', 'admin')}
|
|||
|
||||
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from paramecio.cromosoma.corefields import PhangoField
|
||||
from paramecio.citoplasma import datetime
|
||||
from paramecio.cromosoma.extraforms.dateform import DateForm
|
||||
|
||||
class DateField(PhangoField):
|
||||
|
||||
|
|
@ -7,6 +8,8 @@ class DateField(PhangoField):
|
|||
|
||||
super().__init__(name, size, required)
|
||||
|
||||
self.name_form=DateForm
|
||||
|
||||
self.utc=True
|
||||
|
||||
def check(self, value):
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class DateForm(BaseForm):
|
|||
super().__init__(name, value)
|
||||
|
||||
self.yes_time=False
|
||||
self.t=standard_t
|
||||
|
||||
def form(self):
|
||||
|
||||
|
|
@ -23,15 +24,15 @@ class DateForm(BaseForm):
|
|||
|
||||
time=format_timedata(self.default_value)
|
||||
|
||||
if time==True:
|
||||
if time:
|
||||
y=int(time[0])
|
||||
m=int(time[1])
|
||||
d=int(time[2])
|
||||
h=int(time[3])
|
||||
min=int(time[4])
|
||||
min_time=int(time[4])
|
||||
s=int(time[5])
|
||||
|
||||
return standard_t.load_template('forms/dateform.phtml', yes_time=self.yes_time, form=self.name, y=y, m=m, d=d, h=h, min=min, s=s)
|
||||
|
||||
return self.t.load_template('forms/dateform.phtml', yes_time=self.yes_time, form=self.name, y=y, m=m, d=d, h=h, min=min_time, s=s)
|
||||
|
||||
#def
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue