text: $(document).ready(function(){"no"==$("#isUnlimted").val()?$(".date").css("display","block"):$(".date").hide(),"yes"==$("#isTime").val()?$(".time").css("display","block"):$(".time").hide(),"yes"==$("#page").val()?($(".rand").css("display","none"),$(".quesToShowSelect").css("cssText","display: block !important;"),"yes"==$("#quesToShowSelect").val()&&$(".quesToShow").css("display","block"),$(".back").css("cssText","display: block !important;")):"no"==$("#page").val()&&($(".rand").css("cssText","display: block !important;"),$(".quesToShowSelect").css("display","none"),$(".quesToShow").hide(),$(".back").css("display","none")),$("#isUnlimted").on("change",function(){"no"==$(this).val()?$(".date").css("display","block"):$(".date").hide()}),$(".datepicker").pickadate(),$(".timepicker").pickatime({ampmclickable:!1,twelvehour:!1}),$("select").material_select(),$(".submit-add-ques").on("click",function(){var e=this,s=$(".formAddQue").attr("action");return $.ajax({url:s,type:"POST",data:$(".formAddQue").serialize(),beforeSend:function(){$(e).addClass("disabled")},success:function(s){$(e).removeClass("disabled"),"addQue"==s?Materialize.toast("تم أضافة السؤال بنجاح",2e3):"errorCreateQue"==s&&Materialize.toast("اسم السؤال مطلوب.",2e3)}}),!1}),$("#isTime").on("change",function(){"yes"==$(this).val()?$(".time").css("display","block"):$(".time").hide()}),$("#page").on("change",function(){"yes"==$(this).val()?($(".rand").css("display","none"),$(".quesToShowSelect").css("cssText","display: block !important;"),"yes"==$("#quesToShowSelect").val()&&$(".quesToShow").css("display","block"),$(".back").css("cssText","display: block !important;")):($(".rand").css("display","block"),$(".quesToShowSelect").css("display","none"),$(".quesToShow").hide(),$(".back").css("display","none"))}),$("#quesToShowSelect").on("change",function(){"yes"==$(this).val()?$(".quesToShow").css("display","block"):$(".quesToShow").hide()})});