[Kimchi-devel] [PATCH] [Kimchi] Edit template storage path should start with "/"

Rajat Gupta rajgupta at linux.vnet.ibm.com
Mon Nov 7 08:20:55 UTC 2016


Hello Aline,

On key press we have validation to display text box in red color if path 
is not valid, also when user try to save data message is getting display 
as below



Once user input correct path red border will disappear as below



Thanks and Regards,

Rajat Gupta


On 11/5/2016 1:37 AM, Aline Manera wrote:
> Is there an information somewhere to let user know that restriction?
>
> On 11/02/2016 06:58 AM, rajgupta at linux.vnet.ibm.com wrote:
>> From: Rajat Gupta <rajat.triumph at gmail.com>
>>
>> Edit template storage path should start with "/"
>>
>> Signed-off-by: Rajat Gupta <rajat.triumph at gmail.com>
>> ---
>>   ui/js/src/kimchi.template_edit_main.js | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/ui/js/src/kimchi.template_edit_main.js 
>> b/ui/js/src/kimchi.template_edit_main.js
>> index 1a6e473..758201f 100644
>> --- a/ui/js/src/kimchi.template_edit_main.js
>> +++ b/ui/js/src/kimchi.template_edit_main.js
>> @@ -339,7 +339,8 @@ kimchi.template_edit_main = function() {
>>                   });
>>
>>                   $(storageRow + ' input.storage-path').on('change 
>> input keyup',function(){
>> -                    if($(storageRow + ' input.storage-path').val()){
>> +                    var storagepath = $(storageRow + ' 
>> input.storage-path').val();
>> +                    if( storagepath && storagepath.charAt(0) == '/'){
>>                           $(storageRow + ' 
>> span.storage-path').removeClass('has-error');
>>                       }else{
>>                           $(storageRow + ' 
>> span.storage-path').addClass('has-error');
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20161107/e7d726fa/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dhbefeafmmkpakpi.png
Type: image/png
Size: 25667 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20161107/e7d726fa/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cjcnfgchnldfjjkc.png
Type: image/png
Size: 23540 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20161107/e7d726fa/attachment-0001.png>


More information about the Kimchi-devel mailing list