/*====================================================================*
 *   
 *   signed OptionFirmware (signed margin, const char * style);
 *   
 *   page.h
 *
 *   This software and documentation is the property of Atheros 
 *   Corporation, Ocala, Florida. It is provided 'as is' without 
 *   expressed or implied warranty of any kind to anyone for any 
 *   reason. Atheros assumes no responsibility or liability for 
 *   errors or omissions in the software or documentation and 
 *   reserves the right to make changes without notification. 
 *   
 *   Atheros customers may modify and distribute the software 
 *   without obligation to Atheros. Since use of this software 
 *   is optional, users shall bear sole responsibility and 
 *   liability for any consequences of it's use. 
 *   
 *.  Atheros Powerline Toolkit for HomePlug AV;
 *:  Published 2006-2009 by Intellon Corp. ALL RIGHTS RESERVED;
 *;  For demonstration; Not for production use;
 *
 *   Contributor(s):
 *      Charles Maier <charles.maier@atheros.com>
 *
 *--------------------------------------------------------------------*/

#ifndef OPTIONFIRMWARE_SOURCE
#define OPTIONFIRMWARE_SOURCE

#include "../tools/format.h"
#include "../cgi/page.h"

signed OptionFirmware (signed margin, const char * style) 

{
	output (margin++, "<div class='%s'>", style);
	output (margin++, "<table class='%s'>", style);
	output (margin++, "<tr class='%s'>", style);
	output (margin++, "<td class='%s'>", style);
	output (margin++, "<fieldset class='%s'>", style);
	output (margin++, "<legend class='%s'>", style);
	output (margin, "%s", "File Select");
	output (margin--, "</legend>");
	output (margin++, "<table class='%s'>", style);
	output (margin++, "<tr class='%s'>", style);
	output (margin++, "<th class='%s'>", style);
	output (margin, "PIB File");
	output (margin--, "</th>");
	output (margin++, "<td class='%s'>", style);
	output (margin, "<input type='file' name='%s'/>", FIELD_PIB);
	output (margin--, "</td>");
	output (margin--, "</tr>");
	output (margin++, "<tr class='%s'>", style);
	output (margin++, "<th class='%s'>", style);
	output (margin, "NVM File");
	output (margin--, "</th>");
	output (margin++, "<td class='%s'>", style);
	output (margin, "<input type='file' name='%s'/>", FIELD_NVM);
	output (margin--, "</td>");
	output (margin--, "</tr>");
	output (margin--, "</table>");
	output (margin--, "</fieldset>");
	output (margin--, "</td>");
	output (margin--, "</tr>");
	output (margin++, "<tr class='%s'>", style);
	output (margin++, "<td class='%s'>", style);
	output (margin, "<input type='submit' class='%s' name='%s' value='%s' title=' Change Configuration '>", style, SUBMIT_ACTION, ACTION_CONFIGURE);
	output (margin, "<input type='submit' class='%s' name='%s' value='%s' title=' Change Configuration and Firmware '>", style, SUBMIT_ACTION, ACTION_UPGRADE);
	output (margin, "<input type='submit' class='%s' name='%s' value='%s' title=' Restore Factory Defaults '>", style, SUBMIT_ACTION, ACTION_DEFAULT);
	output (margin--, "</td>");
	output (margin--, "</tr>");
	output (margin--, "</table>");
	output (margin--, "</div>");
	return (margin);
}

#endif