added email confirmed field

This commit is contained in:
Bomrah Harry 2023-10-13 19:00:34 +08:00
parent 4dbd540335
commit e92256e0b6
1 changed files with 17 additions and 0 deletions

View File

@ -100,6 +100,13 @@
<div class="controls"> <div class="controls">
<%= f.email_field :email, :class=>"input-block-level", :placeholder=> signup_field.placeholder[I18n.locale], :required => true %> <%= f.email_field :email, :class=>"input-block-level", :placeholder=> signup_field.placeholder[I18n.locale], :required => true %>
</div> </div>
<div class="controls">
<label class="radio-inline">
<%= f.check_box :is_confirmed, :checked => (@seminar_signup.is_confirmed)%>
<%= f.hidden_field :is_confirmed_date %>
<%= t('seminar_signup.is_confirmed') %>
</label>
</div>
<br /> <br />
<div class="controls"> <div class="controls">
<label for="send_email" class="control-label muted"><%= t("seminar_signup.send_email") %></label> <label for="send_email" class="control-label muted"><%= t("seminar_signup.send_email") %></label>
@ -321,4 +328,14 @@ $("#seminar_signup_signup_confirmed").on("change",function () {
} }
}) })
$("#seminar_signup_is_confirmed").on("change",function () {
if(this.checked){
dt = new Date();
format = dt.getFullYear() + "/" + dt.getMonth() + "/" + dt.getDate() + " " + dt.getHours() + ":" + dt.getMinutes();
$("#seminar_signup_is_confirmed_date").val(format);
}else{
$("#seminar_signup_is_confirmed_date").val("");
}
})
</script> </script>