• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 70
  • Last Modified:

Could you point a way to always obligate a view control to be enabled?

Hi Experts

Could you point a way to always obligate a view control to be enabled?


After using a "view modal"  after going to "edit modal" the combo controls are disabled.

View control
<div class="col-xs-8 mb15">
	<label for="fk_cliente_corporativo" class="field-label text-muted mb10">Produto</label>
	<label for="fk_cliente_corporativo" class="validar field select">
		<?php echo $fk_cliente_corporativo;?>
		<i class="arrow double"></i>
	</label>
</div>

Open in new window


  $('#view').on('show.bs.modal', function () {

		console.log("Modal VIEW");

		var file = $("#view #anexo").val();
		var parts = file.split('/');
		var file = parts[parts.length-1];
 
		 
		 $("#view #anexo").val(file);

	});


  $('#edit').on('show.bs.modal', function () {

        console.log("Modal EDIT");
 
	$('#edit input').prop("disabled", false);

       //Using class validar to force the control to be enabled => No success.
	$('#edit .validar').prop("disabled", false);
});

Open in new window

img002
When  only using "Modal view"  the control isn't disabled.
0
Eduardo Fuerte
Asked:
Eduardo Fuerte
  • 2
  • 2
1 Solution
 
Julian HansenCommented:
The only way to solve this is to find out what is disabling them and address that. You can't set a control to never be disabled.
0
 
Eduardo FuerteAuthor Commented:
@Julian

You are completelly right. I finally found that a helper that outputs to the view with code disables controls in the view.

End of the view
	<?php
        echo datatables_crud_modal(array(
            'controller' => 'reclamacao',
            'edit' => array(
                'action' => array(
                    'save' => 'save',
                    'entity' => 'get',   
                    'status' => 'update',
                ),
            ),
            'view' => array(
                'action' => 'view'
            ),
        ));
    ?>

Open in new window


The code commented.
img001
Something a little obvious.

That's solved by your assistance (and patience with so repeated questions)
0
 
Eduardo FuerteAuthor Commented:
Thank you for assistance!
0
 
Julian HansenCommented:
You are always welcome Eduardo, well done on nailing it.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now