from django.shortcuts import render,redirect
from django.contrib import messages
from help.models import instruction,static_page,notification
from help.forms import form_instruction,form_instruction_search,form_notification_search,form_notification,form_static_page,form_static_page_search
from . import forms as help_form
from baseapp.views import formview_base,view_base,formview_base_patient,view_base_patient
# Create your views here.



def formview_instruction(request,id = 0):  
    return formview_base(request,form_instruction,instruction, 'instruction',id)

def view_instruction(request, viewtype ='tbl',*args, **kwargs):
    return view_base(request,instruction,form_instruction_search, form_instruction.Meta.fields ,form_instruction.Meta.fields, 'Help',viewtype,'uid','view_instruction')



def formview_notification(request,id = 0):  
    return formview_base(request,form_notification,notification, 'Notification',id,'add_notification')

def view_notification(request, viewtype ='tbl',*args, **kwargs):
    return view_base(request,notification,form_notification_search,form_notification.Meta.fields,form_notification.Meta.fields, 'Notification',viewtype,'header','view_notification')



def formview_static_page(request,id = 0):  
    return formview_base(request,form_static_page,static_page, 'Static Page',id)

def view_static_page(request, viewtype ='tbl',*args, **kwargs):
    return view_base(request,static_page,form_static_page_search, form_static_page.Meta.fields ,form_static_page.Meta.fields, 'Static Page',viewtype,'heading','view_static')
