unpopup the controlcaps views

This commit is contained in:
Andrew Bauer 2020-09-25 16:12:05 -05:00
parent eedf18073f
commit 582d85f083
3 changed files with 9 additions and 3 deletions

View File

@ -65,7 +65,7 @@ xhtmlHeaders(__FILE__, translate('ControlCaps'));
foreach( $controls as $control ) {
?>
<tr>
<td class="colName"><?php echo makePopupLink( '?view=controlcap&cid='.$control['Id'], 'zmControlCap', 'controlcap', validHtmlStr($control['Name']), canView( 'Control' ) ) ?></td>
<td class="colName"><?php echo makeLink( '?view=controlcap&cid='.$control['Id'], validHtmlStr($control['Name']), canView( 'Control' ) ) ?></td>
<td class="colType"><?php echo $control['Type'] ?></td>
<td class="colProtocol"><?php echo validHtmlStr($control['Protocol']) ?></td>
<td class="colCanMove"><?php echo $control['CanMove']?translate('Yes'):translate('No') ?></td>
@ -82,7 +82,7 @@ foreach( $controls as $control ) {
</tbody>
</table>
<div id="contentButtons">
<?php echo makePopupButton('?view=controlcap', 'zmControlCap', 'controlcap', translate('AddNewControl'), canEdit( 'Control' )); ?>
<?php echo makeButton('?view=controlcap', 'AddNewControl', canEdit( 'Control' )); ?>
<input type="submit" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled"/>
</div>
</form>

View File

@ -1,3 +1,9 @@
// Manage the Add New Control button
function AddNewControl(el) {
url = el.getAttribute('data-url');
window.location.assign(url);
}
function initPage() {
// Manage the BACK button
document.getElementById("backBtn").addEventListener("click", function onBackClick(evt) {

View File

@ -1011,7 +1011,7 @@ include('_monitor_source_nvsocket.php');
echo htmlSelect('newMonitor[ControlId]', $controlTypes, $monitor->ControlId());
if ( canEdit('Control') ) {
echo '&nbsp;'.makePopupLink('?view=controlcaps', 'zmControlCaps', 'controlcaps', translate('Edit'));
echo '&nbsp;'.makeLink('?view=controlcaps', 'zmControlCaps', 'controlcaps', translate('Edit'));
}
?>
</td>