silverstripe-reports/javascript/RedirectorPage.js
Sean Harvey 240627b504 BUGFIX Adding RedirectorPage.js to cms module (was in sapphire) and
fixing to use entwine/jquery instead of old behaviour
2012-04-11 15:32:41 +12:00

25 lines
503 B
JavaScript

(function($) {
$.entwine('ss', function($){
$('#Form_EditForm_RedirectionType input').entwine({
onmatch: function() {
var self = $(this);
if(self.attr('checked')) this.toggle();
this._super();
},
onclick: function() {
this.toggle();
},
toggle: function() {
if($(this).attr('value') == 'Internal') {
$('#ExternalURL').hide();
$('#LinkToID').show();
} else {
$('#ExternalURL').show();
$('#LinkToID').hide();
}
}
});
});
})(jQuery);