Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2016-10-19
4
Medium Priority
?
65 Views
Last Modified: 2016-10-20
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
Comment
Question by:Eduardo Fuerte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 59

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 41850525
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
 

Author Comment

by:Eduardo Fuerte
ID: 41851853
@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
 

Author Closing Comment

by:Eduardo Fuerte
ID: 41851856
Thank you for assistance!
0
 
LVL 59

Expert Comment

by:Julian Hansen
ID: 41851875
You are always welcome Eduardo, well done on nailing it.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question