Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
0eafbbe9
Commit
0eafbbe9
authored
May 03, 2019
by
José Luis Uc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agregado nuevo selector de fecha
parent
15fb883f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
3 deletions
+28
-3
forms.py
catalog/forms.py
+9
-2
base_top.html
catalog/templates/base_top.html
+5
-1
fengyuanchen_datepicker.html
catalog/templates/fengyuanchen_datepicker.html
+10
-0
widgets.py
catalog/widgets.py
+4
-0
No files found.
catalog/forms.py
View file @
0eafbbe9
...
@@ -8,6 +8,7 @@ from catalog.models import Process
...
@@ -8,6 +8,7 @@ from catalog.models import Process
#from django.contrib.auth.forms import UserCreationForm
#from django.contrib.auth.forms import UserCreationForm
#from django.contrib.auth.models import User
#from django.contrib.auth.models import User
#from buscador.models import Investigador, Reto
#from buscador.models import Investigador, Reto
from
.widgets
import
FengyuanChenDatePickerInput
all_process
=
Process
.
objects
.
filter
(
status
=
True
)
all_process
=
Process
.
objects
.
filter
(
status
=
True
)
...
@@ -21,7 +22,13 @@ for each_process in all_process:
...
@@ -21,7 +22,13 @@ for each_process in all_process:
class
ASFSearchForm
(
forms
.
Form
):
class
ASFSearchForm
(
forms
.
Form
):
polygon
=
forms
.
CharField
(
widget
=
forms
.
TextInput
(
attrs
=
{
'class'
:
"form-control"
}))
polygon
=
forms
.
CharField
(
widget
=
forms
.
TextInput
(
attrs
=
{
'class'
:
"form-control"
}))
platform
=
forms
.
ChoiceField
(
choices
=
platforms
,
widget
=
forms
.
Select
(
attrs
=
{
'class'
:
"form-control"
}))
platform
=
forms
.
ChoiceField
(
choices
=
platforms
,
widget
=
forms
.
Select
(
attrs
=
{
'class'
:
"form-control"
}))
start
=
forms
.
DateField
(
widget
=
forms
.
DateInput
(
attrs
=
{
'type'
:
'date'
}),
required
=
True
)
start
=
forms
.
DateField
(
end
=
forms
.
DateField
(
initial
=
datetime
.
date
.
today
,
widget
=
forms
.
DateInput
(
attrs
=
{
'type'
:
'date'
}),
required
=
True
)
widget
=
FengyuanChenDatePickerInput
(),
required
=
True
)
end
=
forms
.
DateField
(
widget
=
FengyuanChenDatePickerInput
(),
required
=
True
)
maxResults
=
forms
.
IntegerField
()
maxResults
=
forms
.
IntegerField
()
catalog/templates/base_top.html
View file @
0eafbbe9
...
@@ -25,6 +25,9 @@
...
@@ -25,6 +25,9 @@
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.2/css/all.css"
<link
rel=
"stylesheet"
href=
"https://use.fontawesome.com/releases/v5.7.2/css/all.css"
integrity=
"sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin=
"anonymous"
>
integrity=
"sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
crossorigin=
"anonymous"
>
<!-- Fengyuan Chen's Datepicker -->
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/datepicker/0.6.5/datepicker.min.css"
integrity=
"sha256-b88RdwbRJEzRx95nCuuva+hO5ExvXXnpX+78h8DjyOE="
crossorigin=
"anonymous"
/>
{% block headMedia %}{% endblock %}
{% block headMedia %}{% endblock %}
</head>
</head>
<body
class=
"hold-transition skin-yellow sidebar-mini"
>
<body
class=
"hold-transition skin-yellow sidebar-mini"
>
...
@@ -205,7 +208,8 @@
...
@@ -205,7 +208,8 @@
<script
src=
"{% static 'catalog/js/dataRetrieval.js' %}"
type=
"text/javascript"
></script>
<script
src=
"{% static 'catalog/js/dataRetrieval.js' %}"
type=
"text/javascript"
></script>
<!-- Chartsjs -->
<!-- Chartsjs -->
<script
src=
"{% static 'catalog/js/Chart.min.js' %}"
type=
"text/javascript"
></script>
<script
src=
"{% static 'catalog/js/Chart.min.js' %}"
type=
"text/javascript"
></script>
<!-- Fengyuan Chen's Datepicker -->
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/datepicker/0.6.5/datepicker.min.js"
integrity=
"sha256-/7FLTdzP6CfC1VBAj/rsp3Rinuuu9leMRGd354hvk0k="
crossorigin=
"anonymous"
></script>
{% block footer %}{% endblock %}
{% block footer %}{% endblock %}
{% block scripts %}{% endblock %}
{% block scripts %}{% endblock %}
<div
id=
"ol"
></div>
<div
id=
"ol"
></div>
...
...
catalog/templates/fengyuanchen_datepicker.html
0 → 100644
View file @
0eafbbe9
{% include "django/forms/widgets/input.html" %}
<script>
$
(
function
()
{
$
(
"input[name='{{ widget.name }}']"
).
datepicker
({
format
:
'yyyy-mm-dd'
,
autoHide
:
true
});
});
</script>
\ No newline at end of file
catalog/widgets.py
0 → 100644
View file @
0eafbbe9
from
django.forms
import
DateInput
class
FengyuanChenDatePickerInput
(
DateInput
):
template_name
=
'fengyuanchen_datepicker.html'
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment