cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pranav Saxena <psb...@gmail.com>
Subject Re: UI Query: createForm
Date Wed, 24 Jul 2013 12:48:16 GMT
Sorry for missing this thread .Seems like the mail was automatically sent
to my citrix ID which doesn't exist anymore. Anyways, I gave a quick look
at what Ian is trying to do here and realized that he has probably
forgotten to add the "required" class in the form structure . Ian , you
might want to add something like this to your customized form  as shown
below . This might help you with form validation.

var $astersikSpan = $('<span>').addClass('field-required').html('*');
<https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob;f=ui/scripts/ui/dialog.js;h=eb7e7b2acb09af4a9d6522949414b50cd18702f6;hb=ad69bc8d#l174>
                $name.find('label').prepend($astersikSpan);
<https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob;f=ui/scripts/ui/dialog.js;h=eb7e7b2acb09af4a9d6522949414b50cd18702f6;hb=ad69bc8d#l175>
<https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob;f=ui/scripts/ui/dialog.js;h=eb7e7b2acb09af4a9d6522949414b50cd18702f6;hb=ad69bc8d#l176>
               if (field.validation == null ||
field.validation.required == false) {
<https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob;f=ui/scripts/ui/dialog.js;h=eb7e7b2acb09af4a9d6522949414b50cd18702f6;hb=ad69bc8d#l177>
                    $astersikSpan.hide();
<https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob;f=ui/scripts/ui/dialog.js;h=eb7e7b2acb09af4a9d6522949414b50cd18702f6;hb=ad69bc8d#l178>
              }


Thanks,
Pranav




On Wed, Jul 24, 2013 at 5:55 PM, Sebastien Goasguen <runseb@gmail.com>wrote:

> Parnav, Jessica or Brian, can you help Ian here ?
>
> thx
>
> On Jul 22, 2013, at 9:51 AM, Ian Duffy <ian@ianduffy.ie> wrote:
>
> > Hi,
> >
> > I'm having an issue with the below gisted snippets. For whatever
> > reason they do not get validated. Any idea why?
> >
> > https://gist.github.com/imduffy15/6053967
> >
> > Thanks,
> > Ian
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message