Skip to content

Commit

Permalink
Rename char-count attribute to data-char-count
Browse files Browse the repository at this point in the history
  • Loading branch information
Usbac committed Sep 7, 2024
1 parent dfcecda commit ff31942
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/link.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="card v-spacing">
<div class="input-group">
<label for="title"><?= t('title') ?></label>
<input id="title" name="title" type="text" value="<?= e($link['title'] ?? '') ?>" char-count/>
<input id="title" name="title" type="text" value="<?= e($link['title'] ?? '') ?>" data-char-count/>
</div>
<div class="input-group">
<label for="url"><?= t('url') ?></label>
Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="card v-spacing">
<div class="input-group">
<label for="title"><?= t('title') ?></label>
<input id="title" type="text" name="title" value="<?= e($page['title'] ?? '') ?>" char-count/>
<input id="title" type="text" name="title" value="<?= e($page['title'] ?? '') ?>" data-char-count/>
</div>
</div>
<div id="page-editor">
Expand All @@ -38,7 +38,7 @@
<div class="card v-spacing">
<div class="input-group">
<label for="slug"><?= t('slug') ?></label>
<input id="slug" name="slug" type="text" placeholder="lorem-ipsum" value="<?= e($page['slug'] ?? '') ?>" maxlength="255" char-count/>
<input id="slug" name="slug" type="text" placeholder="lorem-ipsum" value="<?= e($page['slug'] ?? '') ?>" maxlength="255" data-char-count/>
<a id="page-link" target="_blank"></a>
</div>
<?php if (\Aurora\Core\Helper::isValidId($page['id'] ?? false)): ?>
Expand Down Expand Up @@ -78,11 +78,11 @@
<div class="card v-spacing">
<div class="input-group">
<label for="meta-title"><?= t('meta_title') ?></label>
<input id="meta-title" name="meta_title" type="text" placeholder="lorem ipsum" value="<?= e($page['meta_title'] ?? '') ?>" char-count/>
<input id="meta-title" name="meta_title" type="text" placeholder="lorem ipsum" value="<?= e($page['meta_title'] ?? '') ?>" data-char-count/>
</div>
<div class="input-group">
<label for="meta-description"><?= t('meta_description') ?></label>
<textarea id="meta-description" name="meta_description" char-count><?= e($page['meta_description'] ?? '') ?></textarea>
<textarea id="meta-description" name="meta_description" data-char-count><?= e($page['meta_description'] ?? '') ?></textarea>
</div>
<div class="input-group">
<label for="canonical-url"><?= t('canonical_url') ?></label>
Expand Down
10 changes: 5 additions & 5 deletions app/views/admin/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="card v-spacing">
<div class="input-group">
<label for="title"><?= t('title') ?></label>
<input id="title" type="text" name="title" value="<?= e($post['title'] ?? '') ?>" char-count/>
<input id="title" type="text" name="title" value="<?= e($post['title'] ?? '') ?>" data-char-count/>
</div>
<?php if (!empty($post['image'])): ?>
<img src="<?= e($this->getContentUrl($post['image'])) ?>" class="pointer post-image"/>
Expand All @@ -42,12 +42,12 @@
<div class="card v-spacing">
<div class="input-group">
<label for="slug"><?= t('slug') ?></label>
<input id="slug" name="slug" type="text" placeholder="lorem-ipsum" value="<?= e($post['slug'] ?? '') ?>" maxlength="255" char-count/>
<input id="slug" name="slug" type="text" placeholder="lorem-ipsum" value="<?= e($post['slug'] ?? '') ?>" maxlength="255" data-char-count/>
<a id="post-link" target="_blank"></a>
</div>
<div class="input-group">
<label for="description"><?= t('description') ?></label>
<textarea id="description" name="description" char-count><?= e($post['description'] ?? '') ?></textarea>
<textarea id="description" name="description" data-char-count><?= e($post['description'] ?? '') ?></textarea>
</div>
<?php if (\Aurora\Core\Helper::isValidId($post['id'] ?? false)): ?>
<div class="extra-data">
Expand Down Expand Up @@ -98,11 +98,11 @@
</div>
<div class="input-group">
<label for="meta-title"><?= t('meta_title') ?></label>
<input id="meta-title" name="meta_title" type="text" placeholder="lorem ipsum" value="<?= e($post['meta_title'] ?? '') ?>" char-count/>
<input id="meta-title" name="meta_title" type="text" placeholder="lorem ipsum" value="<?= e($post['meta_title'] ?? '') ?>" data-char-count/>
</div>
<div class="input-group">
<label for="meta-description"><?= t('meta_description') ?></label>
<textarea id="meta-description" name="meta_description" char-count><?= e($post['meta_description'] ?? '') ?></textarea>
<textarea id="meta-description" name="meta_description" data-char-count><?= e($post['meta_description'] ?? '') ?></textarea>
</div>
<div class="input-group">
<label for="canonical-url"><?= t('canonical_url') ?></label>
Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div class="input-group-container">
<div class="input-group">
<label for="title"><?= t('title') ?></label>
<input id="title" name="title" type="text" value="<?= e(setting('title')) ?>" char-count/>
<input id="title" name="title" type="text" value="<?= e(setting('title')) ?>" data-char-count/>
</div>
<div class="input-group">
<label for="blog-url"><?= t('blog_url') ?></label>
Expand Down Expand Up @@ -92,15 +92,15 @@
<div class="card v-spacing">
<div class="input-group">
<label for="meta_title"><?= t('meta_title') ?></label>
<input id="meta_title" name="meta_title" type="text" value="<?= e(setting('meta_title')) ?>" char-count/>
<input id="meta_title" name="meta_title" type="text" value="<?= e(setting('meta_title')) ?>" data-char-count/>
</div>
<div class="input-group">
<label for="description"><?= t('description') ?></label>
<textarea id="description" name="description" char-count><?= e(setting('description')) ?></textarea>
<textarea id="description" name="description" data-char-count><?= e(setting('description')) ?></textarea>
</div>
<div class="input-group">
<label for="meta_description"><?= t('meta_description') ?></label>
<textarea id="meta_description" name="meta_description" char-count><?= e(setting('meta_description')) ?></textarea>
<textarea id="meta_description" name="meta_description" data-char-count><?= e(setting('meta_description')) ?></textarea>
</div>
<div class="input-group">
<label for="meta_keywords"><?= t('meta_keywords') ?></label>
Expand Down
8 changes: 4 additions & 4 deletions app/views/admin/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
</div>
<div class="input-group">
<label for="slug"><?= t('slug') ?></label>
<input id="slug" name="slug" type="text" value="<?= e($tag['slug'] ?? '') ?>" maxlength="255" char-count/>
<input id="slug" name="slug" type="text" value="<?= e($tag['slug'] ?? '') ?>" maxlength="255" data-char-count/>
</div>
<div class="input-group">
<label for="description"><?= t('description') ?></label>
<textarea id="description" name="description" char-count><?= e($tag['description'] ?? '') ?></textarea>
<textarea id="description" name="description" data-char-count><?= e($tag['description'] ?? '') ?></textarea>
</div>
<?php if (\Aurora\Core\Helper::isValidId($tag['id'] ?? false)): ?>
<div class="extra-data">
Expand All @@ -45,11 +45,11 @@
<div class="card v-spacing">
<div class="input-group">
<label for="meta-title"><?= t('meta_title') ?></label>
<input id="meta-title" name="meta_title" type="text" placeholder="lorem ipsum" value="<?= e($tag['meta_title'] ?? '') ?>" char-count/>
<input id="meta-title" name="meta_title" type="text" placeholder="lorem ipsum" value="<?= e($tag['meta_title'] ?? '') ?>" data-char-count/>
</div>
<div class="input-group">
<label for="meta-description"><?= t('meta_description') ?></label>
<textarea id="meta-description" name="meta_description" char-count><?= e($tag['meta_description'] ?? '') ?></textarea>
<textarea id="meta-description" name="meta_description" data-char-count><?= e($tag['meta_description'] ?? '') ?></textarea>
</div>
</div>
<input type="hidden" name="csrf" value="<?= e($this->csrfToken()) ?>"/>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</div>
<div class="input-group">
<label for="slug"><?= t('slug') ?></label>
<input id="slug" name="slug" type="text" value="<?= e($user['slug'] ?? '') ?>" maxlength="255" char-count/>
<input id="slug" name="slug" type="text" value="<?= e($user['slug'] ?? '') ?>" maxlength="255" data-char-count/>
</div>
<div class="input-group">
<label for="email"><?= t('email') ?></label>
Expand Down
2 changes: 1 addition & 1 deletion public/assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class Form {
}

static initCharCounters() {
document.querySelectorAll('*[char-count]').forEach(input => {
document.querySelectorAll('*[data-char-count]').forEach(input => {
let count_el = document.createElement('span');
count_el.classList.add('char-counter');

Expand Down

0 comments on commit ff31942

Please sign in to comment.