Added Import for Large CSV
This commit is contained in:
@@ -22,48 +22,88 @@
|
||||
<xsl:value-of select="$PAGE-TITLE"/>
|
||||
|
|
||||
<xsl:value-of select="//users/record/user_name"/>
|
||||
|
|
||||
<xsl:value-of select="//users/record/user_id"/>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
<form action="" name="{$PAGE-NAME}" method="post" id="{$PAGE-NAME}">
|
||||
|
||||
<input type="hidden" name="action" value="Subscriptions.addSubscriptionToUser"/>
|
||||
<input type="hidden" name="step" value="add"/>
|
||||
<input type="hidden" name="action" value="Subscriptions.addSubscriptionToUser"/>
|
||||
<input type="hidden" name="step" value="add"/>
|
||||
<input type="hidden" name="user_serial" value="{//users/record/user_serial}"/>
|
||||
|
||||
<input type="hidden" name="user_serial" value="{//users/record/user_serial}"/>
|
||||
|
||||
<div class="row">
|
||||
<div class="alert alert-info py-2 small">
|
||||
<i class="bi bi-info-circle me-2"/>
|
||||
The subscriptions listed below will be added to the user.
|
||||
</div>
|
||||
|
||||
<div class="row g-4">
|
||||
|
||||
<!-- Left Side: Subscriptions Being Copied -->
|
||||
<div class="col-lg-8">
|
||||
|
||||
<div class="card h-100">
|
||||
|
||||
<div class="card-body p-0">
|
||||
|
||||
<div class="">
|
||||
<table class="table table-sm table-striped table-hover mb-0 align-middle subscriptions_error">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th style="width: 20px;">
|
||||
<input type="checkbox" class="form-check-input" id="selectAllSubscriptions"/>
|
||||
</th>
|
||||
<th>Subscription</th>
|
||||
<th>End Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(//subscriptions/record[not(subscription_serial = //usersubscriptions/record/usersubscription_subscription_serial)]) = 0">
|
||||
<tr>
|
||||
<td colspan="4" class="text-center text-muted py-3">
|
||||
This user already has all available subscriptions.
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="//subscriptions/record[not(subscription_serial = //usersubscriptions/record/usersubscription_subscription_serial)]"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="subscriptions_errors" class="d-none px-3 pt-3">
|
||||
<div class="alert alert-danger py-2 small">
|
||||
<i class="bi bi-info-circle me-2"/>
|
||||
Select at least one subscription to copy.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 mb-3">
|
||||
<label class="form-label" for="subscription_serial">Subscription</label>
|
||||
<select class="form-control form-control-sm search-dropdown" name="subscription_serial" id="subscription_serial" size="1">
|
||||
<xsl:apply-templates select="//subscriptions"/>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 mb-3">
|
||||
|
||||
<label class="form-label" for="subscription_stop_date">Stop Date</label>
|
||||
<div class="input-group input-group-sm subscription_stop_date">
|
||||
<input type="text" class="form-control form-control-sm date-mask" name="subscription_stop_date" id="subscription_stop_date" value="{$TODAY_MMDDYYYY}"/>
|
||||
<button class="btn btn-sm btn-outline-primary btnSubscriptionStopDateCalendar" type="button" data-bs-toggle="tooltip" data-bs-title="Calendar" data-bs-custom-class="custom-tooltip" tabindex="-1">
|
||||
<i class="bi bi-calendar3"/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<div class="buttons mt-2 mb-2">
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnSave">
|
||||
<i class="bi bi-save me-2"/>Save</button>
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnCancel">
|
||||
<i class="bi bi-x-lg me-2"/>Cancel</button>
|
||||
<div class="buttons mt-1 mb-2">
|
||||
|
||||
<div class="buttons mt-3 mb-1">
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnCancel">
|
||||
<i class="bi bi-box-arrow-left me-2"/>Cancel
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary me-2 btnSave">
|
||||
<i class="bi bi-floppy me-2"/>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -74,22 +114,24 @@
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- Template for Subscription dropdown -->
|
||||
|
||||
<xsl:template match="subscriptions">
|
||||
|
||||
<option value="">Choose..</option>
|
||||
|
||||
<xsl:for-each select="record">
|
||||
|
||||
<option value="{subscription_serial}" data-tokens="{subscription_serial}">
|
||||
<xsl:value-of select="subscription_title"/>
|
||||
-
|
||||
<xsl:value-of select="subscription_description"/>
|
||||
</option>
|
||||
|
||||
</xsl:for-each>
|
||||
|
||||
<!-- Subscriptions Rows -->
|
||||
<xsl:template match="subscriptions/record">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="form-check-input subscription-checkbox" name="subscriptions[]" value="{subscription_serial}"/>
|
||||
</td>
|
||||
<td class="fw-semibold">
|
||||
<xsl:value-of select="concat(subscription_description, ' - ', subscription_projecttype, ' - ', subscription_area)"/>
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group input-group-sm subscription_end_date">
|
||||
<input type="text" class="form-control form-control-sm date-mask subscription-end-date" name="subscription_end_date[]"/>
|
||||
<button class="btn btn-sm btn-outline-primary btnSubscriptionEndDateCalendar" type="button" data-bs-toggle="tooltip" data-bs-title="Calendar" data-bs-custom-class="custom-tooltip" tabindex="-1">
|
||||
<i class="bi bi-calendar3"/>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
Reference in New Issue
Block a user