fix function view after actions cleanup
This commit is contained in:
parent
4a82f460b2
commit
b373577589
|
@ -45,5 +45,6 @@ if ( !empty($_REQUEST['mid']) && canEdit('Monitors', $_REQUEST['mid']) ) {
|
||||||
$refreshParent = true;
|
$refreshParent = true;
|
||||||
}
|
}
|
||||||
} // end if action
|
} // end if action
|
||||||
|
$view = 'none';
|
||||||
} // end if $mid and canEdit($mid)
|
} // end if $mid and canEdit($mid)
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -18,42 +18,43 @@
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
//
|
//
|
||||||
|
|
||||||
if ( !canEdit( 'Monitors' ) ) {
|
if ( !canEdit('Monitors') ) {
|
||||||
$view = 'error';
|
$view = 'error';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$monitor = dbFetchMonitor( $_REQUEST['mid'] );
|
$monitor = dbFetchMonitor($_REQUEST['mid']);
|
||||||
|
|
||||||
$focusWindow = true;
|
$focusWindow = true;
|
||||||
|
|
||||||
xhtmlHeaders(__FILE__, translate('Function')." - ".validHtmlStr($monitor['Name']) );
|
xhtmlHeaders(__FILE__, translate('Function').' - '.validHtmlStr($monitor['Name']));
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<div id="page">
|
<div id="page">
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<h2><?php echo translate('Function')." - ".validHtmlStr($monitor['Name']) ?></h2>
|
<h2><?php echo translate('Function').' - '.validHtmlStr($monitor['Name']) ?></h2>
|
||||||
</div>
|
</div>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
<form name="contentForm" id="contentForm" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
||||||
<input type="hidden" name="view" value="none"/>
|
<input type="hidden" name="view" value="function"/>
|
||||||
<input type="hidden" name="action" value="function"/>
|
<input type="hidden" name="action" value="function"/>
|
||||||
<input type="hidden" name="mid" value="<?php echo $monitor['Id'] ?>"/>
|
<input type="hidden" name="mid" value="<?php echo $monitor['Id'] ?>"/>
|
||||||
<p>
|
<p>
|
||||||
<select name="newFunction">
|
<select name="newFunction">
|
||||||
<?php
|
<?php
|
||||||
foreach ( getEnumValues( 'Monitors', 'Function' ) as $optFunction ) {
|
foreach ( getEnumValues('Monitors', 'Function') as $optFunction ) {
|
||||||
?>
|
?>
|
||||||
<option value="<?php echo $optFunction ?>"<?php if ( $optFunction == $monitor['Function'] ) { ?> selected="selected"<?php } ?>><?php echo translate('Fn'.$optFunction) ?></option>
|
<option value="<?php echo $optFunction ?>"<?php if ( $optFunction == $monitor['Function'] ) { ?> selected="selected"<?php } ?>><?php echo translate('Fn'.$optFunction) ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<label for="newEnabled"><?php echo translate('Enabled') ?></label><input type="checkbox" name="newEnabled" id="newEnabled" value="1"<?php if ( !empty($monitor['Enabled']) ) { ?> checked="checked"<?php } ?>/>
|
<label for="newEnabled"><?php echo translate('Enabled') ?></label>
|
||||||
|
<input type="checkbox" name="newEnabled" id="newEnabled" value="1"<?php if ( !empty($monitor['Enabled']) ) { ?> checked="checked"<?php } ?>/>
|
||||||
</p>
|
</p>
|
||||||
<div id="contentButtons">
|
<div id="contentButtons">
|
||||||
<input type="submit" value="<?php echo translate('Save') ?>"/>
|
<button type="submit" value="Save"><?php echo translate('Save') ?></button>
|
||||||
<input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/>
|
<button type="button" onclick="closeWindow()"><?php echo translate('Cancel') ?></button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue