Skip to content

Commit

Permalink
Merge pull request #330 from Reena-cell/develop
Browse files Browse the repository at this point in the history
Improvement in ATM Attribute
  • Loading branch information
simonredfern authored May 11, 2023
2 parents 4f66dbe + 095af6a commit 4c3992c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
37 changes: 13 additions & 24 deletions apimanager/atms/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

class CreateAtmForm(forms.Form):

ATTRIBUTE_TYPE = (
('', _('Any')),
('STRING', 'STRING'),
('INTEGER', 'INTEGER'),
('DOUBLE', 'DOUBLE'),
('DATE_WITH_DAY', 'DATE_WITH_DAY'),
)

atm_id = forms.CharField(
label=_('ATM Id'),
widget=forms.TextInput(
Expand Down Expand Up @@ -263,36 +271,17 @@ class CreateAtmForm(forms.Form):
),
required=False,
)
type_attribute = forms.CharField(
type_attribute = forms.ChoiceField(
label=_('Type'),
widget=forms.TextInput(
attrs={
'placeholder': _('Type'),
'class': 'form-control',
}
),
required=False,
)
name_attribute = forms.CharField(
label=_('Attribute Name'),
widget=forms.TextInput(
choices=ATTRIBUTE_TYPE,
widget=forms.Select(
attrs={
'placeholder': _('Name'),
'class': 'form-control',
'class': 'form-control atm_attribute_type',
}
),
required=False,
)
value_attribute = forms.CharField(
label=_('Value'),
widget=forms.TextInput(
attrs={
'placeholder': _('2012-04-23'),
'class': 'form-control',
}
),
required=False,
)

location_categories = forms.CharField(
label=_('Location Category'),
widget=forms.TextInput(
Expand Down
12 changes: 6 additions & 6 deletions apimanager/atms/templates/atms/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,30 +219,30 @@ <h2>{{ bank_id }} : {{ atm_id }}</h2>
<div class="row">
<h1>ATM Attributes</h1>
<div class="col-xs-12 col-sm-3">
<label class="form-group">{% trans "Attribute Name" %}:</label> <br>
<label class="form-group">{% trans "Attribute Name" %}</label>
</div>
<div class="col-xs-12 col-sm-3">
<label class="form-group">{% trans "Attribute Type" %}:</label> <br>
<label class="form-group">{% trans "Attribute Type" %}</label>
</div>
<div class="col-xs-12 col-sm-3">
<label class="form-group">{% trans "Attribute Value" %}:</label> <br>
<label class="form-group">{% trans "Attribute Value" %}</label>
</div>
</div>
<div class="runner">
<div class="row">
<div class="col-xs-12 col-sm-3">
<div class="form-group" cols="1" rows="1">
<input class="atm_attribute_name" value="Attribute Name">
<input class="atm_attribute_name form-control" placeholder="ATTRIBUTE_1">
</div>
</div>
<div class="col-xs-12 col-sm-3">
<div class="form-group" cols="1" rows="1">
<input class="atm_attribute_type" value="Attribute Type">
{{ form.type_attribute }}
</div>
</div>
<div class="col-xs-6 col-sm-3">
<div class="form-group" cols="1" rows="1">
<input class="atm_attribute_value" value="Attribute Value">
<input class="atm_attribute_value form-control" placeholder="abc">
</div>
</div>
<div class="col-sm-6 col-sm-3">
Expand Down

0 comments on commit 4c3992c

Please sign in to comment.