Created
November 26, 2012 13:21
-
-
Save fernandolopes/4148164 to your computer and use it in GitHub Desktop.
ai vai
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php if (!$employee->level == 1) { ?> | |
| function verifica_comments_acceptance() { | |
| var result = true; | |
| $('.select_comments option:selected').each(function(index){ | |
| if($(this).val() == 0) { | |
| result = false | |
| } | |
| }); | |
| if(result == false) { | |
| $('#status_approved').addClass('ui-state-disabled'); | |
| $('#status_approved').attr('disabled','disabled'); | |
| $('#status_pending').removeClass('ui-state-disabled'); | |
| $('#status_approved').removeAttr('disabled'); | |
| } else { | |
| $('#status_approved').removeClass('ui-state-disabled'); | |
| $('#status_approved').removeAttr('disabled'); | |
| $('#status_pending').addClass('ui-state-disabled'); | |
| $('#status_pending').attr('disabled','disabled'); | |
| } | |
| } | |
| <?php } else { ?> | |
| function verifica_comments_acceptance() { | |
| var result = true; | |
| $('.select_comments option:selected').each(function(index){ | |
| if($(this).val() == 0) { | |
| result = false | |
| } | |
| }); | |
| if(result == false) { | |
| $('#status_approved').addClass('ui-state-disabled'); | |
| $('#status_approved').attr('disabled','disabled'); | |
| $('#status_special_approval').removeClass('ui-state-disabled'); | |
| $('#status_special_approval').removeAttr('disabled'); | |
| } else { | |
| $('#status_approved').removeClass('ui-state-disabled'); | |
| $('#status_approved').removeAttr('disabled'); | |
| $('#status_special_approval').addClass('ui-state-disabled'); | |
| $('#status_special_approval').attr('disabled','disabled'); | |
| } | |
| } | |
| <?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment