I want to customize the term of use
in popup, when a user login for first time that page should appear in popup.
To set the terms of use you will need to do 2 things.
First you'll need to create a Web Content Article.
Note: The ID is available when you're viewing the content's page but the group ID is less obvious. To find the group ID, look at the URL, and find the parameter doAsGroupId
. Its value is the group ID you've created the article for.
Secondly, you'll need to configure your portal to load this Web Content article.
portal.properties
file. If you're using Tomcat, it will be located in webapps\ROOT\WEB-INF\classes
.portlet-ext.properties
, if it does not already exist.Add the following keys with the values you previously wrote down.
terms.of.use.journal.article.group.id=
terms.of.use.journal.article.id=
Restart your server and the portal should now display the Terms of Use form the Web Content article.
Use bootstrap modal with javascript for popup
JavaScript Code: (write this code inside script tag)
$('#myModal').on('shown.bs.modal', function () {
$('#myInput').focus()
})
HTML Code: (make sure that Javascript Code and HTML Code should be in same tab)
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
... **(Write your content here)**
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
you can use links in place of button.
Be sure to add role="dialog" and aria-labelledby="...", referencing the modal title, to .modal, and role="document" to the .modal-dialog itself.
Additionally, you may give a description of your modal dialog with aria-describedby on .modal.
You can make use of modal dialog in bootstrap through which u can achieve what you want.
$(window).load(function()
{
$('#newModal').modal('show');
});
Don't forget to add this style sheets import in your html file.
<link rel="stylesheet"href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"> </script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
Your html file should have the following code
<div class="container">
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<!Your Heading-->
</div>
<div class="modal-body">
<p>Your text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">I Agree</button>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With