2017-05-29 07:24:48 +02:00
|
|
|
import $ from 'jquery';
|
2016-01-26 05:28:36 +01:00
|
|
|
|
2022-04-11 23:45:05 +02:00
|
|
|
$.entwine('ss', function ($) {
|
|
|
|
$('#Form_EditForm_RedirectionType input').entwine({
|
|
|
|
onmatch: function () {
|
|
|
|
var self = $(this);
|
|
|
|
if (self.attr('checked')) this.toggle();
|
|
|
|
this._super();
|
|
|
|
},
|
|
|
|
onunmatch: function () {
|
|
|
|
this._super();
|
|
|
|
},
|
|
|
|
onclick: function () {
|
|
|
|
this.toggle();
|
|
|
|
},
|
|
|
|
toggle: function () {
|
|
|
|
if ($(this).attr('value') == 'Internal') {
|
|
|
|
$('#Form_EditForm_ExternalURL_Holder').hide();
|
|
|
|
$('#Form_EditForm_LinkToID_Holder').show();
|
2022-07-08 03:31:24 +02:00
|
|
|
$('#Form_EditForm_LinkToFile_Holder').hide();
|
2022-04-11 23:45:05 +02:00
|
|
|
} else if ($(this).attr('value') == 'External') {
|
|
|
|
$('#Form_EditForm_ExternalURL_Holder').show();
|
|
|
|
$('#Form_EditForm_LinkToID_Holder').hide();
|
2022-07-08 03:31:24 +02:00
|
|
|
$('#Form_EditForm_LinkToFile_Holder').hide();
|
2022-04-11 23:45:05 +02:00
|
|
|
} else {
|
2022-07-08 03:31:24 +02:00
|
|
|
$('#Form_EditForm_LinkToFile_Holder').show();
|
2022-04-11 23:45:05 +02:00
|
|
|
$('#Form_EditForm_ExternalURL_Holder').hide();
|
|
|
|
$('#Form_EditForm_LinkToID_Holder').hide();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
2016-01-26 05:28:36 +01:00
|
|
|
});
|