Hide Forget Password button on Amplify Authenticator - aws-amplify

I've successfully disabled the signup form setting this piece of code
<amplify-authenticator [hideSignUp]="true">
<ng-template amplifySlot="authenticated" let-user="user" let-signOut="signOut">
<router-outlet></router-outlet>
</ng-template>
</amplify-authenticator>
But now I wish to hide the Forgot Password button... is there a simple way?

You can add an empty slot for the sign-in-footer to hide the forgot password button.
<amplify-authenticator [hideSignUp]="true">
<ng-template amplifySlot="sign-in-footer">
<div></div>
</ng-template>
<ng-template amplifySlot="authenticated" let-user="user" let-signOut="signOut">
<router-outlet></router-outlet>
</ng-template>
</amplify-authenticator>
Basically, you can customize the header and footer of each form. You can read more about it here.

Related

How to style an Image Field button in Django App

I want to style my Image Field Button (Choose File) with CSS. Currently, its displaying in the default theme. I am using Bootstrap V5.0.1, Django V3.2.12, Python 3.7.6.
First, I tried to identify or add a class or id which I can add and style the button regularly but was unable to add as the button was added by Django Image Field. The Code in my forms.py is given below:
from django import forms
class ImageUploadForm(forms.Form):
image = forms.ImageField(label='')
Then I used the Hover functionality of the Chrome Developer Tools to identify any leads and found that the button and its area had 2 id's #file-upload-button and #id_image.
I tried to add CSS to the above-mentioned id's but did not get the result i desired. I want to style the Choose File Button Below also if possible can i add any bootstrap to the button, any help would be appreciated! Thanks.
HTML-Django Code
<div class="form-group text-center">
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form }}
<br>
<button type="submit" id="btnUpload" class="btn btn-primary" style="margin-top:20px;">Upload</button>
</form>
</div>
i was having the same problem and came upon this article https://www.quirksmode.org/dom/inputfile.html
The ideia is to create a useless button and add style to it, then overlap both with the image field button on top, and then set the opacity of the image button to 0.
The image field button will still work, but you will only see the button with the style you add.

Remove field from user profile in alfresco community

I am using alfresco community 5.0.d
I want to remove google username field from the user profile.
So far,
I found the file that handles this form, userprofile.get.html.ftl and userprofile.get.js. Now as I comment out the div tag for google username field in userprofile.get.html.ftl then the whole form is getting hidden without any error on console.
Form is coming blank as shown in screenshot below.
Any idea how to remove?
Thanks.
I added hidden class to the div to hide them instead of removing it,as it is not displaying any of the form fields as you mentioned.
<#if profile.googleUsername?? && profile.googleUsername?length!=0>
<div class="row hidden">
<span class="fieldlabelright">${msg("label.googleusername")}:</span>
<span class="fieldvalue">${profile.googleUsername?html}</span>
</div>
</#if>
And for the Edit fields,
<div class="row hidden">
<span class="label"><label for="${el}-input-googleusername">${msg("label.googleusername")}:</label></span>
<span><input type="text" maxlength="256" size="30" id="${el}-input-googleusername" value="" <#immutablefield field="googleusername" /> /></span>
</div>
And it is working fine.
I found the reason for form not being displayed was that I was just removing the div tags but not the dom.get method for those fields.
Files to be modified:
profile.js
userprofile.get.html.ftl
Solution:
Remove the dom.get for the fields that you want to remove from
profile.js.
Remove the div tags of those fields from the
userprofile.get.html.ftl.
Restart the tomcat
Voilaaaa !!!
Fixed and Done.

how to add a blank line contact form 7

I'm new to wordpress and I am using Contact Form 7 for a form on the website. At the bottom of the form, I've added recaptcha and then the send button. I want to add a SPACE between the end of recaptcha and the form.
What code should I add there?
The code looks like this.
[recaptcha]
[submit "Send"]
And the screenshot looks like this.
Thanks in advance!
As Fralec_ pointed out, you can use a line break <br /> between the shortcodes to nudge the "Send" button down:
[recaptcha]
<br />
[submit "Send"]
Alternatively, if you want more control over the spacing, I would suggest wrapping the "Send" button inside a <div> with inline styling applied to it (change the 20px value accordingly), like this:
[recaptcha]
<div style="margin-top: 20px;">
[submit "Send"]
</div>
Resources
CSS Margins
You can try this:
[recaptcha]<br/>
[submit "Send"]

add button is missing for Content:Toolbar

The add button that appears over the 2sxc items is missing all of a sudden. It was there a couple days agao but now when I log into any portal in my DNN instance the "+" or add button is missing
here is a screen shot:
As you can see, the change layout and edit buttons are there. Not sure why the add button disappeared.
This is true for apps that I import from the 2sxc.org website as well. So I know its not just my template becasue it also happens on all the apps I have created which use different templates.
But to be thorough, here is my template code, its token based:
<div class="kr-gallery animation">
<p>Hover or touch image and click brush icon for more details</p>
<div class="isotope_grid isotope_grid2">
<div class="isotope_main animation" data-min-width="230">
<repeat repeat="Content in Data:Default">
<div class="isotope_item kr-gallery-item sc-element">[Content:Toolbar]
<div class="photo"><a href="[Tab:FullUrl]/details/[Content:EntityId]"> <img alt="" src="[Content:Image]?h=500" />
<span class="fa fa-paint-brush"></span></a>
</div>
</div>
</repeat>
</div>
</div>
</div>
Any idea why this is?
UPDATE:
Here is my visual query:
SOLUTION:
Based on answer, I switched to razor because I am using a custom query. Here is my simple template code now:
#* this will show an "add" button if the current user is an editor *#
#Edit.Toolbar(actions: "new", contentType: "Image")
#{
// get all images as delived from the standard query
var images = AsDynamic(Data["Default"]);
}
<div class="kr-gallery animation">
<p>Hover or touch image and click brush icon for more details</p>
<div class="isotope_grid isotope_grid2">
<div class="isotope_main animation" data-min-width="230">
#foreach(var img in images)
{
<div class="isotope_item kr-gallery-item sc-element">#img.Toolbar
<div class="photo"><a href="#Link.To(parameters: "details=" + img.EntityId)"> <img alt="#img.Title" src="#img.Image?h=500" />
<span class="fa fa-paint-brush"></span></a>
</div>
</div>
}
</div>
</div>
</div>
The missing + is by design, because editors are used to the + adding an item right after the previous one. This behavior cannot be guaranteed with a query, as the order of things is determined by the query. It is even possible, that adding an item will not show up, if a query-parameter hides that item.
So the design pattern is to provide a separate + button. The easiest way is in razor, I believe the code is something like
#Edit.Toolbar(actions: "new", contentType: "your-content-type-name")
In Tokens it's a bit more messy, and you cannot conditionally check if a user has edit-permissions.
So I recommend you go the edit.toolbar way
You can also find an example of this in the blog app: http://2sxc.org/en/apps/app/dnn-blog-app-for-dnn-dotnetnuke
I could be wrong but did you recently experiment with the visual query designer? Because this could be the cause.
The most common reason is when you use a pipeline (visual query) to deliver data to a template, which is not assigned to this instance. Reason is that "add" in a instance-list of items add it to a specific position (like right after the first one). This isn't the same when you use data like a data base - as there is no sorting in that scenario. So if this is the cause, I'll help you more.

How to use Excel VBA to click a web CSS button?

I am creating a macro with Excel VBA that will submit an entry into an online database using information from an Excel spreadsheet. During this entry process, the macro needs to click on a CSS button. It isn't a form button, does not have an input type, no name, no id, and no source image except for a background image. I think my only hopes are either to click on the button based on the div class. Can anyone help?
The button is here :
<div class="v-captiontext">
By Ankit
</div>
<td class="v-tabsheet-tabitemcell v-tabsheet-tabitemcell-selected" style="">
<div class="v- tabsheet-tabitem v-tabsheet-tabitem-selected">
<div class="v-caption" style="width: 39px;">
<div class="v-captiontext">
By LOT</div>
<div class="v-caption-clearelem">
</div>
</div>
</div>
</td>
Thanks to Remou's answer on this thread: Use VBA code to click on a button on webpage
Here is a first stab in your issue, you could try this:
Set tags = wb.Document.GetElementsByTagname("div")
For Each tagx In tags
If tagx.class = "v-caption-clearelem" Then
tagx.Click
End If
Next
Yet, I've never tried to use the Click method on a div.

Resources