apps:public:inquiry

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
apps:public:inquiry [2020/03/17 15:38] adminapps:public:inquiry [2020/03/18 17:22] admin
行 65: 行 65:
       </div>       </div>
     </div>     </div>
-    <div class="form-group">+    <div class="form-group" v-bind:class="{ 'has-error': errors.recaptcha }">
       <label class="col-sm-4 control-label"></label>       <label class="col-sm-4 control-label"></label>
       <div class="col-sm-6">       <div class="col-sm-6">
         <vue-recaptcha sitekey="6LfmGOAUAAAAAGgzcpNWN-A--6ggRfnYAE94IOR3" ref="invisibleRecaptcha"></vue-recaptcha>         <vue-recaptcha sitekey="6LfmGOAUAAAAAGgzcpNWN-A--6ggRfnYAE94IOR3" ref="invisibleRecaptcha"></vue-recaptcha>
 +        <span class="text-danger" v-show="errors.recaptcha">{{ errors.recaptcha }}</span>
       </div>       </div>
     </div>     </div>
行 192: 行 193:
     },     },
     validate() {     validate() {
-      this.clearErrors(); 
       let isValid = true;       let isValid = true;
 +      this.clearErrors();
 +      this.message.recaptcha = document.getElementById('g-recaptcha-response').value;
 +      if (!this.message.recaptcha ) {
 +        this.errors.type = 'チェックしてください.';
 +        isValid = false;
 +      }      
       if (!this.message.type) {       if (!this.message.type) {
         this.errors.type = 'お問い合わせの種類を選択してください.';         this.errors.type = 'お問い合わせの種類を選択してください.';
行 214: 行 220:
     showConfirmModalHandler() {     showConfirmModalHandler() {
       if (this.validate()) {       if (this.validate()) {
-        this.message.recaptcha = document.getElementById('g-recaptcha-response').value; 
         this.$refs.confirmModal.show(this.message);         this.$refs.confirmModal.show(this.message);
       }       }
  • apps/public/inquiry.txt
  • 最終更新: 2022/02/22 22:22
  • by admin