Have u ever wondered if its possible to customise any of the sharepoint default application pages that reside in "_Layouts" hive as per your business requirement. I will write some detailed steps to accomplish this.
Let us consider a business requirement which says that user should not be able to checkin the major version of a document while checking in a document.
Now since, when user checks in a document, sharepoint opens up "checkin.aspx" page, we will copy the page and customize it since we cannot customise the original page (that will effect whole of the farm). Rename the copied page to "customCheckin.aspx".
Open the custom page and find the tag " and replace it to ""
In the similar way find the tag "{asp:placeholder id="CheckinOverWriteOption" runat="server"}" and replace it with "{asp:placeholder id="CheckinOverWriteOption" runat="server" visible="False"}"
Note: You can customize the page as per your requirement.
Now the issue it to show this page instead of default checkin page whenever user performs checkin, so the easiest solution would be to add a "mapping Url" entry in Web.Config of your application. To do this, open your web.config file and add below lines under "{system.web}" tag.
{urlMappings enabled="true"}
{add url="~/_layouts/checkin.aspx" mappedUrl="~/_layouts/customCheckin.aspx" /}
{/urlMappings}
Now open your site and try to checkin a document, and you will see your checkin page instead of default. (the url will still remains the same in browser as _/layouts/checkin.aspx" but the page will be yours).
Let us consider a business requirement which says that user should not be able to checkin the major version of a document while checking in a document.
Now since, when user checks in a document, sharepoint opens up "checkin.aspx" page, we will copy the page and customize it since we cannot customise the original page (that will effect whole of the farm). Rename the copied page to "customCheckin.aspx".
Open the custom page and find the tag " and replace it to ""
In the similar way find the tag "{asp:placeholder id="CheckinOverWriteOption" runat="server"}" and replace it with "{asp:placeholder id="CheckinOverWriteOption" runat="server" visible="False"}"
Note: You can customize the page as per your requirement.
Now the issue it to show this page instead of default checkin page whenever user performs checkin, so the easiest solution would be to add a "mapping Url" entry in Web.Config of your application. To do this, open your web.config file and add below lines under "{system.web}" tag.
{urlMappings enabled="true"}
{add url="~/_layouts/checkin.aspx" mappedUrl="~/_layouts/customCheckin.aspx" /}
{/urlMappings}
Now open your site and try to checkin a document, and you will see your checkin page instead of default. (the url will still remains the same in browser as _/layouts/checkin.aspx" but the page will be yours).