AddManufacturerId and ModelId to Monitor view

This commit is contained in:
Isaac Connor 2020-10-11 09:57:08 -04:00
parent aa157bfd78
commit a6de3e15f4
1 changed files with 21 additions and 1 deletions

View File

@ -462,7 +462,9 @@ if ( $tab != 'general' ) {
?> ?>
<input type="hidden" name="newMonitor[Name]" value="<?php echo validHtmlStr($monitor->Name()) ?>"/> <input type="hidden" name="newMonitor[Name]" value="<?php echo validHtmlStr($monitor->Name()) ?>"/>
<input type="hidden" name="newMonitor[Notes]" value="<?php echo validHtmlStr($monitor->Notes()) ?>"/> <input type="hidden" name="newMonitor[Notes]" value="<?php echo validHtmlStr($monitor->Notes()) ?>"/>
<input type="hidden" name="newMonitor[ServerId]" value="<?php echo validHtmlStr($monitor->ServerId() ) ?>"/> <input type="hidden" name="newMonitor[ServerId]" value="<?php echo $monitor->ServerId() ?>"/>
<input type="hidden" name="newMonitor[ManufacturerId]" value="<?php echo $monitor->ManufacturerId() ?>"/>
<input type="hidden" name="newMonitor[ModelId]" value="<?php echo $monitor->ModelId() ?>"/>
<input type="hidden" name="newMonitor[LinkedMonitors]" value="<?php echo (null !== $monitor->LinkedMonitors())?validHtmlStr($monitor->LinkedMonitors()):'' ?>"/> <input type="hidden" name="newMonitor[LinkedMonitors]" value="<?php echo (null !== $monitor->LinkedMonitors())?validHtmlStr($monitor->LinkedMonitors()):'' ?>"/>
<?php <?php
foreach ( $monitor->GroupIds() as $group_id ) { foreach ( $monitor->GroupIds() as $group_id ) {
@ -627,6 +629,24 @@ switch ( $tab ) {
<td class="text-right pr-3"><?php echo translate('Notes') ?></td> <td class="text-right pr-3"><?php echo translate('Notes') ?></td>
<td><textarea name="newMonitor[Notes]" rows="4"><?php echo validHtmlStr($monitor->Notes()) ?></textarea></td> <td><textarea name="newMonitor[Notes]" rows="4"><?php echo validHtmlStr($monitor->Notes()) ?></textarea></td>
</tr> </tr>
<tr class="Manufacturer">
<td class="text-right pr-3"><?php echo translate('Manufacturer') ?></td>
<td><?php
require_once('includes/Manufacturer.php');
$manufacturers = ZM\Manufacturer::find();
echo htmlSelect('newMonitor[ManufacturerId]', $manufacturers, $monitor->ManufacturerId(), array('class'=>'chosen'));
?>
</td>
</tr>
<tr class="Model">
<td class="text-right pr-3"><?php echo translate('Model') ?></td>
<td><?php
require_once('includes/Model.php');
$models = ZM\Model::find(array('ManufacturerId'=>$monitor->ManufacturerId()));
echo htmlSelect('newMonitor[ModelId]', $models, $monitor->ModelId(), array('class'=>'chosen'));
?>
</td>
</tr>
<tr> <tr>
<td class="text-right pr-3"><?php echo translate('Server') ?></td><td> <td class="text-right pr-3"><?php echo translate('Server') ?></td><td>
<?php <?php