diff options
Diffstat (limited to 'h-source/Application')
| -rw-r--r-- | h-source/Application/Controllers/PrintersController.php | 4 | ||||
| -rw-r--r-- | h-source/Application/Include/hardware.php | 2 | ||||
| -rw-r--r-- | h-source/Application/Models/PrintersModel.php | 1 | ||||
| -rw-r--r-- | h-source/Application/Views/Printers/form.php | 5 | ||||
| -rw-r--r-- | h-source/Application/Views/Printers/page.php | 5 | 
5 files changed, 16 insertions, 1 deletions
| diff --git a/h-source/Application/Controllers/PrintersController.php b/h-source/Application/Controllers/PrintersController.php index 6521e1b..8353809 100644 --- a/h-source/Application/Controllers/PrintersController.php +++ b/h-source/Application/Controllers/PrintersController.php @@ -51,6 +51,7 @@ class PrintersController extends GenericController  			"+checkIsStrings|".Printer::compatibilityList() 	=> 	"compatibility",  			"++checkIsStrings|".Printer::$commYear	=> 	"comm_year",  			"+++checkIsStrings|".Printer::$interface	=> 	"interface", +			"++++checkIsStrings|".Printer::$subtype	=> 	"subtype",  		);  		$this->m['HardwareModel']->strongConditions['insert'] = array( @@ -62,6 +63,7 @@ class PrintersController extends GenericController  			"+checkIsStrings|".Printer::compatibilityList() 	=> 	"compatibility",  			"++checkIsStrings|".Printer::$commYear	=> 	"comm_year",  			"+++checkIsStrings|".Printer::$interface	=> 	"interface", +			"++++checkIsStrings|".Printer::$subtype	=> 	"subtype",  		);  		$this->m['HardwareModel']->softConditions['update'] = array( @@ -82,7 +84,7 @@ class PrintersController extends GenericController  			"++checkMatch|/^[a-zA-Z0-9\-\_\.\+\s\/\,\:\;\(\)\[\]]+$/"	=>	"driver|only the following characters are allowed for the <i>driver</i> entry: a-z A-Z 0-9 - _ . + s / , : ; ( ) [ ]",  		); -		$this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface','sanitizeAll');		 +		$this->m['HardwareModel']->setFields('vendor,model,kernel,description,compatibility,distribution,comm_year,pci_id,driver,interface,subtype','sanitizeAll');		  		$argKeys = array(  			'page:forceNat'					=>	1, diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php index 9879d14..c6d930e 100644 --- a/h-source/Application/Include/hardware.php +++ b/h-source/Application/Include/hardware.php @@ -55,6 +55,8 @@ class Printer extends hardware  	public static $interface = "not-specified,USB,Serial,Parallel,Firewire,SCSI,Ethernet"; +	public static $subtype = "not-specified,laser,inkjet,other"; +	  	public static function vendorsList()  	{  		return implode(',',array_values(self::$vendors)); diff --git a/h-source/Application/Models/PrintersModel.php b/h-source/Application/Models/PrintersModel.php index 8606201..af86980 100644 --- a/h-source/Application/Models/PrintersModel.php +++ b/h-source/Application/Models/PrintersModel.php @@ -52,6 +52,7 @@ class PrintersModel extends BaseModel  		$this->diffFields = array(  			'vendor' 		=>	gtext("vendor"),  			'model' 		=>	gtext('model name'), +			'subtype' 		=>	gtext('subtype')." (laser, inkjet, ..)",  			'pci_id'		=>	gtext("VendorID:ProductID code of the device"),  			'comm_year'		=>	gtext('year of commercialization'),  			'interface'		=>	gtext("interface"), diff --git a/h-source/Application/Views/Printers/form.php b/h-source/Application/Views/Printers/form.php index ef29cf6..aafb747 100644 --- a/h-source/Application/Views/Printers/form.php +++ b/h-source/Application/Views/Printers/form.php @@ -51,6 +51,11 @@  				</div>  				<div class="form_entry"> +					<div class="entry_label"><?php echo gtext("subtype");?> (laser, inkjet, ..):</div> +					<?php echo Html_Form::select('subtype',$values['subtype'],Printer::$subtype,"select_entry");?> +				</div> +				 +				<div class="form_entry">  					<div class="entry_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>  					<?php echo Html_Form::input('pci_id',$values['pci_id'],'input_entry');?>  				</div> diff --git a/h-source/Application/Views/Printers/page.php b/h-source/Application/Views/Printers/page.php index f3e2ec4..a84a695 100644 --- a/h-source/Application/Views/Printers/page.php +++ b/h-source/Application/Views/Printers/page.php @@ -49,6 +49,11 @@  			</div>  			<div class="notebook_vendor"> +				<div class="inner_label"><?php echo gtext("subtype");?> (laser, inkjet, ..):</div> +				<div class="inner_value"><b><?php echo $item[$tableName]['subtype'];?></b></div> +			</div> +			 +			<div class="notebook_vendor">  				<div class="inner_label"><?php echo gtext("VendorID:ProductID code of the device");?>:</div>  				<div class="inner_value"><b><?php echo $item[$tableName]['pci_id'];?></b></div>  			</div> | 
