How do I localise the strings used by the Azure API Management Developer Portal ? - azure

I can't seem to find a way to edit the localised strings using the provided template editor , does anyone have any pointers on this ?
For example if I wanted to change the text 'search products' to something else for example... Where/How can I edit the template and its data ?
Thank you
Le Roi

The ugly way to do this:
Edit the template, remove the
<search-control></search-control>
And add a custom text to the input placeholder
<div>
<form action="/Products" class="pull-right" method="get">
<input type="hidden" name="startEditTemplate" value="ProductList">
<div class="form-group has-feedback">
<input placeholder="My Custom Search products" id="pattern" type="search" class="form-control" name="pattern" spellcheck="false">
<button class="glyphicon glyphicon-search form-control-feedback ap-ininput-button"></button>
</div>
</form>
</div>
The bad part about this is that you are now responsible for updating this piece of code and template.

Related

Professionally style a stripe elements credit card input form using stripe elements CSS?

I am in need of any standard way of making the Stripe credit card input form from the Stripe docs look professional. Here is what it looks like with nothing done to it:
Stripe docs talk extensively about 'Stripe Elements' - a set of CSS that allows for easy styling - the problem is I have no idea how to apply it to this form.
Stripe give an example, but it doesn't work, and their IRC currently is down
Here is the code for the form, which is straight from the Stripe docs (functionally, it works great, it just looks drab):
<form id="payment-form">
<div id="card-element">
<!-- Elements will create input elements here -->
</div>
<!-- We'll put the error messages in this element -->
<div id="card-errors" role="alert"></div>
<br>
<button id="submit">Pay</button>
</form>
I would like it to look like the one in the docs (note that mine doesn't have an email field, but is otherwise very similar):
I got it looking half respectable through trial and error of the different classes found in the stripe example, some bootstrap classes, and form border from here. I'm sure there are (much) better looking forms, but here's what this results in:
<div class="col-lg-4">
</div>
<div class="col-lg-4">
<form id="payment-form">
<label for="card-element">Credit or debit card:</label><br>
<div id="card-element" class="form-control" style='height: 2.4em; padding-top: .7em;'>
<!-- Elements will create input elements here -->
</div>
<!-- We'll put the error messages in this element -->
<div id="card-errors" role="alert"></div>
<br>
<button id="submit" class="btn btn-lg btn-primary btn-block">Pay</button>
</form>
</div>
<div class="col-lg-4">
</div>

Radio button checked not working in the partial view but working in the main view

Radio button checked not working in the partial view. But working in the main view page. also if I use checkbox instead of radio it works fine in the partial view.
Code:-
<label class="radio-inline">
<input type="radio" value="phonetic" name="languageSelector">
<span class="checkmark"></span>Phonetic
</label>
<label class="radio-inline">
<input type="radio" value="bijoy" name="languageSelector">
<span class="checkmark"></span> Bijoy
</label>
<label class="radio-inline">
<input type="radio" value="avro" checked="checked" name="languageSelector">
<span class="checkmark"></span>Avro
</label>
You may be having an issue with the way you're referencing your partial view. There are two ways of doing so:
#Html.Partial("_PartialExample") and #Html.RenderPartial("_PartialExample")
One is written into the HTTP response, the other is rendered as an HTML encoded string. Try both and see if that helps.
Here's more information about what I'm talking about.
https://www.c-sharpcorner.com/UploadFile/ff2f08/partial-view-in-mvc/

Easy start with BlueSnap hosted payment fields;

Hi – I'm looking for a simple script I can Copy&Paste into my website so I can start selling with BlueSnap's HPF fields.
The form should include the most basic elements needed to get the token back and charge the shopper, I'm not looking for any design, just functionality.
I have the basics - but I need to see how this would look like if it was done:
<form id="checkoutForm">
<div>
<label>Full Name:</label>
<input type="text" id="fullName">
</div>
<div>
<label>Card Number:</label>
<input type="text" id="cardNumber" data-bluesnap="ccn">
</div>
<div>
<label>Security Code:</label>
<input type="text" id="securityCode" data-bluesnap="cvv">
</div>
<div>
<label>Expiration Date (MM/YYYY):</label>
<input type="text" id="expirationDate" data-bluesnap="exp">
</div>
<button type="submit" id="buynowButton">Buy Now</button>
</form>
Can anyone help me with that?
In order to implement BlueSnap Hosted Payment fields all you need to do is
plnkr simple example link
Obtain the Hosted Payment Field token for the session
Add the BlueSnap JavaScript file to your checkout form
<script type="text/javascript" src="BLUESNAPDOMAINPATH/services/hosted-payment-fields/v2.0/bluesnap.hpf.min.js"></script>
Add the Hosted Payment Fields to your checkout form
<div data-bluesnap="ccn"></div>
<div data-bluesnap="exp"></div>
<div data-bluesnap="cvv"></div>
Add a script to initiate the Hosted Payment Fields with your Hosted Fields token
Add a script to submit credit card, expiration date and CVV data

wysiwyg mindmup text editor : how to get the formatted text on server side?

Hello I am learning Bootstrap and would like to have a wysiwyg editor.
I found bootstrap-wysiwyg and want to use it.
http://mindmup.github.io/bootstrap-wysiwyg/
this example in website official use
<div id="editor">
</div>
not use
<input type="text" name="editor"> or <textarea name="editor"> </textarea>
However, I cannot figure out how to get formatted text on the server-side when a form is submitted.
Simple Solution is Submit Form by js method.
<div class="field" id="editor" data-placeholder="Insert your description."></div>
<input type="hidden" name="description" id="editor_description" value="" />
<script>
function submitform(){
$('#editor_description').val($('#editor').html());
$("#form").submit();
}
</script>

Add form to branded share point site (office 365)

How do I add a form (like below) in SharePoint (Office 365). I am posting from site.com to another_site.com. It is a branded site and I want the form in the master page.
I currently get this error: Your master page has one or more HTML tags. For your master page to work, remove the tags (but you can leave the content in them).
<form action="http://another_site/test" method="post">
<div class="form-group">
<div class="radio">
<input type="radio" name="request" value="demo">Request
</div>
<input name="fullname" type="text" class="form-control" placeholder="Full Name" required="required">
</div>
<button type="submit" class="btn">Submit</button>
</div>
</form>
If you would use a content editor webpart to incorporate the form, would that work? You then can embed the webpart into the masterpage.

Resources