# Path: moth/views/base/form_template_view.py
# class FormTemplateView(VulnerableTemplateView):
#     template_name = "moth/vulnerability-form.html"
#     form_klass = GenericForm
#     
#     def get(self, request, *args, **kwargs):
#         form = self.form_klass()
#         return render(request, self.template_name,
#                       self.get_context_data(form=form))


from django.shortcuts import render
from moth.views.base.form_template_view import FormTemplateView
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Submit



#
#    FIXME: See https://github.com/andresriancho/w3af/issues/799 to understand
#           why we need the * 300
#
AUTH_SUCCESS = 'Authentication success, welcome!' * 300
AUTH_ERROR = 'Invalid username and/or password'


class PostLoginForm(forms.Form):
    uname = forms.CharField(label='Username', required=True)

# Path: moth/views/base/form_template_view.py
# class FormTemplateView(VulnerableTemplateView):
#     template_name = "moth/vulnerability-form.html"
#     form_klass = GenericForm
#     
#     def get(self, request, *args, **kwargs):
#         form = self.form_klass()
#         return render(request, self.template_name,
#                       self.get_context_data(form=form))


# Path: moth/views/vulnerabilities/bruteforce/form.py
from django.shortcuts import render
from moth.views.base.form_template_view import FormTemplateView
from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Submit




#
#    FIXME: See https://github.com/andresriancho/w3af/issues/799 to understand
#           why we need the * 300
#
AUTH_SUCCESS = 'Authentication success, welcome!' * 300
AUTH_ERROR = 'Invalid username and/or password'


class PostLoginForm(forms.Form):
    uname = forms.CharField(label='Username', required=True)

    password = forms.CharField(label='Password', widget=forms.PasswordInput)