def lookups(self, request, model_admin):
     """
     Returns a list of tuples. The first element in each
     tuple is the coded value for the option that will
     appear in the URL query. The second element is the
     human-readable name for the option that will appear
     in the right sidebar.
     """
     return agentprofile_list()
Exemple #2
0
 def __init__(self, manager_id, *args, **kwargs):
     super(TierFrontEndForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_class = "well"
     self.helper.layout = Layout(Div(Div(Fieldset("", "agent", "queue", "level", "position", css_class="col-md-6"))))
     if self.instance.id:
         common_submit_buttons(self.helper.layout, "update")
     else:
         common_submit_buttons(self.helper.layout)
     self.fields["agent"].choices = agentprofile_list(manager_id)
     self.fields["queue"].choices = queue_list(manager_id)
Exemple #3
0
 def __init__(self, manager_id, *args, **kwargs):
     super(TierFrontEndForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_class = 'well'
     self.helper.layout = Layout(
         Div(
             Div(Fieldset('', 'agent', 'queue', 'level', 'position', css_class='col-md-6')),
         ),
     )
     if self.instance.id:
         common_submit_buttons(self.helper.layout, 'update')
     else:
         common_submit_buttons(self.helper.layout)
     self.fields['agent'].choices = agentprofile_list(manager_id)
     self.fields['queue'].choices = queue_list(manager_id)
Exemple #4
0
 def __init__(self, manager_id, *args, **kwargs):
     super(TierFrontEndForm, self).__init__(*args, **kwargs)
     self.helper = FormHelper()
     self.helper.form_class = 'well'
     self.helper.layout = Layout(
         Div(
             Div(
                 Fieldset('',
                          'agent',
                          'queue',
                          'level',
                          'position',
                          css_class='col-md-6')), ), )
     if self.instance.id:
         common_submit_buttons(self.helper.layout, 'update')
     else:
         common_submit_buttons(self.helper.layout)
     self.fields['agent'].choices = agentprofile_list(manager_id)
     self.fields['queue'].choices = queue_list(manager_id)
Exemple #5
0
 def __init__(self, manager_id, *args, **kwargs):
     super(TierFrontEndForm, self).__init__(*args, **kwargs)
     self.fields['agent'].choices = agentprofile_list(manager_id)
     self.fields['queue'].choices = queue_list(manager_id)
     for i in self.fields.keyOrder:
         self.fields[i].widget.attrs['class'] = "form-control"