From 00042d3f57d2b2c0a96523d99809c271c4490245 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 26 Jun 2020 13:49:31 -0300 Subject: [PATCH] no se puede editar el nombre del sitio aun --- app/views/sites/_form.haml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index 2294ae3b..1623532f 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -1,20 +1,21 @@ = form_for site, html: { class: form_class(site) } do |f| - .form-group - %h2= f.label :name - %p.lead= sanitize_markdown t('.help.name'), tags: %w[strong] - -# - El dominio contiene letras y números - No puede empezar ni terminar con guiones - No puede estar compuesto solo de números + - unless site.persisted? + .form-group + %h2= f.label :name + %p.lead= sanitize_markdown t('.help.name'), tags: %w[strong] + -# + El dominio contiene letras y números + No puede empezar ni terminar con guiones + No puede estar compuesto solo de números - = f.text_field :name, - class: form_control(site, :name), - required: true, - pattern: '^([a-z0-9][a-z0-9\-]*)?[a-z0-9\.]$', - minlength: 1, - maxlength: 63 - - if invalid? site, :name - .invalid-feedback= site.errors.messages[:name].join(', ') + = f.text_field :name, + class: form_control(site, :name), + required: true, + pattern: '^([a-z0-9][a-z0-9\-]*)?[a-z0-9\.]$', + minlength: 1, + maxlength: 63 + - if invalid? site, :name + .invalid-feedback= site.errors.messages[:name].join(', ') .form-group %h2= f.label :title